diff options
Diffstat (limited to 'arch/sh/kernel/cpu/sh2/setup-sh7619.c')
-rw-r--r-- | arch/sh/kernel/cpu/sh2/setup-sh7619.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c index f83ff8a68f35..1a107fe22dde 100644 --- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c +++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c | |||
@@ -52,7 +52,7 @@ static int __init sh7619_devices_setup(void) | |||
52 | } | 52 | } |
53 | __initcall(sh7619_devices_setup); | 53 | __initcall(sh7619_devices_setup); |
54 | 54 | ||
55 | static struct ipr_data sh7619_ipr_map[] = { | 55 | static struct ipr_data ipr_irq_table[] = { |
56 | { 86, 0, 4, 2 }, /* CMI0 */ | 56 | { 86, 0, 4, 2 }, /* CMI0 */ |
57 | { 88, 1, 12, 3 }, /* SCIF0_ERI */ | 57 | { 88, 1, 12, 3 }, /* SCIF0_ERI */ |
58 | { 89, 1, 12, 3 }, /* SCIF0_RXI */ | 58 | { 89, 1, 12, 3 }, /* SCIF0_RXI */ |
@@ -68,7 +68,7 @@ static struct ipr_data sh7619_ipr_map[] = { | |||
68 | { 99, 1, 4, 3 }, /* SCIF2_TXI */ | 68 | { 99, 1, 4, 3 }, /* SCIF2_TXI */ |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static unsigned int ipr_offsets[] = { | 71 | static unsigned long ipr_offsets[] = { |
72 | 0xf8080000, /* IPRC */ | 72 | 0xf8080000, /* IPRC */ |
73 | 0xf8080002, /* IPRD */ | 73 | 0xf8080002, /* IPRD */ |
74 | 0xf8080004, /* IPRE */ | 74 | 0xf8080004, /* IPRE */ |
@@ -76,15 +76,19 @@ static unsigned int ipr_offsets[] = { | |||
76 | 0xf8080008, /* IPRG */ | 76 | 0xf8080008, /* IPRG */ |
77 | }; | 77 | }; |
78 | 78 | ||
79 | /* given the IPR index return the address of the IPR register */ | 79 | static struct ipr_desc ipr_irq_desc = { |
80 | unsigned int map_ipridx_to_addr(int idx) | 80 | .ipr_offsets = ipr_offsets, |
81 | { | 81 | .nr_offsets = ARRAY_SIZE(ipr_offsets), |
82 | if (unlikely(idx >= ARRAY_SIZE(ipr_offsets))) | 82 | |
83 | return 0; | 83 | .ipr_data = ipr_irq_table, |
84 | return ipr_offsets[idx]; | 84 | .nr_irqs = ARRAY_SIZE(ipr_irq_table), |
85 | } | 85 | |
86 | .chip = { | ||
87 | .name = "IPR-sh7619", | ||
88 | }, | ||
89 | }; | ||
86 | 90 | ||
87 | void __init init_IRQ_ipr(void) | 91 | void __init init_IRQ_ipr(void) |
88 | { | 92 | { |
89 | make_ipr_irq(sh7619_ipr_map, ARRAY_SIZE(sh7619_ipr_map)); | 93 | register_ipr_controller(&ipr_irq_desc); |
90 | } | 94 | } |