summaryrefslogtreecommitdiff
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2015-01-23 13:47:37 +0300
committerNicolas Ferre <nicolas.ferre@atmel.com>2015-01-26 15:43:35 +0300
commitea69f998499d556251d1e2843953cc4f85788464 (patch)
tree02c34ddbad3f14ccc155a05b15ff6a7cba6e167a /arch/arm/mach-at91
parentb9f122cc63ef7f30919b628bee48ab31501e3408 (diff)
downloadlinux-ea69f998499d556251d1e2843953cc4f85788464.tar.xz
ARM: at91: fix ordering of SRAM and PM initialization
The PM initialization needs internal SRAM for allocating a gen_pool and use it to store its PM code. So we need to have of_platform_populate() before this code. Suggested-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/board-dt-rm9200.c4
-rw-r--r--arch/arm/mach-at91/board-dt-sam9.c12
-rw-r--r--arch/arm/mach-at91/board-dt-sama5.c2
3 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-at91/board-dt-rm9200.c b/arch/arm/mach-at91/board-dt-rm9200.c
index 0455c96d32b1..d47c4433444d 100644
--- a/arch/arm/mach-at91/board-dt-rm9200.c
+++ b/arch/arm/mach-at91/board-dt-rm9200.c
@@ -33,9 +33,9 @@ static void __init at91rm9200_dt_timer_init(void)
static void __init rm9200_dt_device_init(void)
{
- at91_rm9200_pm_init();
-
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
+ at91_rm9200_pm_init();
}
diff --git a/arch/arm/mach-at91/board-dt-sam9.c b/arch/arm/mach-at91/board-dt-sam9.c
index 8391b9558c22..f5d922e57655 100644
--- a/arch/arm/mach-at91/board-dt-sam9.c
+++ b/arch/arm/mach-at91/board-dt-sam9.c
@@ -27,10 +27,10 @@
static void __init sam9_dt_device_init(void)
{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
arm_pm_idle = at91sam9_idle;
at91_sam9260_pm_init();
-
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *at91_dt_board_compat[] __initconst = {
@@ -48,10 +48,10 @@ MACHINE_END
static void __init sam9g45_dt_device_init(void)
{
+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+
arm_pm_idle = at91sam9_idle;
at91_sam9g45_pm_init();
-
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *at91_9g45_board_compat[] __initconst = {
@@ -69,10 +69,10 @@ 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();
-
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}
static const char *at91_9x5_board_compat[] __initconst = {
diff --git a/arch/arm/mach-at91/board-dt-sama5.c b/arch/arm/mach-at91/board-dt-sama5.c
index b7338966c8ab..86cffcdef145 100644
--- a/arch/arm/mach-at91/board-dt-sama5.c
+++ b/arch/arm/mach-at91/board-dt-sama5.c
@@ -28,8 +28,8 @@
static void __init sama5_dt_device_init(void)
{
- at91_sam9x5_pm_init();
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
+ at91_sam9x5_pm_init();
}
static const char *sama5_dt_board_compat[] __initconst = {