diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-03-07 15:04:07 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-16 19:46:12 +0000 |
commit | 2d334297c6b816619d6c2c28bccec3b5a7e8a0d9 (patch) | |
tree | dd9b069f520839d2ee383a4ad770808c308cbd82 /arch/arm/mach-ux500/board-mop500.c | |
parent | e27fc6cf84a401e62144a522695f114c9bdbebb7 (diff) | |
download | blackbird-op-linux-2d334297c6b816619d6c2c28bccec3b5a7e8a0d9.tar.gz blackbird-op-linux-2d334297c6b816619d6c2c28bccec3b5a7e8a0d9.zip |
ARM: ux500: Initial Device Tree support for Snowball
This provides very basic Device Tree support for ST-Ericsson's
low-cost development platform, Snowball. If Device Tree for
ux500 is enabled and the correct board is configured within the
Device Tree blob, the correct *_init_machine() will be called.
This patch is based on some original work completed by:
Niklas Hernaeus <niklas.hernaeus@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Niklas Hernaeus <niklas.hernaeus@linaro.org>
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 | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 04afcdf8b0cf..0fb5dfd2ce54 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -30,6 +30,9 @@ #include <linux/gpio_keys.h> #include <linux/delay.h> +#include <linux/of.h> +#include <linux/of_platform.h> + #include <linux/leds.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -738,3 +741,34 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform") .handle_irq = gic_handle_irq, .init_machine = snowball_init_machine, MACHINE_END + +#ifdef CONFIG_MACH_UX500_DT +static void __init u8500_init_machine(void) +{ + if (of_machine_is_compatible("calaosystems,snowball-a9500")) + return snowball_init_machine(); + else if (of_machine_is_compatible("st-ericsson,hrefv60+")) + return hrefv60_init_machine(); + else if (of_machine_is_compatible("st-ericsson,mop500")) + return mop500_init_machine(); +} + +static const char * u8500_dt_board_compat[] = { + "calaosystems,snowball-a9500", + "st-ericsson,hrefv60+", + "st-ericsson,u8500", + "st-ericsson,mop500", + NULL, +}; + + +DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)") + .map_io = u8500_map_io, + .init_irq = ux500_init_irq, + /* we re-use nomadik timer here */ + .timer = &ux500_timer, + .handle_irq = gic_handle_irq, + .init_machine = u8500_init_machine, + .dt_compat = u8500_dt_board_compat, +MACHINE_END +#endif |