ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX
Fabio Estevam
reviewerPATCH 1/1 ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX
Since commit 1e434b703248 ("ARM: imx: update the cpu power up timing setting on i.mx6sx") some characters loss is noticed on i.MX6ULL UART as reported by Christoph Niedermaier.
The intention of such commit was to increase the SW2ISO field for i.MX6SX only, but since cpuidle-imx6sx is also used on i.MX6UL/i.MX6ULL this caused unintended side effects on other SoCs.
Fix this problem by keeping the original SW2ISO value for i.MX6UL/i.MX6ULL and only increase SW2ISO in the i.MX6SX case.
--- arch/arm/mach-imx/cpuidle-imx6sx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/mach-imx/cpuidle-imx6sx.c +8 -1
@@ -15,6 +15,7 @@#include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish (unsigned long val) {
@@ -99,8 +100,12 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { .safe_state_index = 0, }; +#define SW2ISO_ORIGINAL 0x2 +#define SW2ISO_IMX6SX 0xfint __init imx6sx_cpuidle_init (void ) { +u32 sw2iso =SW2ISO_ORIGINAL ; +imx6_set_int_mem_clk_lpm (true);imx6_enable_rbc (false);imx_gpc_set_l2_mem_power_in_lpm (false);
@@ -110,7 +115,9 @@ int __init imx6sx_cpuidle_init(void)* except for power up sw2iso which need to be * larger than LDO ramp up time. */ -imx_gpc_set_arm_power_up_timing (0xf ,1 ); +if (cpu_is_imx6sx ()) + sw2iso =SW2ISO_IMX6SX ; +imx_gpc_set_arm_power_up_timing (sw2iso,1 );imx_gpc_set_arm_power_down_timing (1 ,1 );return cpuidle_register (&imx6sx_cpuidle_driver,NULL );
Signature · 7 lines
2.17.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 46 lines · Fabio Estevam
Since commit
1e434b703248("ARM: imx: update the cpu power up timing setting on i.mx6sx") some characters loss is noticed on i.MX6ULL UART as reported by Christoph Niedermaier.The intention of such commit was to increase the SW2ISO field for i.MX6SX only, but since cpuidle-imx6sx is also used on i.MX6UL/i.MX6ULL this caused unintended side effects on other SoCs.
Fix this problem by keeping the original SW2ISO value for i.MX6UL/i.MX6ULL and only increase SW2ISO in the i.MX6SX case.
Fixes 1e434b703248 ("ARM: imx: update the cpu power up timing setting on i.mx6sx")Reported-by Christoph Niedermaier <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/mach-imx/cpuidle-imx6sx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/mach-imx/cpuidle-imx6sx.c +5
-0@@ -15,6 +15,7 @@#include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish (unsigned long val) {@@ -99,8 +100,12 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { .safe_state_index = 0, }; +#define SW2ISO_ORIGINAL 0x2 +#define SW2ISO_IMX6SX 0xfint __init imx6sx_cpuidle_init (void ) { +u32 sw2iso =SW2ISO_ORIGINAL ; +imx6_set_int_mem_clk_lpm (true);imx6_enable_rbc (false);imx_gpc_set_l2_mem_power_in_lpm (false);
arch/arm/mach-imx/cpuidle-imx6sx.c int __init imx6sx_cpuidle_init(void) · line 123
Quoted 10 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +3
-1@@ -110,7 +115,9 @@ int __init imx6sx_cpuidle_init(void)* except for power up sw2iso which need to be * larger than LDO ramp up time. */ -imx_gpc_set_arm_power_up_timing (0xf ,1 ); +if (cpu_is_imx6sx ()) + sw2iso =SW2ISO_IMX6SX ; +imx_gpc_set_arm_power_up_timing (sw2iso,1 );imx_gpc_set_arm_power_down_timing (1 ,1 );return cpuidle_register (&imx6sx_cpuidle_driver,NULL );
Regards,
Signature · 9 lines
Sébastien Szymanski Software engineer, Armadeus Systems Tel: +33 (0)9 72 29 41 44 Fax: +33 (0)9 72 28 79 26 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam
reviewerQuoted 18 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit:1e434b703248ARM: imx: update the cpu power up timing setting on i.mx6sx.The bot has tested the following trees: v5.0.10, v4.19.37, v4.14.114, v4.9.171, v4.4.179.
v5.0.10: Build OK!
v4.19.37: Build OK!
v4.14.114: Build OK!
v4.9.171: Build OK!
v4.4.179: Failed to apply! Possible dependencies:
6ae44aa651d0("ARM: imx: enable WAIT mode hardware workaround for imx6sx")
Quoted 1 line
How should we proceed with this patch?
I can submit a version for 4.4 stable tree once this hits mainline. The conflict resolution is very simple.
Fabio Estevam
reviewerQuoted 20 lines · Fabio Estevam
Quoted 18 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit:1e434b703248ARM: imx: update the cpu power up timing setting on i.mx6sx.The bot has tested the following trees: v5.0.10, v4.19.37, v4.14.114, v4.9.171, v4.4.179.
v5.0.10: Build OK!
v4.19.37: Build OK!
v4.14.114: Build OK!
v4.9.171: Build OK!
v4.4.179: Failed to apply! Possible dependencies:
6ae44aa651d0("ARM: imx: enable WAIT mode hardware workaround for imx6sx")
Quoted 4 lines
Quoted 1 line
How should we proceed with this patch?
I can submit a version for 4.4 stable tree once this hits mainline. The conflict resolution is very simple.
Or maybe I can send a simpler version that applies all the way to 4.4:
arch/arm/mach-imx/cpuidle-imx6sx.c +2 -1
@@ -15,6 +15,7 @@#include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish (unsigned long val) {
@@ -110,7 +111,7 @@ int __init imx6sx_cpuidle_init(void)* except for power up sw2iso which need to be * larger than LDO ramp up time. */ -imx_gpc_set_arm_power_up_timing (0xf ,1 ); +imx_gpc_set_arm_power_up_timing (cpu_is_imx6sx () ?0xf :0x2 ,1 );imx_gpc_set_arm_power_down_timing (1 ,1 );return cpuidle_register (&imx6sx_cpuidle_driver,NULL );
Would this be preferred?
RE: [PATCH] ARM: imx: cpuidle-imx6sx: Restrict the SW2ISO increase to i.MX6SX [Klartext]
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
Sent: Thursday 2nd May 2019 13:30
Quoted 47 lines
Since commit
1e434b703248("ARM: imx: update the cpu power up timing setting on i.mx6sx") some characters loss is noticed on i.MX6ULL UART as reported by Christoph Niedermaier.The intention of such commit was to increase the SW2ISO field for i.MX6SX only, but since cpuidle-imx6sx is also used on i.MX6UL/i.MX6ULL this caused unintended side effects on other SoCs.
Fix this problem by keeping the original SW2ISO value for i.MX6UL/i.MX6ULL and only increase SW2ISO in the i.MX6SX case.
Fixes 1e434b703248 ("ARM: imx: update the cpu power up timing setting oni.mx6sx")
Reported-by Christoph Niedermaier <[email protected]>Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/mach-imx/cpuidle-imx6sx.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/mach-imx/cpuidle-imx6sx.c +5
-0@@ -15,6 +15,7 @@#include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish (unsigned long val) {@@ -99,8 +100,12 @@ static struct cpuidle_driver imx6sx_cpuidle_driver = { .safe_state_index = 0, }; +#define SW2ISO_ORIGINAL 0x2 +#define SW2ISO_IMX6SX 0xfint __init imx6sx_cpuidle_init (void ) { +u32 sw2iso =SW2ISO_ORIGINAL ; +imx6_set_int_mem_clk_lpm (true);imx6_enable_rbc (false);imx_gpc_set_l2_mem_power_in_lpm (false);
arch/arm/mach-imx/cpuidle-imx6sx.c int __init imx6sx_cpuidle_init(void) · line 123
Quoted 10 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +3
-1@@ -110,7 +115,9 @@ int __init imx6sx_cpuidle_init(void)* except for power up sw2iso which need to be * larger than LDO ramp up time. */ -imx_gpc_set_arm_power_up_timing (0xf ,1 ); +if (cpu_is_imx6sx ()) + sw2iso =SW2ISO_IMX6SX ; +imx_gpc_set_arm_power_up_timing (sw2iso,1 );imx_gpc_set_arm_power_down_timing (1 ,1 );return cpuidle_register (&imx6sx_cpuidle_driver,NULL );
Best regards,
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Quoted 39 lines · Fabio Estevam
Quoted 20 lines · Fabio Estevam
Quoted 18 lines · Sasha Levin
Hi,
[This is an automated email]
This commit has been processed because it contains a "Fixes:" tag,
fixing commit:1e434b703248ARM: imx: update the cpu power up timing setting on i.mx6sx.The bot has tested the following trees: v5.0.10, v4.19.37, v4.14.114, v4.9.171, v4.4.179.
v5.0.10: Build OK!
v4.19.37: Build OK!
v4.14.114: Build OK!
v4.9.171: Build OK!
v4.4.179: Failed to apply! Possible dependencies:
6ae44aa651d0("ARM: imx: enable WAIT mode hardware workaround for imx6sx")Quoted 4 lines
Quoted 1 line
How should we proceed with this patch?
I can submit a version for 4.4 stable tree once this hits mainline. The conflict resolution is very simple.
Or maybe I can send a simpler version that applies all the way to 4.4:
arch/arm/mach-imx/cpuidle-imx6sx.c +1
-0@@ -15,6 +15,7 @@#include "common.h" #include "cpuidle.h" +#include "hardware.h" static int imx6sx_idle_finish (unsigned long val) {
arch/arm/mach-imx/cpuidle-imx6sx.c int __init imx6sx_cpuidle_init(void) · line 114
Quoted 5 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +1
-1@@ -110,7 +111,7 @@ int __init imx6sx_cpuidle_init(void)* except for power up sw2iso which need to be * larger than LDO ramp up time. */ -imx_gpc_set_arm_power_up_timing (0xf ,1 ); +imx_gpc_set_arm_power_up_timing (cpu_is_imx6sx () ?0xf :0x2 ,1 );
^ missing space
Quoted 5 lines
arch/arm/mach-imx/cpuidle-imx6sx.c +0
-0imx_gpc_set_arm_power_down_timing (1 ,1 );return cpuidle_register (&imx6sx_cpuidle_driver,NULL );Would this be preferred?
Yes, please.
Shawn