4 * Copyright (C) 2006 Paul Mundt
5 * Copyright (C) 2007 Nobuhiro Iwamatsu
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
11 #include <linux/platform_device.h>
12 #include <linux/init.h>
13 #include <linux/serial.h>
16 static struct plat_sci_port sci_platform_data[] = {
18 .mapbase = 0xa4410000,
19 .flags = UPF_BOOT_AUTOCONF,
21 .irqs = { 56, 57, 59 },
23 .mapbase = 0xa4400000,
24 .flags = UPF_BOOT_AUTOCONF,
26 .irqs = { 52, 53, 55 },
32 static struct platform_device sci_device = {
36 .platform_data = sci_platform_data,
40 static struct platform_device *sh7705_devices[] __initdata = {
44 static int __init sh7705_devices_setup(void)
46 return platform_add_devices(sh7705_devices,
47 ARRAY_SIZE(sh7705_devices));
49 __initcall(sh7705_devices_setup);
51 static struct ipr_data ipr_irq_table[] = {
52 /* IRQ, IPR-idx, shift, priority */
53 { 16, 0, 12, 2 }, /* TMU0 TUNI*/
54 { 17, 0, 8, 2 }, /* TMU1 TUNI */
55 { 18, 0, 4, 2 }, /* TMU2 TUNI */
56 { 27, 1, 12, 2 }, /* WDT ITI */
57 { 20, 0, 0, 2 }, /* RTC ATI (alarm) */
58 { 21, 0, 0, 2 }, /* RTC PRI (period) */
59 { 22, 0, 0, 2 }, /* RTC CUI (carry) */
60 { 48, 4, 12, 7 }, /* DMAC DMTE0 */
61 { 49, 4, 12, 7 }, /* DMAC DMTE1 */
62 { 50, 4, 12, 7 }, /* DMAC DMTE2 */
63 { 51, 4, 12, 7 }, /* DMAC DMTE3 */
64 { 52, 4, 8, 3 }, /* SCIF0 ERI */
65 { 53, 4, 8, 3 }, /* SCIF0 RXI */
66 { 55, 4, 8, 3 }, /* SCIF0 TXI */
67 { 56, 4, 4, 3 }, /* SCIF1 ERI */
68 { 57, 4, 4, 3 }, /* SCIF1 RXI */
69 { 59, 4, 4, 3 }, /* SCIF1 TXI */
72 static unsigned long ipr_offsets[] = {
73 0xFFFFFEE2, /* 0: IPRA */
74 0xFFFFFEE4, /* 1: IPRB */
75 0xA4000016, /* 2: IPRC */
76 0xA4000018, /* 3: IPRD */
77 0xA400001A, /* 4: IPRE */
78 0xA4080000, /* 5: IPRF */
79 0xA4080002, /* 6: IPRG */
80 0xA4080004, /* 7: IPRH */
83 static struct ipr_desc ipr_irq_desc = {
84 .ipr_offsets = ipr_offsets,
85 .nr_offsets = ARRAY_SIZE(ipr_offsets),
87 .ipr_data = ipr_irq_table,
88 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
95 void __init plat_irq_setup(void)
97 register_ipr_controller(&ipr_irq_desc);