diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-10-02 09:02:07 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-10-02 09:02:07 -0400 |
commit | 4bacd796ccd6976b03dd490708a1abc291d5521e (patch) | |
tree | 0c0c1d242940e9fdf83952a821a20e2bdcdf0927 /arch/sh/boards/mach-x3proto | |
parent | 742759eae6b58a172d8f79ff0938d1e25dc9abc5 (diff) |
sh: Support early IRQ vector map reservation for delayed controllers.
Some controllers will need to be initialized lazily due to pinmux
constraints, while others may simply have no need to be brought online if
there are no backing devices for them attached. In this case it's still
necessary to be able to reserve their hardware vector map before dynamic
IRQs get a hold of them.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/mach-x3proto')
-rw-r--r-- | arch/sh/boards/mach-x3proto/setup.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/arch/sh/boards/mach-x3proto/setup.c b/arch/sh/boards/mach-x3proto/setup.c index 102bf56befb4..21f1bb67248e 100644 --- a/arch/sh/boards/mach-x3proto/setup.c +++ b/arch/sh/boards/mach-x3proto/setup.c | |||
@@ -129,8 +129,22 @@ static struct platform_device *x3proto_devices[] __initdata = { | |||
129 | &m66592_usb_peripheral_device, | 129 | &m66592_usb_peripheral_device, |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static void __init x3proto_init_irq(void) | ||
133 | { | ||
134 | plat_irq_setup_pins(IRQ_MODE_IRL3210); | ||
135 | |||
136 | /* Set ICR0.LVLMODE */ | ||
137 | __raw_writel(__raw_readl(0xfe410000) | (1 << 21), 0xfe410000); | ||
138 | } | ||
139 | |||
132 | static int __init x3proto_devices_setup(void) | 140 | static int __init x3proto_devices_setup(void) |
133 | { | 141 | { |
142 | /* | ||
143 | * IRLs are only needed for ILSEL mappings, so flip over the INTC | ||
144 | * pins at a later point to enable the GPIOs to settle. | ||
145 | */ | ||
146 | x3proto_init_irq(); | ||
147 | |||
134 | r8a66597_usb_host_resources[1].start = | 148 | r8a66597_usb_host_resources[1].start = |
135 | r8a66597_usb_host_resources[1].end = ilsel_enable(ILSEL_USBH_I); | 149 | r8a66597_usb_host_resources[1].end = ilsel_enable(ILSEL_USBH_I); |
136 | 150 | ||
@@ -145,14 +159,6 @@ static int __init x3proto_devices_setup(void) | |||
145 | } | 159 | } |
146 | device_initcall(x3proto_devices_setup); | 160 | device_initcall(x3proto_devices_setup); |
147 | 161 | ||
148 | static void __init x3proto_init_irq(void) | ||
149 | { | ||
150 | plat_irq_setup_pins(IRQ_MODE_IRL3210); | ||
151 | |||
152 | /* Set ICR0.LVLMODE */ | ||
153 | __raw_writel(__raw_readl(0xfe410000) | (1 << 21), 0xfe410000); | ||
154 | } | ||
155 | |||
156 | static void __init x3proto_setup(char **cmdline_p) | 162 | static void __init x3proto_setup(char **cmdline_p) |
157 | { | 163 | { |
158 | register_smp_ops(&shx3_smp_ops); | 164 | register_smp_ops(&shx3_smp_ops); |
@@ -161,5 +167,4 @@ static void __init x3proto_setup(char **cmdline_p) | |||
161 | static struct sh_machine_vector mv_x3proto __initmv = { | 167 | static struct sh_machine_vector mv_x3proto __initmv = { |
162 | .mv_name = "x3proto", | 168 | .mv_name = "x3proto", |
163 | .mv_setup = x3proto_setup, | 169 | .mv_setup = x3proto_setup, |
164 | .mv_init_irq = x3proto_init_irq, | ||
165 | }; | 170 | }; |