aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-orion5x/rd88f5182-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/rd88f5182-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/rd88f5182-setup.c')
-rw-r--r--arch/arm/mach-orion5x/rd88f5182-setup.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index 62fd99fc664a..4496ed1cab73 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -241,11 +241,6 @@ static struct mv_sata_platform_data rd88f5182_sata_data = {
241/***************************************************************************** 241/*****************************************************************************
242 * General Setup 242 * General Setup
243 ****************************************************************************/ 243 ****************************************************************************/
244
245static struct platform_device *rd88f5182_devices[] __initdata = {
246 &rd88f5182_nor_flash,
247};
248
249static void __init rd88f5182_init(void) 244static void __init rd88f5182_init(void)
250{ 245{
251 /* 246 /*
@@ -254,13 +249,6 @@ static void __init rd88f5182_init(void)
254 orion5x_init(); 249 orion5x_init();
255 250
256 /* 251 /*
257 * Setup the CPU address decode windows for our devices
258 */
259 orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
260 RD88F5182_NOR_BOOT_SIZE);
261 orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
262
263 /*
264 * Open a special address decode windows for the PCIe WA. 252 * Open a special address decode windows for the PCIe WA.
265 */ 253 */
266 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, 254 orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE,
@@ -296,10 +284,23 @@ static void __init rd88f5182_init(void)
296 284
297 orion5x_gpio_set_valid_pins(0x000000fb); 285 orion5x_gpio_set_valid_pins(0x000000fb);
298 286
299 platform_add_devices(rd88f5182_devices, ARRAY_SIZE(rd88f5182_devices)); 287 /*
300 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1); 288 * Configure peripherals.
289 */
290 orion5x_ehci0_init();
291 orion5x_ehci1_init();
301 orion5x_eth_init(&rd88f5182_eth_data); 292 orion5x_eth_init(&rd88f5182_eth_data);
293 orion5x_i2c_init();
302 orion5x_sata_init(&rd88f5182_sata_data); 294 orion5x_sata_init(&rd88f5182_sata_data);
295 orion5x_uart0_init();
296
297 orion5x_setup_dev_boot_win(RD88F5182_NOR_BOOT_BASE,
298 RD88F5182_NOR_BOOT_SIZE);
299
300 orion5x_setup_dev1_win(RD88F5182_NOR_BASE, RD88F5182_NOR_SIZE);
301 platform_device_register(&rd88f5182_nor_flash);
302
303 i2c_register_board_info(0, &rd88f5182_i2c_rtc, 1);
303} 304}
304 305
305MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design") 306MACHINE_START(RD88F5182, "Marvell Orion-NAS Reference Design")