diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7722.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c index 1143fbf65fa..a3e159ef6df 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * SH7722 Setup | 2 | * SH7722 Setup |
3 | * | 3 | * |
4 | * Copyright (C) 2006 Paul Mundt | 4 | * Copyright (C) 2006 - 2007 Paul Mundt |
5 | * | 5 | * |
6 | * This file is subject to the terms and conditions of the GNU General Public | 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 | 7 | * License. See the file "COPYING" in the main directory of this archive |
@@ -10,6 +10,8 @@ | |||
10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/serial.h> | 12 | #include <linux/serial.h> |
13 | #include <linux/mm.h> | ||
14 | #include <asm/mmzone.h> | ||
13 | #include <asm/sci.h> | 15 | #include <asm/sci.h> |
14 | 16 | ||
15 | static struct plat_sci_port sci_platform_data[] = { | 17 | static struct plat_sci_port sci_platform_data[] = { |
@@ -42,7 +44,7 @@ static int __init sh7722_devices_setup(void) | |||
42 | } | 44 | } |
43 | __initcall(sh7722_devices_setup); | 45 | __initcall(sh7722_devices_setup); |
44 | 46 | ||
45 | static struct ipr_data sh7722_ipr_map[] = { | 47 | static struct ipr_data ipr_irq_table[] = { |
46 | /* IRQ, IPR-idx, shift, prio */ | 48 | /* IRQ, IPR-idx, shift, prio */ |
47 | { 16, 0, 12, 2 }, /* TMU0 */ | 49 | { 16, 0, 12, 2 }, /* TMU0 */ |
48 | { 17, 0, 8, 2 }, /* TMU1 */ | 50 | { 17, 0, 8, 2 }, /* TMU1 */ |
@@ -67,14 +69,25 @@ static unsigned long ipr_offsets[] = { | |||
67 | 0xa408002c, /* 11: IPRL */ | 69 | 0xa408002c, /* 11: IPRL */ |
68 | }; | 70 | }; |
69 | 71 | ||
70 | unsigned int map_ipridx_to_addr(int idx) | 72 | static struct ipr_desc ipr_irq_desc = { |
73 | .ipr_offsets = ipr_offsets, | ||
74 | .nr_offsets = ARRAY_SIZE(ipr_offsets), | ||
75 | |||
76 | .ipr_data = ipr_irq_table, | ||
77 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), | ||
78 | |||
79 | .chip = { | ||
80 | .name = "IPR-sh7722", | ||
81 | }, | ||
82 | }; | ||
83 | |||
84 | void __init init_IRQ_ipr(void) | ||
71 | { | 85 | { |
72 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | 86 | register_ipr_controller(&ipr_irq_desc); |
73 | return 0; | ||
74 | return ipr_offsets[idx]; | ||
75 | } | 87 | } |
76 | 88 | ||
77 | void __init init_IRQ_ipr(void) | 89 | void __init plat_mem_setup(void) |
78 | { | 90 | { |
79 | make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); | 91 | /* Register the URAM space as Node 1 */ |
92 | setup_bootmem_node(1, 0x055f0000, 0x05610000); | ||
80 | } | 93 | } |