diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-02 17:25:02 -0500 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-16 15:46:12 -0400 |
commit | 7734fed8988d9c563e88f50e48c7b808ce3ab3e5 (patch) | |
tree | 5ded6306e120511f9ef92acaf71b520c09c66306 /arch/arm/mach-ux500/board-mop500.c | |
parent | 2d334297c6b816619d6c2c28bccec3b5a7e8a0d9 (diff) |
ARM: ux500: combine the board init functions for DT boot
This lets us move over evertything to device tree one by one.
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500.c')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 57 |
1 files changed, 51 insertions, 6 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 0fb5dfd2ce54..e2932fcba75e 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c | |||
@@ -745,12 +745,57 @@ MACHINE_END | |||
745 | #ifdef CONFIG_MACH_UX500_DT | 745 | #ifdef CONFIG_MACH_UX500_DT |
746 | static void __init u8500_init_machine(void) | 746 | static void __init u8500_init_machine(void) |
747 | { | 747 | { |
748 | if (of_machine_is_compatible("calaosystems,snowball-a9500")) | 748 | struct device *parent = NULL; |
749 | return snowball_init_machine(); | 749 | int i2c0_devs; |
750 | else if (of_machine_is_compatible("st-ericsson,hrefv60+")) | 750 | int i; |
751 | return hrefv60_init_machine(); | 751 | |
752 | else if (of_machine_is_compatible("st-ericsson,mop500")) | 752 | parent = u8500_init_devices(); |
753 | return mop500_init_machine(); | 753 | i2c0_devs = ARRAY_SIZE(mop500_i2c0_devices); |
754 | |||
755 | for (i = 0; i < ARRAY_SIZE(mop500_platform_devs); i++) | ||
756 | mop500_platform_devs[i]->dev.parent = parent; | ||
757 | for (i = 0; i < ARRAY_SIZE(snowball_platform_devs); i++) | ||
758 | snowball_platform_devs[i]->dev.parent = parent; | ||
759 | |||
760 | |||
761 | if (of_machine_is_compatible("st-ericsson,mop500")) { | ||
762 | mop500_gpio_keys[0].gpio = GPIO_PROX_SENSOR; | ||
763 | mop500_pins_init(); | ||
764 | |||
765 | platform_add_devices(mop500_platform_devs, | ||
766 | ARRAY_SIZE(mop500_platform_devs)); | ||
767 | |||
768 | mop500_sdi_init(parent); | ||
769 | } else if (of_machine_is_compatible("calaosystems,snowball-a9500")) { | ||
770 | snowball_pins_init(); | ||
771 | platform_add_devices(snowball_platform_devs, | ||
772 | ARRAY_SIZE(snowball_platform_devs)); | ||
773 | |||
774 | snowball_sdi_init(parent); | ||
775 | } else if (of_machine_is_compatible("st-ericsson,hrefv60+")) { | ||
776 | /* | ||
777 | * The HREFv60 board removed a GPIO expander and routed | ||
778 | * all these GPIO pins to the internal GPIO controller | ||
779 | * instead. | ||
780 | */ | ||
781 | mop500_gpio_keys[0].gpio = HREFV60_PROX_SENSE_GPIO; | ||
782 | i2c0_devs -= NUM_PRE_V60_I2C0_DEVICES; | ||
783 | hrefv60_pins_init(); | ||
784 | platform_add_devices(mop500_platform_devs, | ||
785 | ARRAY_SIZE(mop500_platform_devs)); | ||
786 | |||
787 | hrefv60_sdi_init(parent); | ||
788 | } | ||
789 | mop500_i2c_init(parent); | ||
790 | mop500_spi_init(parent); | ||
791 | mop500_uart_init(parent); | ||
792 | |||
793 | i2c_register_board_info(0, mop500_i2c0_devices, i2c0_devs); | ||
794 | i2c_register_board_info(2, mop500_i2c2_devices, | ||
795 | ARRAY_SIZE(mop500_i2c2_devices)); | ||
796 | |||
797 | /* This board has full regulator constraints */ | ||
798 | regulator_has_full_constraints(); | ||
754 | } | 799 | } |
755 | 800 | ||
756 | static const char * u8500_dt_board_compat[] = { | 801 | static const char * u8500_dt_board_compat[] = { |