4 * Copyright (C) 2006 - 2007 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>
16 static struct plat_sci_port sci_platform_data[] = {
18 .mapbase = 0xffe00000,
19 .flags = UPF_BOOT_AUTOCONF,
21 .irqs = { 80, 81, 83, 82 },
27 static struct platform_device sci_device = {
31 .platform_data = sci_platform_data,
35 static struct platform_device *sh7722_devices[] __initdata = {
39 static int __init sh7722_devices_setup(void)
41 return platform_add_devices(sh7722_devices,
42 ARRAY_SIZE(sh7722_devices));
44 __initcall(sh7722_devices_setup);
46 static struct ipr_data sh7722_ipr_map[] = {
47 /* IRQ, IPR-idx, shift, prio */
48 { 16, 0, 12, 2 }, /* TMU0 */
49 { 17, 0, 8, 2 }, /* TMU1 */
50 { 80, 6, 12, 3 }, /* SCIF ERI */
51 { 81, 6, 12, 3 }, /* SCIF RXI */
52 { 82, 6, 12, 3 }, /* SCIF BRI */
53 { 83, 6, 12, 3 }, /* SCIF TXI */
56 static unsigned long ipr_offsets[] = {
57 0xa4080000, /* 0: IPRA */
58 0xa4080004, /* 1: IPRB */
59 0xa4080008, /* 2: IPRC */
60 0xa408000c, /* 3: IPRD */
61 0xa4080010, /* 4: IPRE */
62 0xa4080014, /* 5: IPRF */
63 0xa4080018, /* 6: IPRG */
64 0xa408001c, /* 7: IPRH */
65 0xa4080020, /* 8: IPRI */
66 0xa4080024, /* 9: IPRJ */
67 0xa4080028, /* 10: IPRK */
68 0xa408002c, /* 11: IPRL */
71 unsigned int map_ipridx_to_addr(int idx)
73 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets)))
75 return ipr_offsets[idx];
78 void __init init_IRQ_ipr(void)
80 make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map));
83 void __init plat_mem_setup(void)
85 /* Register the URAM space as Node 1 */
86 setup_bootmem_node(1, 0x055f0000, 0x05610000);