Commit 01c7031c authored by Claudiu Beznea's avatar Claudiu Beznea Committed by Ludovic Desroches

ARM: at91: pm: initial PM support for SAM9X60

Add initial PM support for SAM9X60. This include idle, WFI and ULP0.
Signed-off-by: default avatarClaudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
parent db963027
...@@ -32,3 +32,21 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9") ...@@ -32,3 +32,21 @@ DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9")
.init_machine = at91sam9_init, .init_machine = at91sam9_init,
.dt_compat = at91_dt_board_compat, .dt_compat = at91_dt_board_compat,
MACHINE_END MACHINE_END
static void __init sam9x60_init(void)
{
of_platform_default_populate(NULL, NULL, NULL);
sam9x60_pm_init();
}
static const char *const sam9x60_dt_board_compat[] __initconst = {
"microchip,sam9x60",
NULL
};
DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60")
/* Maintainer: Microchip */
.init_machine = sam9x60_init,
.dt_compat = sam9x60_dt_board_compat,
MACHINE_END
...@@ -14,11 +14,13 @@ ...@@ -14,11 +14,13 @@
#ifdef CONFIG_PM #ifdef CONFIG_PM
extern void __init at91rm9200_pm_init(void); extern void __init at91rm9200_pm_init(void);
extern void __init at91sam9_pm_init(void); extern void __init at91sam9_pm_init(void);
extern void __init sam9x60_pm_init(void);
extern void __init sama5_pm_init(void); extern void __init sama5_pm_init(void);
extern void __init sama5d2_pm_init(void); extern void __init sama5d2_pm_init(void);
#else #else
static inline void __init at91rm9200_pm_init(void) { } static inline void __init at91rm9200_pm_init(void) { }
static inline void __init at91sam9_pm_init(void) { } static inline void __init at91sam9_pm_init(void) { }
static inline void __init sam9x60_pm_init(void) { }
static inline void __init sama5_pm_init(void) { } static inline void __init sama5_pm_init(void) { }
static inline void __init sama5d2_pm_init(void) { } static inline void __init sama5d2_pm_init(void) { }
#endif #endif
......
...@@ -518,6 +518,11 @@ static void at91rm9200_idle(void) ...@@ -518,6 +518,11 @@ static void at91rm9200_idle(void)
writel(AT91_PMC_PCK, soc_pm.data.pmc + AT91_PMC_SCDR); writel(AT91_PMC_PCK, soc_pm.data.pmc + AT91_PMC_SCDR);
} }
static void at91sam9x60_idle(void)
{
cpu_do_idle();
}
static void at91sam9_idle(void) static void at91sam9_idle(void)
{ {
writel(AT91_PMC_PCK, soc_pm.data.pmc + AT91_PMC_SCDR); writel(AT91_PMC_PCK, soc_pm.data.pmc + AT91_PMC_SCDR);
...@@ -754,6 +759,15 @@ void __init at91rm9200_pm_init(void) ...@@ -754,6 +759,15 @@ void __init at91rm9200_pm_init(void)
at91_pm_init(at91rm9200_idle); at91_pm_init(at91rm9200_idle);
} }
void __init sam9x60_pm_init(void)
{
if (!IS_ENABLED(CONFIG_SOC_AT91SAM9))
return;
at91_dt_ramc();
at91_pm_init(at91sam9x60_idle);
}
void __init at91sam9_pm_init(void) void __init at91sam9_pm_init(void)
{ {
if (!IS_ENABLED(CONFIG_SOC_AT91SAM9)) if (!IS_ENABLED(CONFIG_SOC_AT91SAM9))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment