14 #define pr_fmt(fmt) "SPEAr310: " fmt
22 #include <mach/generic.h>
23 #include <mach/spear.h>
25 #define SPEAR310_UART1_BASE UL(0xB2000000)
26 #define SPEAR310_UART2_BASE UL(0xB2080000)
27 #define SPEAR310_UART3_BASE UL(0xB2100000)
28 #define SPEAR310_UART4_BASE UL(0xB2180000)
29 #define SPEAR310_UART5_BASE UL(0xB2200000)
30 #define SPEAR310_SOC_CONFIG_BASE UL(0xB4000000)
33 #define SPEAR310_INT_STS_MASK_REG 0x04
34 #define SPEAR310_SMII0_IRQ_MASK (1 << 0)
35 #define SPEAR310_SMII1_IRQ_MASK (1 << 1)
36 #define SPEAR310_SMII2_IRQ_MASK (1 << 2)
37 #define SPEAR310_SMII3_IRQ_MASK (1 << 3)
38 #define SPEAR310_WAKEUP_SMII0_IRQ_MASK (1 << 4)
39 #define SPEAR310_WAKEUP_SMII1_IRQ_MASK (1 << 5)
40 #define SPEAR310_WAKEUP_SMII2_IRQ_MASK (1 << 6)
41 #define SPEAR310_WAKEUP_SMII3_IRQ_MASK (1 << 7)
42 #define SPEAR310_UART1_IRQ_MASK (1 << 8)
43 #define SPEAR310_UART2_IRQ_MASK (1 << 9)
44 #define SPEAR310_UART3_IRQ_MASK (1 << 10)
45 #define SPEAR310_UART4_IRQ_MASK (1 << 11)
46 #define SPEAR310_UART5_IRQ_MASK (1 << 12)
47 #define SPEAR310_EMI_IRQ_MASK (1 << 13)
48 #define SPEAR310_TDM_HDLC_IRQ_MASK (1 << 14)
49 #define SPEAR310_RS485_0_IRQ_MASK (1 << 15)
50 #define SPEAR310_RS485_1_IRQ_MASK (1 << 16)
52 #define SPEAR310_SHIRQ_RAS1_MASK 0x000FF
53 #define SPEAR310_SHIRQ_RAS2_MASK 0x01F00
54 #define SPEAR310_SHIRQ_RAS3_MASK 0x02000
55 #define SPEAR310_SHIRQ_INTRCOMM_RAS_MASK 0x1C000
59 #define SPEAR310_VIRQ_SMII0 (SPEAR3XX_VIRQ_START + 0)
60 #define SPEAR310_VIRQ_SMII1 (SPEAR3XX_VIRQ_START + 1)
61 #define SPEAR310_VIRQ_SMII2 (SPEAR3XX_VIRQ_START + 2)
62 #define SPEAR310_VIRQ_SMII3 (SPEAR3XX_VIRQ_START + 3)
63 #define SPEAR310_VIRQ_WAKEUP_SMII0 (SPEAR3XX_VIRQ_START + 4)
64 #define SPEAR310_VIRQ_WAKEUP_SMII1 (SPEAR3XX_VIRQ_START + 5)
65 #define SPEAR310_VIRQ_WAKEUP_SMII2 (SPEAR3XX_VIRQ_START + 6)
66 #define SPEAR310_VIRQ_WAKEUP_SMII3 (SPEAR3XX_VIRQ_START + 7)
69 #define SPEAR310_VIRQ_UART1 (SPEAR3XX_VIRQ_START + 8)
70 #define SPEAR310_VIRQ_UART2 (SPEAR3XX_VIRQ_START + 9)
71 #define SPEAR310_VIRQ_UART3 (SPEAR3XX_VIRQ_START + 10)
72 #define SPEAR310_VIRQ_UART4 (SPEAR3XX_VIRQ_START + 11)
73 #define SPEAR310_VIRQ_UART5 (SPEAR3XX_VIRQ_START + 12)
76 #define SPEAR310_VIRQ_EMI (SPEAR3XX_VIRQ_START + 13)
77 #define SPEAR310_VIRQ_PLGPIO (SPEAR3XX_VIRQ_START + 14)
80 #define SPEAR310_VIRQ_TDM_HDLC (SPEAR3XX_VIRQ_START + 15)
81 #define SPEAR310_VIRQ_RS485_0 (SPEAR3XX_VIRQ_START + 16)
82 #define SPEAR310_VIRQ_RS485_1 (SPEAR3XX_VIRQ_START + 17)
116 .dev_config = shirq_ras1_config,
147 .dev_config = shirq_ras2_config,
166 .dev_config = shirq_ras3_config,
191 .dev_config = shirq_intrcomm_ras_config,
192 .dev_count =
ARRAY_SIZE(shirq_intrcomm_ras_config),
204 .bus_id =
"uart0_rx",
210 .bus_id =
"uart0_tx",
258 .bus_id =
"from_jpeg",
264 .bus_id =
"uart1_rx",
270 .bus_id =
"uart1_tx",
276 .bus_id =
"uart2_rx",
282 .bus_id =
"uart2_tx",
288 .bus_id =
"uart3_rx",
294 .bus_id =
"uart3_tx",
300 .bus_id =
"uart4_rx",
306 .bus_id =
"uart4_tx",
312 .bus_id =
"uart5_rx",
318 .bus_id =
"uart5_tx",
366 .dma_tx_param =
"uart1_tx",
367 .dma_rx_param =
"uart1_rx",
370 .dma_tx_param =
"uart2_tx",
371 .dma_rx_param =
"uart2_rx",
374 .dma_tx_param =
"uart3_tx",
375 .dma_rx_param =
"uart3_rx",
378 .dma_tx_param =
"uart4_tx",
379 .dma_rx_param =
"uart4_rx",
382 .dma_tx_param =
"uart5_tx",
383 .dma_rx_param =
"uart5_rx",
388 static struct of_dev_auxdata spear310_auxdata_lookup[]
__initdata = {
394 &spear310_uart_data[0]),
396 &spear310_uart_data[1]),
398 &spear310_uart_data[2]),
400 &spear310_uart_data[3]),
402 &spear310_uart_data[4]),
406 static void __init spear310_dt_init(
void)
415 spear310_auxdata_lookup,
NULL);
421 shirq_ras1.
regs.base = base;
424 pr_err(
"Error registering Shared IRQ 1\n");
427 shirq_ras2.
regs.base = base;
430 pr_err(
"Error registering Shared IRQ 2\n");
433 shirq_ras3.
regs.base = base;
436 pr_err(
"Error registering Shared IRQ 3\n");
439 shirq_intrcomm_ras.
regs.base = base;
442 pr_err(
"Error registering Shared IRQ 4\n");
446 static const char *
const spear310_dt_board_compat[] = {
452 static void __init spear310_map_io(
void)
458 .map_io = spear310_map_io,
462 .init_machine = spear310_dt_init,
464 .dt_compat = spear310_dt_board_compat,