summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-dt-sam9.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2015-01-27 03:40:58 +0100
committerOlof Johansson <olof@lixom.net>2015-01-27 03:40:58 +0100
commit02685cd20a6f2b0b92fef749d9b9a6c03631c9c2 (patch)
tree42f466a8a16091f49426e799e3e5babbcc79d93b /arch/arm/mach-at91/board-dt-sam9.c
parentMerge tag 'qcom-soc-for-3.20-2' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentARM: at91: pm: remove warning to remove SOC_AT91SAM9263 usage (diff)
downloadlinux-02685cd20a6f2b0b92fef749d9b9a6c03631c9c2.tar.xz
linux-02685cd20a6f2b0b92fef749d9b9a6c03631c9c2.zip
Merge tag 'at91-cleanup3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/soc
Merge "at91: cleanup/soc for 3.20 #3 (bis) from Nicolas Ferre: Third batch of cleanup/soc for 3.20: - several fixes and adjustments following the last cleanup batch - removal of some unused Kconfig options - slight PM and pm_idle rework to ease future rework - removal of unneeded mach/system_rev.h * tag 'at91-cleanup3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: at91: pm: remove warning to remove SOC_AT91SAM9263 usage ARM: at91: remove unused mach/system_rev.h ARM: at91: stop using HAVE_AT91_DBGUx ARM: at91: fix ordering of SRAM and PM initialization ARM: at91: sam9: set arm_pm_idle from sam9_dt_device_init ARM: at91: fix sam9n12 and sam9x5 arm_pm_idle ARM: at91: mark const init data with __initconst instead of __initdata ARM: at91: fix PM initialization for newer SoCs ARM: at91: fix Kconfig.debug by adding DEBUG_AT91_UART option Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-at91/board-dt-sam9.c')
-rw-r--r--arch/arm/mach-at91/board-dt-sam9.c33
1 files changed, 30 insertions, 3 deletions
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 0fe1ced608c5..f5d922e57655 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -16,6 +16,7 @@
#include <linux/of_platform.h>
#include <linux/clk-provider.h>
+#include <asm/system_misc.h>
#include <asm/setup.h>
#include <asm/irq.h>
#include <asm/mach/arch.h>
@@ -26,11 +27,13 @@
static void __init sam9_dt_device_init(void)
{
- at91_sam9260_pm_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ arm_pm_idle = at91sam9_idle;
+ at91_sam9260_pm_init();
}
-static const char *at91_dt_board_compat[] __initdata = {
+static const char *at91_dt_board_compat[] __initconst = {
"atmel,at91sam9",
NULL
};
@@ -45,8 +48,10 @@ MACHINE_END
static void __init sam9g45_dt_device_init(void)
{
- at91_sam9g45_pm_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ arm_pm_idle = at91sam9_idle;
+ at91_sam9g45_pm_init();
}
static const char *at91_9g45_board_compat[] __initconst = {
@@ -61,3 +66,25 @@ DT_MACHINE_START(at91sam9g45_dt, "Atmel AT91SAM9G45")
.init_machine = sam9g45_dt_device_init,
.dt_compat = at91_9g45_board_compat,
MACHINE_END
+
+static void __init sam9x5_dt_device_init(void)
+{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ arm_pm_idle = at91sam9_idle;
+ at91_sam9x5_pm_init();
+}
+
+static const char *at91_9x5_board_compat[] __initconst = {
+ "atmel,at91sam9x5",
+ "atmel,at91sam9n12",
+ NULL
+};
+
+DT_MACHINE_START(at91sam9x5_dt, "Atmel AT91SAM9")
+ /* Maintainer: Atmel */
+ .map_io = at91_map_io,
+ .init_early = at91_dt_initialize,
+ .init_machine = sam9x5_dt_device_init,
+ .dt_compat = at91_9x5_board_compat,
+MACHINE_END