summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/unit-asb2364/irq-fpga.c
diff options
context:
space:
mode:
authorDavid Howells2011-03-18 17:52:54 +0100
committerDavid Howells2011-03-18 17:52:54 +0100
commitddb7d1e975d224885397c002512ded987be3c3bc (patch)
treec24cbe7132c243450aa11939f4d88a2bde8ed6e0 /arch/mn10300/unit-asb2364/irq-fpga.c
parentMN10300: Fix the ASB2364 gdbport UART register defs (diff)
downloadkernel-qcow2-linux-ddb7d1e975d224885397c002512ded987be3c3bc.tar.gz
kernel-qcow2-linux-ddb7d1e975d224885397c002512ded987be3c3bc.tar.xz
kernel-qcow2-linux-ddb7d1e975d224885397c002512ded987be3c3bc.zip
MN10300: Clear ASB2364 peripheral interrupt masks before enabling interrupts
Clear the interrupt mask registers of ASB2364 peripherals before enabling interrupts so that any peripherals that weren't dealt with by the bootloader after a reboot (if there was one) won't cause an interrupt storm when interrupts are first enabled before the drivers are initialised. Also, attempt to reset the peripherals attached to the FPGA. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/unit-asb2364/irq-fpga.c')
-rw-r--r--arch/mn10300/unit-asb2364/irq-fpga.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/mn10300/unit-asb2364/irq-fpga.c b/arch/mn10300/unit-asb2364/irq-fpga.c
index 4204a6c62a25..ee84e62b16ed 100644
--- a/arch/mn10300/unit-asb2364/irq-fpga.c
+++ b/arch/mn10300/unit-asb2364/irq-fpga.c
@@ -88,6 +88,17 @@ void __init irq_fpga_init(void)
{
int irq;
+ ASB2364_FPGA_REG_MASK_LAN = 0x0001;
+ SyncExBus();
+ ASB2364_FPGA_REG_MASK_UART = 0x0001;
+ SyncExBus();
+ ASB2364_FPGA_REG_MASK_I2C = 0x0001;
+ SyncExBus();
+ ASB2364_FPGA_REG_MASK_USB = 0x0001;
+ SyncExBus();
+ ASB2364_FPGA_REG_MASK_FPGA = 0x0001;
+ SyncExBus();
+
for (irq = NR_CPU_IRQS; irq < NR_IRQS; irq++)
set_irq_chip_and_handler(irq, &asb2364_fpga_pic, handle_level_irq);