aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7722.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7722.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
index fa07fab4797f..a3e159ef6dfe 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
@@ -44,7 +44,7 @@ static int __init sh7722_devices_setup(void)
44} 44}
45__initcall(sh7722_devices_setup); 45__initcall(sh7722_devices_setup);
46 46
47static struct ipr_data sh7722_ipr_map[] = { 47static struct ipr_data ipr_irq_table[] = {
48 /* IRQ, IPR-idx, shift, prio */ 48 /* IRQ, IPR-idx, shift, prio */
49 { 16, 0, 12, 2 }, /* TMU0 */ 49 { 16, 0, 12, 2 }, /* TMU0 */
50 { 17, 0, 8, 2 }, /* TMU1 */ 50 { 17, 0, 8, 2 }, /* TMU1 */
@@ -69,16 +69,21 @@ static unsigned long ipr_offsets[] = {
69 0xa408002c, /* 11: IPRL */ 69 0xa408002c, /* 11: IPRL */
70}; 70};
71 71
72unsigned int map_ipridx_to_addr(int idx) 72static struct ipr_desc ipr_irq_desc = {
73{ 73 .ipr_offsets = ipr_offsets,
74 if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) 74 .nr_offsets = ARRAY_SIZE(ipr_offsets),
75 return 0; 75
76 return ipr_offsets[idx]; 76 .ipr_data = ipr_irq_table,
77} 77 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
78
79 .chip = {
80 .name = "IPR-sh7722",
81 },
82};
78 83
79void __init init_IRQ_ipr(void) 84void __init init_IRQ_ipr(void)
80{ 85{
81 make_ipr_irq(sh7722_ipr_map, ARRAY_SIZE(sh7722_ipr_map)); 86 register_ipr_controller(&ipr_irq_desc);
82} 87}
83 88
84void __init plat_mem_setup(void) 89void __init plat_mem_setup(void)