4 * Copyright (C) 2006 Paul Mundt
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
10 #include <linux/platform_device.h>
11 #include <linux/init.h>
12 #include <linux/serial.h>
15 static struct resource rtc_resources[] = {
18 .end = 0xffe80000 + 0x58 - 1,
19 .flags = IORESOURCE_IO,
24 .flags = IORESOURCE_IRQ,
29 .flags = IORESOURCE_IRQ,
34 .flags = IORESOURCE_IRQ,
38 static struct platform_device rtc_device = {
41 .num_resources = ARRAY_SIZE(rtc_resources),
42 .resource = rtc_resources,
45 static struct plat_sci_port sci_platform_data[] = {
47 .mapbase = 0xffe00000,
48 .flags = UPF_BOOT_AUTOCONF,
50 .irqs = { 40, 41, 43, 42 },
52 .mapbase = 0xffe10000,
53 .flags = UPF_BOOT_AUTOCONF,
55 .irqs = { 76, 77, 79, 78 },
61 static struct platform_device sci_device = {
65 .platform_data = sci_platform_data,
69 static struct platform_device *sh7780_devices[] __initdata = {
74 static int __init sh7780_devices_setup(void)
76 return platform_add_devices(sh7780_devices,
77 ARRAY_SIZE(sh7780_devices));
79 __initcall(sh7780_devices_setup);
81 static struct intc2_data intc2_irq_table[] = {
82 { 28, 0, 24, 0, 0, 2 }, /* TMU0 */
84 { 21, 1, 0, 0, 2, 2 },
85 { 22, 1, 1, 0, 2, 2 },
86 { 23, 1, 2, 0, 2, 2 },
88 { 40, 8, 24, 0, 3, 3 }, /* SCIF0 ERI */
89 { 41, 8, 24, 0, 3, 3 }, /* SCIF0 RXI */
90 { 42, 8, 24, 0, 3, 3 }, /* SCIF0 BRI */
91 { 43, 8, 24, 0, 3, 3 }, /* SCIF0 TXI */
93 { 76, 8, 16, 0, 4, 3 }, /* SCIF1 ERI */
94 { 77, 8, 16, 0, 4, 3 }, /* SCIF1 RXI */
95 { 78, 8, 16, 0, 4, 3 }, /* SCIF1 BRI */
96 { 79, 8, 16, 0, 4, 3 }, /* SCIF1 TXI */
98 { 64, 0x10, 8, 0, 14, 2 }, /* PCIC0 */
99 { 65, 0x10, 0, 0, 15, 2 }, /* PCIC1 */
100 { 66, 0x14, 24, 0, 16, 2 }, /* PCIC2 */
101 { 67, 0x14, 16, 0, 17, 2 }, /* PCIC3 */
102 { 68, 0x14, 8, 0, 18, 2 }, /* PCIC4 */
105 static struct intc2_desc intc2_irq_desc __read_mostly = {
106 .prio_base = 0xffd40000,
107 .msk_base = 0xffd40038,
108 .mskclr_base = 0xffd4003c,
110 .intc2_data = intc2_irq_table,
111 .nr_irqs = ARRAY_SIZE(intc2_irq_table),
114 .name = "INTC2-sh7780",
118 void __init init_IRQ_intc2(void)
120 register_intc2_controller(&intc2_irq_desc);