aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/dns323-setup.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-04-21 23:37:12 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-06-22 16:44:45 -0400
commit044f6c7c449ae8ba0353b032706b098a7ad5e304 (patch)
tree527bebfce6634c7d24a9521272142c67be182679 /arch/arm/mach-orion5x/dns323-setup.c
parent6eef84a5496c678ab27b72bec0fc785c9cee063b (diff)
[ARM] Orion: move EHCI/I2C/UART peripheral init into board code
This patch moves initialisation of EHCI/I2C/UART platform devices from the common orion5x_init() into the board support code. The rationale behind this is that only the board support code knows whether certain peripherals have been brought out on the board, and not initialising peripherals that haven't been brought out is desirable for example: - to reduce user confusion (e.g. seeing both 'eth0' and 'eth1' appear while there is only one ethernet port on the board); and - to allow for future power savings (peripherals that have not been brought out can be clock gated off entirely). Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Russell King <linux@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-orion5x/dns323-setup.c')
-rw-r--r--arch/arm/mach-orion5x/dns323-setup.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index ec53f866ed11..cd200f766099 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -213,12 +213,6 @@ static struct platform_device dns323_button_device = {
213 * General Setup 213 * General Setup
214 */ 214 */
215 215
216static struct platform_device *dns323_plat_devices[] __initdata = {
217 &dns323_nor_flash,
218 &dns323_gpio_leds,
219 &dns323_button_device,
220};
221
222/* 216/*
223 * On the DNS-323 the following devices are attached via I2C: 217 * On the DNS-323 the following devices are attached via I2C:
224 * 218 *
@@ -253,11 +247,6 @@ static void __init dns323_init(void)
253 /* Setup basic Orion functions. Need to be called early. */ 247 /* Setup basic Orion functions. Need to be called early. */
254 orion5x_init(); 248 orion5x_init();
255 249
256 /* setup flash mapping
257 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
258 */
259 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
260
261 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe 250 /* DNS-323 has a Marvell 88X7042 SATA controller attached via PCIe
262 * 251 *
263 * Open a special address decode windows for the PCIe WA. 252 * Open a special address decode windows for the PCIe WA.
@@ -294,21 +283,32 @@ static void __init dns323_init(void)
294 */ 283 */
295 orion5x_gpio_set_valid_pins(0x07f6); 284 orion5x_gpio_set_valid_pins(0x07f6);
296 285
297 /* register dns323 specific power-off method */ 286 /*
298 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 || 287 * Configure peripherals.
299 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0) 288 */
300 pr_err("DNS323: failed to setup power-off GPIO\n"); 289 orion5x_ehci0_init();
290 orion5x_eth_init(&dns323_eth_data);
291 orion5x_i2c_init();
292 orion5x_uart0_init();
301 293
302 pm_power_off = dns323_power_off; 294 /* setup flash mapping
295 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
296 */
297 orion5x_setup_dev_boot_win(DNS323_NOR_BOOT_BASE, DNS323_NOR_BOOT_SIZE);
298 platform_device_register(&dns323_nor_flash);
299
300 platform_device_register(&dns323_gpio_leds);
303 301
304 /* register flash and other platform devices */ 302 platform_device_register(&dns323_button_device);
305 platform_add_devices(dns323_plat_devices,
306 ARRAY_SIZE(dns323_plat_devices));
307 303
308 i2c_register_board_info(0, dns323_i2c_devices, 304 i2c_register_board_info(0, dns323_i2c_devices,
309 ARRAY_SIZE(dns323_i2c_devices)); 305 ARRAY_SIZE(dns323_i2c_devices));
310 306
311 orion5x_eth_init(&dns323_eth_data); 307 /* register dns323 specific power-off method */
308 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
309 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
310 pr_err("DNS323: failed to setup power-off GPIO\n");
311 pm_power_off = dns323_power_off;
312} 312}
313 313
314/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */ 314/* Warning: D-Link uses a wrong mach-type (=526) in their bootloader */