162306a36Sopenharmony_ci/* 262306a36Sopenharmony_ci * Common tx4927 irq handler 362306a36Sopenharmony_ci * 462306a36Sopenharmony_ci * Author: MontaVista Software, Inc. 562306a36Sopenharmony_ci * source@mvista.com 662306a36Sopenharmony_ci * 762306a36Sopenharmony_ci * under the terms of the GNU General Public License as published by the 862306a36Sopenharmony_ci * Free Software Foundation; either version 2 of the License, or (at your 962306a36Sopenharmony_ci * option) any later version. 1062306a36Sopenharmony_ci * 1162306a36Sopenharmony_ci * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 1262306a36Sopenharmony_ci * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1362306a36Sopenharmony_ci * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1462306a36Sopenharmony_ci * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 1562306a36Sopenharmony_ci * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 1662306a36Sopenharmony_ci * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 1762306a36Sopenharmony_ci * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1862306a36Sopenharmony_ci * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 1962306a36Sopenharmony_ci * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 2062306a36Sopenharmony_ci * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2162306a36Sopenharmony_ci * 2262306a36Sopenharmony_ci * You should have received a copy of the GNU General Public License along 2362306a36Sopenharmony_ci * with this program; if not, write to the Free Software Foundation, Inc., 2462306a36Sopenharmony_ci * 675 Mass Ave, Cambridge, MA 02139, USA. 2562306a36Sopenharmony_ci */ 2662306a36Sopenharmony_ci#include <linux/init.h> 2762306a36Sopenharmony_ci#include <linux/interrupt.h> 2862306a36Sopenharmony_ci#include <linux/irq.h> 2962306a36Sopenharmony_ci#include <asm/irq_cpu.h> 3062306a36Sopenharmony_ci#include <asm/txx9/tx4927.h> 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_civoid __init tx4927_irq_init(void) 3362306a36Sopenharmony_ci{ 3462306a36Sopenharmony_ci int i; 3562306a36Sopenharmony_ci 3662306a36Sopenharmony_ci mips_cpu_irq_init(); 3762306a36Sopenharmony_ci txx9_irq_init(TX4927_IRC_REG & 0xfffffffffULL); 3862306a36Sopenharmony_ci irq_set_chained_handler(MIPS_CPU_IRQ_BASE + TX4927_IRC_INT, 3962306a36Sopenharmony_ci handle_simple_irq); 4062306a36Sopenharmony_ci /* raise priority for errors, timers, SIO */ 4162306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_ECCERR, 7); 4262306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_WTOERR, 7); 4362306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_PCIERR, 7); 4462306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_PCIPME, 7); 4562306a36Sopenharmony_ci for (i = 0; i < TX4927_NUM_IR_TMR; i++) 4662306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_TMR(i), 6); 4762306a36Sopenharmony_ci for (i = 0; i < TX4927_NUM_IR_SIO; i++) 4862306a36Sopenharmony_ci txx9_irq_set_pri(TX4927_IR_SIO(i), 5); 4962306a36Sopenharmony_ci} 50