aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/sh03/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/sh03/setup.c')
-rw-r--r--arch/sh/boards/sh03/setup.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index c069c444b4ec..9c031a8c0a1c 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -15,17 +15,33 @@
15#include <asm/sh03/sh03.h> 15#include <asm/sh03/sh03.h>
16#include <asm/addrspace.h> 16#include <asm/addrspace.h>
17 17
18static struct ipr_data sh03_ipr_map[] = { 18static struct ipr_data ipr_irq_table[] = {
19 { IRL0_IRQ, IRL0_IPR_ADDR, IRL0_IPR_POS, IRL0_PRIORITY }, 19 { IRL0_IRQ, 0, IRL0_IPR_POS, IRL0_PRIORITY },
20 { IRL1_IRQ, IRL1_IPR_ADDR, IRL1_IPR_POS, IRL1_PRIORITY }, 20 { IRL1_IRQ, 0, IRL1_IPR_POS, IRL1_PRIORITY },
21 { IRL2_IRQ, IRL2_IPR_ADDR, IRL2_IPR_POS, IRL2_PRIORITY }, 21 { IRL2_IRQ, 0, IRL2_IPR_POS, IRL2_PRIORITY },
22 { IRL3_IRQ, IRL3_IPR_ADDR, IRL3_IPR_POS, IRL3_PRIORITY }, 22 { IRL3_IRQ, 0, IRL3_IPR_POS, IRL3_PRIORITY },
23};
24
25static unsigned long ipr_offsets[] = {
26 INTC_IPRD,
27};
28
29static struct ipr_desc ipr_irq_desc = {
30 .ipr_offsets = ipr_offsets,
31 .nr_offsets = ARRAY_SIZE(ipr_offsets),
32
33 .ipr_data = ipr_irq_table,
34 .nr_irqs = ARRAY_SIZE(ipr_irq_table),
35
36 .chip = {
37 .name = "IPR-sh03",
38 },
23}; 39};
24 40
25static void __init init_sh03_IRQ(void) 41static void __init init_sh03_IRQ(void)
26{ 42{
27 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR); 43 ctrl_outw(ctrl_inw(INTC_ICR) | INTC_ICR_IRLM, INTC_ICR);
28 make_ipr_irq(sh03_ipr_map, ARRAY_SIZE(sh03_ipr_map)); 44 register_ipr_controller(&ipr_irq_desc);
29} 45}
30 46
31extern void *cf_io_base; 47extern void *cf_io_base;
@@ -74,11 +90,10 @@ static int __init sh03_devices_setup(void)
74} 90}
75__initcall(sh03_devices_setup); 91__initcall(sh03_devices_setup);
76 92
77struct sh_machine_vector mv_sh03 __initmv = { 93static struct sh_machine_vector mv_sh03 __initmv = {
78 .mv_name = "Interface (CTP/PCI-SH03)", 94 .mv_name = "Interface (CTP/PCI-SH03)",
79 .mv_setup = sh03_setup, 95 .mv_setup = sh03_setup,
80 .mv_nr_irqs = 48, 96 .mv_nr_irqs = 48,
81 .mv_ioport_map = sh03_ioport_map, 97 .mv_ioport_map = sh03_ioport_map,
82 .mv_init_irq = init_sh03_IRQ, 98 .mv_init_irq = init_sh03_IRQ,
83}; 99};
84ALIAS_MV(sh03)