Skip to content

Commit

Permalink
ARM: at91: fix ordering of SRAM and PM initialization
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Ferre committed Jan 26, 2015
1 parent b9f122c commit ea69f99
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-at91/board-dt-rm9200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}


Expand Down
12 changes: 6 additions & 6 deletions arch/arm/mach-at91/board-dt-sam9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -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 = {
Expand All @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-at91/board-dt-sama5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit ea69f99

Please sign in to comment.