aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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
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')
-rw-r--r--arch/arm/boot/dts/snowball.dts31
-rw-r--r--arch/arm/mach-ux500/Makefile.boot1
-rw-r--r--arch/arm/mach-ux500/board-mop500.c34
3 files changed, 66 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
new file mode 100644
index 000000000000..ebcff9a9b87f
--- /dev/null
+++ b/arch/arm/boot/dts/snowball.dts
@@ -0,0 +1,31 @@
1/*
2 * Copyright 2011 ST-Ericsson AB
3 *
4 * The code contained herein is licensed under the GNU General Public
5 * License. You may obtain a copy of the GNU General Public License
6 * Version 2 or later at the following locations:
7 *
8 * http://www.opensource.org/licenses/gpl-license.html
9 * http://www.gnu.org/copyleft/gpl.html
10 */
11
12/dts-v1/;
13
14/ {
15 model = "Calao Systems Snowball platform with device tree";
16 compatible = "calaosystems,snowball-a9500";
17
18 #address-cells = <1>;
19 #size-cells = <1>;
20
21 memory {
22 reg = <0x00000000 0x20000000>;
23 };
24
25 soc-u9500 {
26 #address-cells = <1>;
27 #size-cells = <1>;
28 compatible = "simple-bus";
29 ranges;
30 };
31};
diff --git a/arch/arm/mach-ux500/Makefile.boot b/arch/arm/mach-ux500/Makefile.boot
index ff0a4b5b0a82..dd5cd00e2554 100644
--- a/arch/arm/mach-ux500/Makefile.boot
+++ b/arch/arm/mach-ux500/Makefile.boot
@@ -2,3 +2,4 @@
2params_phys-y := 0x00000100 2params_phys-y := 0x00000100
3initrd_phys-y := 0x00800000 3initrd_phys-y := 0x00800000
4 4
5dtb-$(CONFIG_MACH_SNOWBALL) += snowball.dtb
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