From ff843d621bfc9a9b36c370bb523d3551f2e195dd Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Fri, 20 Jun 2014 13:20:54 +0800 Subject: ARM: imx: add suspend support for i.mx6sx Add suspend support for i.MX6SX. To enter suspend, echo mem > /sys/power/state. To exit suspend, using RTC alarm or enable debug UART wakeup. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo --- arch/arm/mach-imx/mach-imx6sx.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/arm/mach-imx/mach-imx6sx.c') diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 02fccf6033ac..b7a0bdeed31c 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -26,6 +26,7 @@ static void __init imx6sx_init_machine(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, parent); imx_anatop_init(); + imx6sx_pm_init(); } static void __init imx6sx_init_irq(void) -- cgit v1.2.3 From a25d67a437422a58852746d5b6312fd8d71d1ecf Mon Sep 17 00:00:00 2001 From: Anson Huang Date: Fri, 20 Jun 2014 13:44:05 +0800 Subject: ARM: imx: add cpuidle support for i.mx6sx Add cpuidle support for i.MX6SX, derive from i.MX6Q's cpuidle, two levels supported: 1. WFI; 2. WAIT mode. Signed-off-by: Anson Huang Signed-off-by: Shawn Guo --- arch/arm/mach-imx/cpuidle-imx6q.c | 4 +++- arch/arm/mach-imx/mach-imx6sx.c | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-imx/mach-imx6sx.c') diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c index 6bcae0479049..fc0bb1eafee3 100644 --- a/arch/arm/mach-imx/cpuidle-imx6q.c +++ b/arch/arm/mach-imx/cpuidle-imx6q.c @@ -13,6 +13,7 @@ #include "common.h" #include "cpuidle.h" +#include "hardware.h" static atomic_t master = ATOMIC_INIT(0); static DEFINE_SPINLOCK(master_lock); @@ -66,7 +67,8 @@ static struct cpuidle_driver imx6q_cpuidle_driver = { int __init imx6q_cpuidle_init(void) { /* Need to enable SCU standby for entering WAIT modes */ - imx_scu_standby_enable(); + if (!cpu_is_imx6sx()) + imx_scu_standby_enable(); /* Set INT_MEM_CLK_LPM bit to get a reliable WAIT mode support */ imx6q_set_int_mem_clk_lpm(); diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index b7a0bdeed31c..74ff7d650f8a 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -12,6 +12,7 @@ #include #include "common.h" +#include "cpuidle.h" static void __init imx6sx_init_machine(void) { @@ -38,6 +39,11 @@ static void __init imx6sx_init_irq(void) irqchip_init(); } +static void __init imx6sx_init_late(void) +{ + imx6q_cpuidle_init(); +} + static const char *imx6sx_dt_compat[] __initconst = { "fsl,imx6sx", NULL, @@ -48,5 +54,6 @@ DT_MACHINE_START(IMX6SX, "Freescale i.MX6 SoloX (Device Tree)") .init_irq = imx6sx_init_irq, .init_machine = imx6sx_init_machine, .dt_compat = imx6sx_dt_compat, + .init_late = imx6sx_init_late, .restart = mxc_restart, MACHINE_END -- cgit v1.2.3 From 8756dd924df6f4199368bee426dc8b2da0cfc6d6 Mon Sep 17 00:00:00 2001 From: Shawn Guo Date: Tue, 1 Jul 2014 16:03:00 +0800 Subject: ARM: imx: mark .dt_compat as const Otherwise GCC will mark the .init.rodata section R/W, which causes a compile error once we add other real R/O data. Signed-off-by: Lucas Stach Signed-off-by: Shawn Guo --- arch/arm/mach-imx/imx31-dt.c | 2 +- arch/arm/mach-imx/imx35-dt.c | 2 +- arch/arm/mach-imx/mach-imx50.c | 2 +- arch/arm/mach-imx/mach-imx51.c | 2 +- arch/arm/mach-imx/mach-imx53.c | 2 +- arch/arm/mach-imx/mach-imx6q.c | 2 +- arch/arm/mach-imx/mach-imx6sl.c | 2 +- arch/arm/mach-imx/mach-imx6sx.c | 2 +- arch/arm/mach-imx/mach-vf610.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) (limited to 'arch/arm/mach-imx/mach-imx6sx.c') diff --git a/arch/arm/mach-imx/imx31-dt.c b/arch/arm/mach-imx/imx31-dt.c index 581f4d6c9b8a..418dbc82adc4 100644 --- a/arch/arm/mach-imx/imx31-dt.c +++ b/arch/arm/mach-imx/imx31-dt.c @@ -25,7 +25,7 @@ static void __init imx31_dt_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static const char *imx31_dt_board_compat[] __initconst = { +static const char * const imx31_dt_board_compat[] __initconst = { "fsl,imx31", NULL }; diff --git a/arch/arm/mach-imx/imx35-dt.c b/arch/arm/mach-imx/imx35-dt.c index a62854c59240..584fbe105579 100644 --- a/arch/arm/mach-imx/imx35-dt.c +++ b/arch/arm/mach-imx/imx35-dt.c @@ -34,7 +34,7 @@ static void __init imx35_irq_init(void) mx35_init_irq(); } -static const char *imx35_dt_board_compat[] __initconst = { +static const char * const imx35_dt_board_compat[] __initconst = { "fsl,imx35", NULL }; diff --git a/arch/arm/mach-imx/mach-imx50.c b/arch/arm/mach-imx/mach-imx50.c index 62a4d4580291..b1e56a94a382 100644 --- a/arch/arm/mach-imx/mach-imx50.c +++ b/arch/arm/mach-imx/mach-imx50.c @@ -23,7 +23,7 @@ static void __init imx50_dt_init(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static const char *imx50_dt_board_compat[] __initconst = { +static const char * const imx50_dt_board_compat[] __initconst = { "fsl,imx50", NULL }; diff --git a/arch/arm/mach-imx/mach-imx51.c b/arch/arm/mach-imx/mach-imx51.c index b6f42f80aae2..c77deb3f0893 100644 --- a/arch/arm/mach-imx/mach-imx51.c +++ b/arch/arm/mach-imx/mach-imx51.c @@ -67,7 +67,7 @@ static void __init imx51_init_late(void) imx51_pm_init(); } -static const char *imx51_dt_board_compat[] __initconst = { +static const char * const imx51_dt_board_compat[] __initconst = { "fsl,imx51", NULL }; diff --git a/arch/arm/mach-imx/mach-imx53.c b/arch/arm/mach-imx/mach-imx53.c index d8c3c08354f6..03a0b40793d6 100644 --- a/arch/arm/mach-imx/mach-imx53.c +++ b/arch/arm/mach-imx/mach-imx53.c @@ -41,7 +41,7 @@ static void __init imx53_init_late(void) imx53_pm_init(); } -static const char *imx53_dt_board_compat[] __initconst = { +static const char * const imx53_dt_board_compat[] __initconst = { "fsl,imx53", NULL }; diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 9b3a233cfc2b..d51c6e99a2e9 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c @@ -396,7 +396,7 @@ static void __init imx6q_init_irq(void) irqchip_init(); } -static const char *imx6q_dt_compat[] __initconst = { +static const char * const imx6q_dt_compat[] __initconst = { "fsl,imx6dl", "fsl,imx6q", NULL, diff --git a/arch/arm/mach-imx/mach-imx6sl.c b/arch/arm/mach-imx/mach-imx6sl.c index ad323385115c..ed263a21d928 100644 --- a/arch/arm/mach-imx/mach-imx6sl.c +++ b/arch/arm/mach-imx/mach-imx6sl.c @@ -70,7 +70,7 @@ static void __init imx6sl_init_irq(void) irqchip_init(); } -static const char *imx6sl_dt_compat[] __initconst = { +static const char * const imx6sl_dt_compat[] __initconst = { "fsl,imx6sl", NULL, }; diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c index 74ff7d650f8a..673a734165ba 100644 --- a/arch/arm/mach-imx/mach-imx6sx.c +++ b/arch/arm/mach-imx/mach-imx6sx.c @@ -44,7 +44,7 @@ static void __init imx6sx_init_late(void) imx6q_cpuidle_init(); } -static const char *imx6sx_dt_compat[] __initconst = { +static const char * const imx6sx_dt_compat[] __initconst = { "fsl,imx6sx", NULL, }; diff --git a/arch/arm/mach-imx/mach-vf610.c b/arch/arm/mach-imx/mach-vf610.c index c44602758120..ee7e57b752a7 100644 --- a/arch/arm/mach-imx/mach-vf610.c +++ b/arch/arm/mach-imx/mach-vf610.c @@ -20,7 +20,7 @@ static void __init vf610_init_machine(void) of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); } -static const char *vf610_dt_compat[] __initconst = { +static const char * const vf610_dt_compat[] __initconst = { "fsl,vf610", NULL, }; -- cgit v1.2.3