19 #include <linux/module.h>
24 #include <mach/hardware.h>
27 #define LAN9217_BASE_ADDR(n) (n + 0x0)
29 #define UARTA_BASE_ADDR(n) (n + 0x8000)
30 #define UARTB_BASE_ADDR(n) (n + 0x10000)
32 #define BOARD_IO_ADDR(n) (n + 0x20000)
34 #define LED_SWITCH_REG 0x00
36 #define SWITCH_BUTTONS_REG 0x08
38 #define INTR_STATUS_REG 0x10
39 #define INTR_MASK_REG 0x38
40 #define INTR_RESET_REG 0x20
42 #define MAGIC_NUMBER1_REG 0x40
43 #define MAGIC_NUMBER2_REG 0x48
45 #define CPLD_CODE_VER_REG 0x50
47 #define MAGIC_NUMBER3_REG 0x58
49 #define MODULE_RESET_REG 0x60
51 #define MCU_BOARD_ID_REG 0x68
53 #define MXC_MAX_EXP_IO_LINES 16
56 #define EXPIO_INT_ENET 0
57 #define EXPIO_INT_XUART_A 1
58 #define EXPIO_INT_XUART_B 2
59 #define EXPIO_INT_BUTTON_A 3
60 #define EXPIO_INT_BUTTON_B 4
65 static struct resource smsc911x_resources[] = {
82 .platform_data = &smsc911x_config,
84 .num_resources =
ARRAY_SIZE(smsc911x_resources),
85 .resource = smsc911x_resources,
101 for (; int_valid != 0; int_valid >>= 1, expio_irq++) {
102 if ((int_valid & 1) == 0)
115 static void expio_mask_irq(
struct irq_data *
d)
125 static void expio_ack_irq(
struct irq_data *
d)
134 static void expio_unmask_irq(
struct irq_data *
d)
140 reg &= ~(1 << expio);
144 static struct irq_chip expio_irq_chip = {
145 .irq_ack = expio_ack_irq,
146 .irq_mask = expio_mask_irq,
147 .irq_unmask = expio_unmask_irq,
168 pr_info(
"3-Stack Debug board not detected\n");
174 pr_info(
"3-Stack Debug board detected, rev = 0x%04X\n",
201 irq_set_chained_handler(p_irq, mxc_expio_irq_handler);