diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh2a/setup-sh7206.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c index 4ed9110632b..b6e3a6351fa 100644 --- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c +++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c | |||
@@ -57,7 +57,7 @@ static int __init sh7206_devices_setup(void) | |||
57 | } | 57 | } |
58 | __initcall(sh7206_devices_setup); | 58 | __initcall(sh7206_devices_setup); |
59 | 59 | ||
60 | static struct ipr_data sh7206_ipr_map[] = { | 60 | static struct ipr_data ipr_irq_table[] = { |
61 | { 140, 7, 12, 2 }, /* CMI0 */ | 61 | { 140, 7, 12, 2 }, /* CMI0 */ |
62 | { 164, 8, 4, 2 }, /* MTU2_TGI1A */ | 62 | { 164, 8, 4, 2 }, /* MTU2_TGI1A */ |
63 | { 240, 13, 12, 3 }, /* SCIF0_BRI */ | 63 | { 240, 13, 12, 3 }, /* SCIF0_BRI */ |
@@ -78,7 +78,7 @@ static struct ipr_data sh7206_ipr_map[] = { | |||
78 | { 255, 13, 0, 3 }, /* SCIF3_TXI */ | 78 | { 255, 13, 0, 3 }, /* SCIF3_TXI */ |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static unsigned int ipr_offsets[] = { | 81 | static unsigned long ipr_offsets[] = { |
82 | 0xfffe0818, /* IPR01 */ | 82 | 0xfffe0818, /* IPR01 */ |
83 | 0xfffe081a, /* IPR02 */ | 83 | 0xfffe081a, /* IPR02 */ |
84 | 0, /* unused */ | 84 | 0, /* unused */ |
@@ -95,15 +95,19 @@ static unsigned int ipr_offsets[] = { | |||
95 | 0xfffe0c10, /* IPR14 */ | 95 | 0xfffe0c10, /* IPR14 */ |
96 | }; | 96 | }; |
97 | 97 | ||
98 | /* given the IPR index return the address of the IPR register */ | 98 | static struct ipr_desc ipr_irq_desc = { |
99 | unsigned int map_ipridx_to_addr(int idx) | 99 | .ipr_offsets = ipr_offsets, |
100 | { | 100 | .nr_offsets = ARRAY_SIZE(ipr_offsets), |
101 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | 101 | |
102 | return 0; | 102 | .ipr_data = ipr_irq_table, |
103 | return ipr_offsets[idx]; | 103 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), |
104 | } | 104 | |
105 | .chip = { | ||
106 | .name = "IPR-sh7206", | ||
107 | }, | ||
108 | }; | ||
105 | 109 | ||
106 | void __init init_IRQ_ipr(void) | 110 | void __init init_IRQ_ipr(void) |
107 | { | 111 | { |
108 | make_ipr_irq(sh7206_ipr_map, ARRAY_SIZE(sh7206_ipr_map)); | 112 | register_ipr_controller(&ipr_irq_desc); |
109 | } | 113 | } |