diff options
author | David Howells <dhowells@redhat.com> | 2010-10-27 12:28:58 -0400 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-10-27 12:28:58 -0400 |
commit | 6044cf1d9426dfd5cdc1e7b9cf8eaed6418e1ff6 (patch) | |
tree | 3f6f209d37328ce1635df8f5d0b5df1cef1afe30 /arch/mn10300/unit-asb2364/include | |
parent | 730c1fad0ee22a170d2ee76a904709ee304931c0 (diff) |
MN10300: ASB2364: Handle the IRQ multiplexer in the FPGA
Handle the IRQ multiplexer in the FPGA by implementing a cascade interrupt
driver for it.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/mn10300/unit-asb2364/include')
-rw-r--r-- | arch/mn10300/unit-asb2364/include/unit/fpga-regs.h | 24 | ||||
-rw-r--r-- | arch/mn10300/unit-asb2364/include/unit/irq.h | 35 |
2 files changed, 48 insertions, 11 deletions
diff --git a/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h b/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h index a039a50c91db..7cf12054db65 100644 --- a/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h +++ b/arch/mn10300/unit-asb2364/include/unit/fpga-regs.h | |||
@@ -14,17 +14,19 @@ | |||
14 | #define ASB2364_FPGA_REG_RESET_USB __SYSREG(0xa900130c, u16) | 14 | #define ASB2364_FPGA_REG_RESET_USB __SYSREG(0xa900130c, u16) |
15 | #define ASB2364_FPGA_REG_RESET_AV __SYSREG(0xa9001310, u16) | 15 | #define ASB2364_FPGA_REG_RESET_AV __SYSREG(0xa9001310, u16) |
16 | 16 | ||
17 | #define ASB2364_FPGA_REG_IRQ_LAN __SYSREG(0xa9001510, u16) | 17 | #define ASB2364_FPGA_REG_IRQ(X) __SYSREG(0xa9001590+((X)*4), u16) |
18 | #define ASB2364_FPGA_REG_IRQ_UART __SYSREG(0xa9001514, u16) | 18 | #define ASB2364_FPGA_REG_IRQ_LAN ASB2364_FPGA_REG_IRQ(0) |
19 | #define ASB2364_FPGA_REG_IRQ_I2C __SYSREG(0xa9001518, u16) | 19 | #define ASB2364_FPGA_REG_IRQ_UART ASB2364_FPGA_REG_IRQ(1) |
20 | #define ASB2364_FPGA_REG_IRQ_USB __SYSREG(0xa900151c, u16) | 20 | #define ASB2364_FPGA_REG_IRQ_I2C ASB2364_FPGA_REG_IRQ(2) |
21 | #define ASB2364_FPGA_REG_IRQ_FPGA __SYSREG(0xa9001524, u16) | 21 | #define ASB2364_FPGA_REG_IRQ_USB ASB2364_FPGA_REG_IRQ(3) |
22 | 22 | #define ASB2364_FPGA_REG_IRQ_FPGA ASB2364_FPGA_REG_IRQ(5) | |
23 | #define ASB2364_FPGA_REG_MASK_LAN __SYSREG(0xa9001590, u16) | 23 | |
24 | #define ASB2364_FPGA_REG_MASK_UART __SYSREG(0xa9001594, u16) | 24 | #define ASB2364_FPGA_REG_MASK(X) __SYSREG(0xa9001590+((X)*4), u16) |
25 | #define ASB2364_FPGA_REG_MASK_I2C __SYSREG(0xa9001598, u16) | 25 | #define ASB2364_FPGA_REG_MASK_LAN ASB2364_FPGA_REG_MASK(0) |
26 | #define ASB2364_FPGA_REG_MASK_USB __SYSREG(0xa900159c, u16) | 26 | #define ASB2364_FPGA_REG_MASK_UART ASB2364_FPGA_REG_MASK(1) |
27 | #define ASB2364_FPGA_REG_MASK_FPGA __SYSREG(0xa90015a4, u16) | 27 | #define ASB2364_FPGA_REG_MASK_I2C ASB2364_FPGA_REG_MASK(2) |
28 | #define ASB2364_FPGA_REG_MASK_USB ASB2364_FPGA_REG_MASK(3) | ||
29 | #define ASB2364_FPGA_REG_MASK_FPGA ASB2364_FPGA_REG_MASK(5) | ||
28 | 30 | ||
29 | #define ASB2364_FPGA_REG_CPLD5_SET1 __SYSREG(0xa9002500, u16) | 31 | #define ASB2364_FPGA_REG_CPLD5_SET1 __SYSREG(0xa9002500, u16) |
30 | #define ASB2364_FPGA_REG_CPLD5_SET2 __SYSREG(0xa9002504, u16) | 32 | #define ASB2364_FPGA_REG_CPLD5_SET2 __SYSREG(0xa9002504, u16) |
diff --git a/arch/mn10300/unit-asb2364/include/unit/irq.h b/arch/mn10300/unit-asb2364/include/unit/irq.h new file mode 100644 index 000000000000..786148e46565 --- /dev/null +++ b/arch/mn10300/unit-asb2364/include/unit/irq.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* ASB2364 FPGA irq numbers | ||
2 | * | ||
3 | * Copyright (C) 2010 Red Hat, Inc. All Rights Reserved. | ||
4 | * Written by David Howells (dhowells@redhat.com) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public Licence | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the Licence, or (at your option) any later version. | ||
10 | */ | ||
11 | #ifndef _UNIT_IRQ_H | ||
12 | #define _UNIT_IRQ_H | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
16 | #ifdef CONFIG_SMP | ||
17 | #define NR_CPU_IRQS GxICR_NUM_EXT_IRQS | ||
18 | #else | ||
19 | #define NR_CPU_IRQS GxICR_NUM_IRQS | ||
20 | #endif | ||
21 | |||
22 | enum { | ||
23 | FPGA_LAN_IRQ = NR_CPU_IRQS, | ||
24 | FPGA_UART_IRQ, | ||
25 | FPGA_I2C_IRQ, | ||
26 | FPGA_USB_IRQ, | ||
27 | FPGA_RESERVED_IRQ, | ||
28 | FPGA_FPGA_IRQ, | ||
29 | NR_IRQS | ||
30 | }; | ||
31 | |||
32 | extern void __init irq_fpga_init(void); | ||
33 | |||
34 | #endif /* !__ASSEMBLY__ */ | ||
35 | #endif /* _UNIT_IRQ_H */ | ||