diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2008-04-21 23:37:12 -0400 |
---|---|---|
committer | Lennert Buytenhek <buytenh@marvell.com> | 2008-06-22 16:44:45 -0400 |
commit | 044f6c7c449ae8ba0353b032706b098a7ad5e304 (patch) | |
tree | 527bebfce6634c7d24a9521272142c67be182679 /arch/arm/mach-orion5x/kurobox_pro-setup.c | |
parent | 6eef84a5496c678ab27b72bec0fc785c9cee063b (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/kurobox_pro-setup.c')
-rw-r--r-- | arch/arm/mach-orion5x/kurobox_pro-setup.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index 60fcbf1e5d72..10d9fc2ef11a 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -188,13 +188,6 @@ static void __init kurobox_pro_init(void) | |||
188 | orion5x_init(); | 188 | orion5x_init(); |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * Setup the CPU address decode windows for our devices | ||
192 | */ | ||
193 | orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE, | ||
194 | KUROBOX_PRO_NOR_BOOT_SIZE); | ||
195 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, KUROBOX_PRO_NAND_SIZE); | ||
196 | |||
197 | /* | ||
198 | * Open a special address decode windows for the PCIe WA. | 191 | * Open a special address decode windows for the PCIe WA. |
199 | */ | 192 | */ |
200 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, | 193 | orion5x_setup_pcie_wa_win(ORION5X_PCIE_WA_PHYS_BASE, |
@@ -221,12 +214,27 @@ static void __init kurobox_pro_init(void) | |||
221 | 214 | ||
222 | orion5x_gpio_set_valid_pins(0x0000000c); | 215 | orion5x_gpio_set_valid_pins(0x0000000c); |
223 | 216 | ||
217 | /* | ||
218 | * Configure peripherals. | ||
219 | */ | ||
220 | orion5x_ehci0_init(); | ||
221 | orion5x_ehci1_init(); | ||
222 | orion5x_eth_init(&kurobox_pro_eth_data); | ||
223 | orion5x_i2c_init(); | ||
224 | orion5x_sata_init(&kurobox_pro_sata_data); | ||
225 | orion5x_uart0_init(); | ||
226 | |||
227 | orion5x_setup_dev_boot_win(KUROBOX_PRO_NOR_BOOT_BASE, | ||
228 | KUROBOX_PRO_NOR_BOOT_SIZE); | ||
224 | platform_device_register(&kurobox_pro_nor_flash); | 229 | platform_device_register(&kurobox_pro_nor_flash); |
225 | if (machine_is_kurobox_pro()) | 230 | |
231 | if (machine_is_kurobox_pro()) { | ||
232 | orion5x_setup_dev0_win(KUROBOX_PRO_NAND_BASE, | ||
233 | KUROBOX_PRO_NAND_SIZE); | ||
226 | platform_device_register(&kurobox_pro_nand_flash); | 234 | platform_device_register(&kurobox_pro_nand_flash); |
235 | } | ||
236 | |||
227 | i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); | 237 | i2c_register_board_info(0, &kurobox_pro_i2c_rtc, 1); |
228 | orion5x_eth_init(&kurobox_pro_eth_data); | ||
229 | orion5x_sata_init(&kurobox_pro_sata_data); | ||
230 | } | 238 | } |
231 | 239 | ||
232 | #ifdef CONFIG_MACH_KUROBOX_PRO | 240 | #ifdef CONFIG_MACH_KUROBOX_PRO |