blob: 66ad292c9fc346b8f9a9bcb44114e44c1b028d9d [file] [log] [blame]
Nobuhiro Iwamatsub7576232007-03-29 00:07:35 +09001/*
2 * linux/arch/sh/boards/se/7780/irq.c
3 *
4 * Copyright (C) 2006,2007 Nobuhiro Iwamatsu
5 *
6 * Hitachi UL SolutionEngine 7780 Support.
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 */
12#include <linux/init.h>
13#include <linux/irq.h>
14#include <linux/interrupt.h>
15#include <asm/irq.h>
16#include <asm/io.h>
Paul Mundt939a24a2008-07-29 21:41:37 +090017#include <mach-se/mach/se7780.h>
Nobuhiro Iwamatsub7576232007-03-29 00:07:35 +090018
Nobuhiro Iwamatsub7576232007-03-29 00:07:35 +090019/*
20 * Initialize IRQ setting
21 */
22void __init init_se7780_IRQ(void)
23{
Nobuhiro Iwamatsub7576232007-03-29 00:07:35 +090024 /* enable all interrupt at FPGA */
25 ctrl_outw(0, FPGA_INTMSK1);
26 /* mask SM501 interrupt */
27 ctrl_outw((ctrl_inw(FPGA_INTMSK1) | 0x0002), FPGA_INTMSK1);
28 /* enable all interrupt at FPGA */
29 ctrl_outw(0, FPGA_INTMSK2);
30
31 /* set FPGA INTSEL register */
32 /* FPGA + 0x06 */
33 ctrl_outw( ((IRQPIN_SM501 << IRQPOS_SM501) |
34 (IRQPIN_SMC91CX << IRQPOS_SMC91CX)), FPGA_INTSEL1);
35
36 /* FPGA + 0x08 */
37 ctrl_outw(((IRQPIN_EXTINT4 << IRQPOS_EXTINT4) |
38 (IRQPIN_EXTINT3 << IRQPOS_EXTINT3) |
39 (IRQPIN_EXTINT2 << IRQPOS_EXTINT2) |
40 (IRQPIN_EXTINT1 << IRQPOS_EXTINT1)), FPGA_INTSEL2);
41
42 /* FPGA + 0x0A */
43 ctrl_outw((IRQPIN_PCCPW << IRQPOS_PCCPW), FPGA_INTSEL3);
44
Magnus Dammc9d03d92007-07-31 17:13:39 +090045 plat_irq_setup_pins(IRQ_MODE_IRQ); /* install handlers for IRQ0-7 */
Nobuhiro Iwamatsub7576232007-03-29 00:07:35 +090046}