aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-03-07 10:04:07 -0500
committerArnd Bergmann <arnd@arndb.de>2012-03-16 15:46:12 -0400
commit2d334297c6b816619d6c2c28bccec3b5a7e8a0d9 (patch)
treedd9b069f520839d2ee383a4ad770808c308cbd82 /arch/arm/mach-ux500/board-mop500.c
parente27fc6cf84a401e62144a522695f114c9bdbebb7 (diff)
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.c34
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 @@
30#include <linux/gpio_keys.h> 30#include <linux/gpio_keys.h>
31#include <linux/delay.h> 31#include <linux/delay.h>
32 32
33#include <linux/of.h>
34#include <linux/of_platform.h>
35
33#include <linux/leds.h> 36#include <linux/leds.h>
34#include <asm/mach-types.h> 37#include <asm/mach-types.h>
35#include <asm/mach/arch.h> 38#include <asm/mach/arch.h>
@@ -738,3 +741,34 @@ MACHINE_START(SNOWBALL, "Calao Systems Snowball platform")
738 .handle_irq = gic_handle_irq, 741 .handle_irq = gic_handle_irq,
739 .init_machine = snowball_init_machine, 742 .init_machine = snowball_init_machine,
740MACHINE_END 743MACHINE_END
744
745#ifdef CONFIG_MACH_UX500_DT
746static void __init u8500_init_machine(void)
747{
748 if (of_machine_is_compatible("calaosystems,snowball-a9500"))
749 return snowball_init_machine();
750 else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
751 return hrefv60_init_machine();
752 else if (of_machine_is_compatible("st-ericsson,mop500"))
753 return mop500_init_machine();
754}
755
756static const char * u8500_dt_board_compat[] = {
757 "calaosystems,snowball-a9500",
758 "st-ericsson,hrefv60+",
759 "st-ericsson,u8500",
760 "st-ericsson,mop500",
761 NULL,
762};
763
764
765DT_MACHINE_START(U8500_DT, "ST-Ericsson U8500 platform (Device Tree Support)")
766 .map_io = u8500_map_io,
767 .init_irq = ux500_init_irq,
768 /* we re-use nomadik timer here */
769 .timer = &ux500_timer,
770 .handle_irq = gic_handle_irq,
771 .init_machine = u8500_init_machine,
772 .dt_compat = u8500_dt_board_compat,
773MACHINE_END
774#endif