Switch to generic syscon regmap based drivers
Subsystems (5)
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select from Kconfig
Alim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: select POWER_RESET_SYSCON and
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Signature · 1 line
1.7.10.4
Alim Akhtar
reviewerPATCH v2 1/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos3250 SoC.
--- arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos3250.dtsi +14 -0
@@ -152,6 +152,20 @@ interrupt-parent = <&gic>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* Reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + mipi_phy: video-phy at 10020710 { compatible = "samsung,s5pv210-mipi-video-phy"; #phy-cells = <1>;
Signature · 1 line
1.7.10.4
PATCH v2 1/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
Quoted 11 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos3250 SoC.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Best regards,
Krzysztof
Alim Akhtar
reviewerPATCH v2 2/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos4 SoC.
--- arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos4.dtsi +14 -0
@@ -158,6 +158,20 @@ interrupt-parent = <&gic>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + dsi_0: dsi at 11C80000 { compatible = "samsung,exynos4210-mipi-dsi"; reg = <0x11C80000 0x10000>;
Signature · 1 line
1.7.10.4
PATCH v2 2/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
Quoted 12 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos4 SoC.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Tested-by Tobias Jakobi <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Best regards,
Krzysztof
Alim Akhtar
reviewerPATCH v2 3/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
--- arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos5.dtsi +14 -0
@@ -88,6 +88,20 @@ status = "disabled"; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + fimd: fimd at 14400000 { compatible = "samsung,exynos5250-fimd"; interrupt-parent = <&combiner>;
Signature · 1 line
1.7.10.4
PATCH v2 3/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
Hello Alim,
Quoted 11 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
PATCH v2 3/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
hi Alim,
Quoted 15 lines · Javier Martinez Canillas
Hello Alim,
Quoted 11 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Quoted 8 lines
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
Tested on OdroidXU3.
-Anand Moon
Quoted 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
In reply to Alim AkhtarQuoted 11 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5 SoCs.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Best regards,
Krzysztof
Alim Akhtar
reviewerPATCH v2 4/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
In reply to Alim AkhtarThis patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5410 SoC.
--- arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
arch/arm/boot/dts/exynos5410.dtsi +14 -0
@@ -102,6 +102,20 @@ reg = <0x10040000 0x5000>; }; + poweroff: syscon-poweroff { + compatible = "syscon-poweroff"; + regmap = <&pmu_system_controller>; + offset = <0x330C>; /* PS_HOLD_CONTROL */ + mask = <0x5200>; /* reset value */ + }; + + reboot: syscon-reboot { + compatible = "syscon-reboot"; + regmap = <&pmu_system_controller>; + offset = <0x0400>; /* SWRESET */ + mask = <0x1>; + }; + mct: mct at 101C0000 { compatible = "samsung,exynos4210-mct"; reg = <0x101C0000 0xB00>;
Signature · 1 line
1.7.10.4
PATCH v2 4/6 arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
Quoted 11 lines · Alim Akhtar
This patch adds syscon-{reboot, poweroff} nodes to allow the generic syscon-{reboot, poweroff} driver to reset/poweroff exynos5410 SoC.
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Pankaj Dubey <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Best regards,
Krzysztof
Alim Akhtar
reviewerPATCH v2 5/6 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
In reply to Alim AkhtarSince we switch to use generic syscon regmap based reset/poweroff driver for exynos SoC, lets select it from ARCH_EXYNOS instead of enabling it from various defconfigs. This also select POWER_RESET as SYSCON-{reset, poweroff} drivers depends on it.
---
Have run make for allyes, allmod, multi_v7 and exynos defconfigs no error/warrning reported.
arch/arm/mach-exynos/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-exynos/Kconfig +3 -0
@@ -27,6 +27,9 @@ menuconfig ARCH_EXYNOS select SRAM select THERMAL select MFD_SYSCON + select POWER_RESET + select POWER_RESET_SYSCON + select POWER_RESET_SYSCON_POWEROFF help Support for SAMSUNG EXYNOS SoCs (EXYNOS4/5)
Signature · 1 line
1.7.10.4
PATCH v2 5/6 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
Hello Alim,
Quoted 8 lines · Alim Akhtar
Since we switch to use generic syscon regmap based reset/poweroff driver for exynos SoC, lets select it from
ARCH_EXYNOSinstead of enabling it from various defconfigs. This also selectPOWER_RESETas SYSCON-{reset, poweroff} drivers depends on it.Signed-off-by Alim Akhtar <[email protected]>---
Patch looks good to me.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
PATCH v2 5/6 ARM: exynos: select POWER_RESET_SYSCON and POWER_RESET_SYSCON_POWEROFF
In reply to Alim AkhtarQuoted 5 lines · Alim Akhtar
Since we switch to use generic syscon regmap based reset/poweroff driver for exynos SoC, lets select it from
ARCH_EXYNOSinstead of enabling it from various defconfigs. This also selectPOWER_RESETas SYSCON-{reset, poweroff} drivers depends on it.
Quoted 8 lines
Signed-off-by Alim Akhtar <[email protected]>---
Have run make for allyes, allmod,
multi_v7and exynos defconfigs no error/warrning reported.arch/arm/mach-exynos/Kconfig | 3 +++ 1 file changed, 3 insertions(+)
Thanks for update:
Best regards,
Krzysztof
Alim Akhtar
reviewerPATCH v2 6/6 ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
In reply to Alim AkhtarNow we can use the generic syscon-{reboot/poweroff} drivers, so we don't need special handling for reboot/poweroff in exynos pmu driver. This patch remove the same.
Note: This will break reboot/poweroff on boards with older dtbs with a newer kernel.
--- arch/arm/mach-exynos/pmu.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-)
arch/arm/mach-exynos/pmu.c +0 -43
@@ -14,9 +14,6 @@#include <linux/of_address.h> #include <linux/platform_device.h> #include <linux/delay.h> -#include <linux/notifier.h> -#include <linux/reboot.h> -#include "exynos-pmu.h" #include "regs-pmu.h"
@@ -681,23 +678,6 @@ static unsigned int const exynos5420_list_disable_pmu_reg[] = { EXYNOS5420_CMU_RESET_FSYS_SYS_PWR_REG, }; -static void exynos_power_off (void ) -{ -unsigned int tmp; - -pr_info ("Power down.\n" ); - tmp =pmu_raw_readl (EXYNOS_PS_HOLD_CONTROL ); - tmp ^= (1 <<8 ); -pmu_raw_writel (tmp,EXYNOS_PS_HOLD_CONTROL ); - -/* Wait a little so we don't give a false warning below */ -mdelay (100 ); - -pr_err ("Power down failed, please power off system manually.\n" ); -while (1 ) - ; -} -static void exynos5420_powerdown_conf (enum sys_powerdown mode) {u32 this_cluster;
@@ -875,14 +855,6 @@ static void exynos5420_pmu_init(void)pr_info ("EXYNOS5420 PMU initialized\n" ); } -static int pmu_restart_notify (struct notifier_block *this, -unsigned long code,void *unused) -{ -pmu_raw_writel (0x1 ,EXYNOS_SWRESET ); - -return NOTIFY_DONE ; -} -static const struct exynos_pmu_data exynos3250_pmu_data = { .pmu_config = exynos3250_pmu_config, .pmu_init = exynos3250_pmu_init,
@@ -940,20 +912,11 @@ static const struct of_device_id exynos_pmu_of_device_ids[] = { { /*sentinel*/ }, }; -/* -* Exynos PMU restart notifier, handles restart functionality -*/ -static struct notifier_block pmu_restart_handler = { - .notifier_call = pmu_restart_notify, - .priority =128 , -}; -static int exynos_pmu_probe (struct platform_device *pdev) {const struct of_device_id *match;struct device *dev = &pdev->dev;struct resource *res; -int ret; res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); pmu_base_addr =devm_ioremap_resource (dev, res);
@@ -978,12 +941,6 @@ static int exynos_pmu_probe(struct platform_device *pdev)platform_set_drvdata (pdev, pmu_context); - ret =register_restart_handler (&pmu_restart_handler); -if (ret) -dev_warn (dev,"can't register restart handler err=%d\n" , ret); - - pm_power_off = exynos_power_off; -dev_dbg (dev,"Exynos PMU Driver probe done\n" );return 0 ; }
Signature · 1 line
1.7.10.4
PATCH v2 6/6 ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
Hello Alim,
Quoted 7 lines · Alim Akhtar
Now we can use the generic syscon-{reboot/poweroff} drivers, so we don't need special handling for reboot/poweroff in exynos pmu driver. This patch remove the same.
Note: This will break reboot/poweroff on boards with older dtbs with a newer kernel.
Quoted 7 lines
Signed-off-by Alim Akhtar <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>Acked-by Moritz Fischer <[email protected]>--- arch/arm/mach-exynos/pmu.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-)
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
v2 cover Switch to generic syscon regmap based drivers
In reply to Alim AkhtarHello Alim,
Quoted 4 lines · Alim Akhtar
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
I tested this series on an Exynos5800 Peach Pi and an Exynos5422 Odroid XU. Reboot and poweroff are working correctly on both boards with these patches.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
v2 cover Switch to generic syscon regmap based drivers
In reply to Alim AkhtarAm 20.10.2015 um 11:24 schrieb Alim Akhtar:
Quoted 19 lines
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
Quoted 8 lines
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make exynos_defconfig on Odroid U3.
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.
Without your patch set reboot worked.
Thanks,
Signature · 1 line
Markus Reichl
v2 cover Switch to generic syscon regmap based drivers
Hi Markus,
Quoted 29 lines · Markus Reichl
Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
Quoted 19 lines
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCsQuoted 8 lines
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Quoted 6 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.
which exynos soc Odroid U3 uses?
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.
reboot stuck mean system does not reboot any more?
As far as I can see there in __no__ functional changes that my patch introduce. So ideally it should have work. My patches are based on the top on vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?
Will check with the commit mentioned by you tomorrow.
Quoted 11 lines
Without your patch set reboot worked.
Thanks,
--
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
Quoted 32 lines · Alim Akhtar
Hi Markus,
Quoted 29 lines · Markus Reichl
Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
Quoted 27 lines
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCsarch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Quoted 8 lines
Quoted 6 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does include exynos4.dtsi,
so these should have worked.
Quoted 28 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
As far as I can see there in__no__functional changes that my patch introduce. So ideally it should have work. My patches are based on the top on vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?Will check with the commit mentioned by you tomorrow.
Quoted 11 lines
Without your patch set reboot worked.
Thanks,
--
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html--
Regards,
Alim
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
Am Dienstag, 20. Oktober 2015, 21:22:05 schrieb Alim Akhtar:
Quoted 39 lines · Alim Akhtar
Quoted 38 lines
Hi Markus,
Quoted 35 lines · Markus Reichl
Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
Quoted 19 lines
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCsQuoted 8 lines
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.
Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
Quoted 4 lines
Quoted 4 lines
As far as I can see there in
__no__functional changes that my patch introduce. So ideally it should have work. My patches are based on the top on vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?
Will try tomorrow.
Quoted 17 lines
Quoted 17 lines
Will check with the commit mentioned by you tomorrow.
Quoted 11 lines
Without your patch set reboot worked.
Thanks,
--
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines
Quoted 3 lines
--
Regards,
Alim
Thanks,
--
Markus
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
Quoted 51 lines · Markus Reichl
Am Dienstag, 20. Oktober 2015, 21:22:05 schrieb Alim Akhtar:
Quoted 39 lines · Alim Akhtar
Quoted 38 lines
Hi Markus,
Quoted 35 lines · Markus Reichl
Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
Quoted 19 lines
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCsQuoted 8 lines
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
Quoted 7 lines
It freezes when going for reboot. Have to power off/on to boot again.
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
o
Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards. Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
Quoted 35 lines
Quoted 4 lines
Quoted 4 lines
As far as I can see there in
__no__functional changes that my patch introduce. So ideally it should have work. My patches are based on the top on vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?Will try tomorrow.
Quoted 17 lines
Quoted 17 lines
Will check with the commit mentioned by you tomorrow.
Quoted 11 lines
Without your patch set reboot worked.
Thanks,
--
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.htmlQuoted 7 lines
Quoted 3 lines
--
Regards,
AlimThanks,
--
Markus
v2 cover Switch to generic syscon regmap based drivers
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 21 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Quoted 7 lines
Quoted 4 lines
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oHave checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------
pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192
So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Best regards,
Signature · 5 lines
Javier Martinez Canillas Open Source Group Samsung Research America [0]:
Quoted 1 line
From
c9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handler
The pwrseq_emmc driver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.
But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
--- drivers/mmc/core/pwrseq_emmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/mmc/core/pwrseq_emmc.c +3 -3
@@ -84,11 +84,11 @@ struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,/* * register reset handler to ensure emmc reset also from -* emergency_reboot(), priority 129 schedules it just before -* system reboot +* emergency_reboot(), priority 255 is the highest priority +* so it will be executed before any system reboot handler. */ pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb; - pwrseq->reset_nb.priority =129 ; + pwrseq->reset_nb.priority =255 ;register_restart_handler (&pwrseq->reset_nb); pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;
Signature · 1 line
2.4.3
v2 cover Switch to generic syscon regmap based drivers
Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
Quoted 64 lines
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 21 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Quoted 7 lines
Quoted 4 lines
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oHave checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Quoted 6 lines
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Hi Javier,
your patch fixes the issue, reboot works now on U3.
Thanks,
--
Markus
Quoted 3 lines
Best regards,
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
Quoted 67 lines · Markus Reichl
Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
Quoted 66 lines
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 21 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Quoted 7 lines
Quoted 4 lines
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oHave checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Markus,
Quoted 9 lines
Quoted 4 lines
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Hi Javier,
your patch fixes the issue, reboot works now on U3.
Good to know that.
Thanks
Quoted 13 lines
Tested-by Markus Reichl <[email protected]>Thanks,
--
MarkusQuoted 3 lines
Best regards,
v2 cover Switch to generic syscon regmap based drivers
Hi Javier,
Quoted 83 lines · Alim Akhtar
Quoted 80 lines · Markus Reichl
Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
Quoted 76 lines
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 27 lines
Quoted 19 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
Quoted 7 lines
It freezes when going for reboot. Have to power off/on to boot again.
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oQuoted 6 lines
Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Quoted 18 lines
Quoted 4 lines
Hi Javier,
your patch fixes the issue, reboot works now on U3.
Good to know that.
ThanksQuoted 12 lines
Tested-by Markus Reichl <[email protected]>Thanks,
--
MarkusQuoted 3 lines
Best regards,
Tested on OdroidXU3 emmc. Reboot success.
-Anand Moon
Quoted 7 lines
Quoted 2 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
v2 cover Switch to generic syscon regmap based drivers
Hello Anand and Markus,
On 10/21/2015 01:46 PM, Anand Moon wrote:
[snip]
Quoted 24 lines
Quoted 24 lines
Quoted 9 lines
Quoted 7 lines
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Quoted 4 lines
Hi Javier,
your patch fixes the issue, reboot works now on U3.
Good to know that.
ThanksQuoted 9 lines
Tested-by Markus Reichl <[email protected]>Thanks,
--
MarkusQuoted 1 line
Quoted 8 lines
Quoted 3 lines
Quoted 3 lines
Quoted 2 lines
Best regards,
Tested on OdroidXU3 emmc. Reboot success.
Tested-by Anand Moon <[email protected]>
Thanks a lot to both for testing the patch.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
In reply to Javier Martinez CanillasHi Javier,
Quoted 55 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 21 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Quoted 7 lines
Quoted 4 lines
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oHave checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
Quoted 9 lines
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Thanks for nailing it down, this make lots of sense and probably the main cause of Odroid U3 reboot failure.
I was going to suggest Markus to try a uSD boot. But looks like your suggested patch will do the trick for him.
Quoted 7 lines
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
I am fine with including this with my series or lowering syscon_restart_handler priority to 128.
It also make sense to increase eMMC priority as you suggested as before system reboot, devices should have reseted itself.
Thanks!
Quoted 2 lines
Best regards,
v2 cover Switch to generic syscon regmap based drivers
Hello Alim,
On 10/21/2015 12:44 PM, Alim Akhtar wrote:
[snip]
Quoted 7 lines
Quoted 6 lines
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
I am fine with including this with my series or lowering
syscon_restart_handlerpriority to 128.
Yes, I also considered changing the syscon-reboot handler priority to 128 but then I noticed this commit:
b81180b3fd48 ("power: reset: adjust priority of simple syscon reboot driver").
So as you can see, it was 128 before but was bumped to 192 so it was called before restart handlers registered by watchdogs. So, changing to 128 would break other people use cases.
Now, I don't know if that is the right fix since register_restart_handler() explanation about the policy used for restart handler priority numbers is scarce. It only mentions 0, 128 and 255 so probably the correct thing to do is to change all watchdog restart handler to 0 but that is a separate issue.
Quoted 1 line
It also make sense to increase eMMC priority as you suggested as before system reboot, devices should have reseted itself.
That was my rationale as well and is why I think the handler for devices should use the highest priority regardless if the syscon-reboot is later changed to prio 128 and the watchdog handlers to 0.
Best regards,
[0]: http://lxr.free-electrons.com/source/kernel/reboot.c#L113
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
v2 cover Switch to generic syscon regmap based drivers
Hi Javier,
Quoted 28 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 12:44 PM, Alim Akhtar wrote:
[snip]
Quoted 7 lines
Quoted 6 lines
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
I am fine with including this with my series or lowering
syscon_restart_handlerpriority to 128.Yes, I also considered changing the syscon-reboot handler priority to 128 but then I noticed this commit:
b81180b3fd48("power: reset: adjust priority of simple syscon reboot driver").So as you can see, it was 128 before but was bumped to 192 so it was called before restart handlers registered by watchdogs. So, changing to 128 would break other people use cases.
Now, I don't know if that is the right fix since
register_restart_handler()explanation about the policy used for restart handler priority numbers is scarce. It only mentions 0, 128 and 255 so probably the correct thing to do is to change all watchdog restart handler to 0 but that is a separate issue.
Quoted 6 lines
Quoted 1 line
It also make sense to increase eMMC priority as you suggested as before system reboot, devices should have reseted itself.
That was my rationale as well and is why I think the handler for devices should use the highest priority regardless if the syscon-reboot is later changed to prio 128 and the watchdog handlers to 0.
I agree, in any case dumping up eMMC reset priority make sense. If all is good here, over to Krzysztof and Ulf to handle these patches. Thanks.
Quoted 9 lines
Best regards,
[0]: http://lxr.free-electrons.com/source/kernel/reboot.c#L113
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
In reply to Javier Martinez CanillasHi Javier,
Quoted 88 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 08:09 AM, Alim Akhtar wrote:
[snip]
Quoted 21 lines
Quoted 21 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Hi Alim,
I have installed your patch set above with git am on top of 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today with make
exynos_defconfigon Odroid U3.Quoted 10 lines
Quoted 2 lines
which exynos soc Odroid U3 uses?
OK, I can see its uses exynos4412 and
exynos4412-odroidu3.dtsdoes includeexynos4.dtsi,
so these should have worked.Quoted 4 lines
Quoted 3 lines
"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.reboot stuck mean system does not reboot any more?
It freezes when going for reboot. Have to power off/on to boot again.
Quoted 7 lines
Quoted 4 lines
Btw I use an mmc, not an sd-card. No other HW connected, just LAN-cable. Bootloader is u-boot v2015.10.
oHave checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
Having said that I think I know what is the issue here. Markus said that he is using an eMMC instead of an uSD (which is what I used and my guess is that Krzysztof did too).
Now, there is a subtle difference between the old PMU restart handler and the syscon-reboot one, and that is the restart handler priorities:
notifier priority
------------------------------------pmu_restart_notify 128 mmc_pwrseq_emmc_reset_nb 129 syscon_restart_handle 192So, without Alim's patches, first the eMMC reset handler will be called and then the PMU restart handler but after his series, the syscon reset handler has a higher priority so the eMMC reset will never be called.
But the problem is that the eMMC card has to be properly reset on system restart to allow the SoC iROM to be able to read the bootloader from the eMMC since the iROM doesn't have restart logic and the card shouldn't be left in an unknown state.
So the problem here is not that the system is not being reset (that I think that works) but that on reboot, the system is not able to boot again since the ROM is not able to read the second stage bootloader.
Markus,
Can you please test following patch [0] on top of Alim's series? If that works then it should either be part of Alim's series or the patches will have to wait until that patch lands into mainline. I don't have an eMMC to test it in XU4 but I'm pretty confident that it will solve the issue.
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.
Quoted 7 lines
But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Quoted 24 lines
drivers/mmc/core/pwrseq_emmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/mmc/core/pwrseq_emmc.c +3
-4@@ -84,11 +84,11 @@ struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,/* * register reset handler to ensure emmc reset also from -* emergency_reboot(), priority 129 schedules it just before -* system reboot +* emergency_reboot(), priority 255 is the highest priority +* so it will be executed before any system reboot handler. */ pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb; - pwrseq->reset_nb.priority =129 ; + pwrseq->reset_nb.priority =255 ;register_restart_handler (&pwrseq->reset_nb); pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops; --2.4.3
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>
Thanks, should I post it as a proper patch or are adding it to your series? I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
Best regards,
Signature · 3 lines
Javier Martinez Canillas Open Source Group Samsung Research America
v2 cover Switch to generic syscon regmap based drivers
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Quoted 5 lines
Best regards,
--
Javier Martinez Canillas
Open Source Group
Samsung Research America
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
Quoted 25 lines · Alim Akhtar
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>
+Cc Ulf,
Javier,
First of all, thanks Javier for digging into the issue. Actually I have Odroid U3 but because of user-space limitations (which I need for other work) I cannot test all of mainline patches there.
Quoted 9 lines
Quoted 2 lines
Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.
Either way we don't have to hurry, I think.
Best regards,
Krzysztof
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
Quoted 67 lines · Krzysztof Kozlowski
Quoted 25 lines · Alim Akhtar
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>+Cc Ulf,
Javier,
First of all, thanks Javier for digging into the issue. Actually I have Odroid U3 but because of user-space limitations (which I need for other work) I cannot test all of mainline patches there.
Quoted 9 lines
Quoted 2 lines
Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.
Quoted 2 lines
Either way we don't have to hurry, I think.
I am fine, no hurry, lets give these a bit more time to hear from other. Thanks
Quoted 3 lines
Best regards,
Krzysztof
v2 cover Switch to generic syscon regmap based drivers
In reply to Krzysztof KozlowskiHi Krzysztof/Ulf/Kukjin
Quoted 67 lines · Krzysztof Kozlowski
Quoted 25 lines · Alim Akhtar
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>+Cc Ulf,
Javier,
First of all, thanks Javier for digging into the issue. Actually I have Odroid U3 but because of user-space limitations (which I need for other work) I cannot test all of mainline patches there.
Quoted 9 lines
Quoted 2 lines
Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.
Quoted 2 lines
Either way we don't have to hurry, I think.
Is It the right time to get this series in?
Thanks!!
Quoted 2 lines
Best regards,
Krzysztof
Signature · 2 lines
Regards, Alim
v2 cover Switch to generic syscon regmap based drivers
Hello Alim,
On Thu, Nov 19, 2015 at 3:06 PM, Alim Akhtar <[email protected]> wrote:
[snip]
Quoted 16 lines
Quoted 16 lines
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.
Quoted 4 lines
Quoted 2 lines
Either way we don't have to hurry, I think.
Is It the right time to get this series in?
The patch that the series had as a dependency made it to v4.4-rc1 as commit 1c6e58d83615 ("mmc: pwrseq: Use highest priority for eMMC restart handler") so it should be safe now to pick this series for v4.5.
Quoted 2 lines
Thanks!!
Best regards,
Javier
v2 cover Switch to generic syscon regmap based drivers
In reply to Alim AkhtarQuoted 71 lines · Alim Akhtar
Hi Krzysztof/Ulf/Kukjin
Quoted 67 lines · Krzysztof Kozlowski
Quoted 25 lines · Alim Akhtar
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>+Cc Ulf,
Javier,
First of all, thanks Javier for digging into the issue. Actually I have Odroid U3 but because of user-space limitations (which I need for other work) I cannot test all of mainline patches there.
Quoted 9 lines
Quoted 2 lines
Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.
Quoted 5 lines
Quoted 2 lines
Either way we don't have to hurry, I think.
Is It the right time to get this series in?
Thanks!!
I started applying it but stopped at #5. It should be squashed with #6 to get rid of (not important) conflict between syscon reboot and existing Exynos restart handler:
syscon-poweroff syscon-poweroff: pm_power_off already claimed c001e52c exynos_power_off
syscon-poweroff: probe of syscon-poweroff failed with error -16
The conflict is not really an issue because of ordering of init calls the Exynos will register itself before syscon. Nevertheless splitting the patches does not really make sense... so please merge #5 with #6.
Best regards,
Krzysztof
Alim Akhtar
reviewerv2 cover Switch to generic syscon regmap based drivers
Hi Krzysztof,
Quoted 82 lines · Krzysztof Kozlowski
Quoted 71 lines · Alim Akhtar
Hi Krzysztof/Ulf/Kukjin
Quoted 67 lines · Krzysztof Kozlowski
Quoted 25 lines · Alim Akhtar
Quoted 23 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 17 lines
Quoted 17 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>+Cc Ulf,
Javier,
First of all, thanks Javier for digging into the issue. Actually I have Odroid U3 but because of user-space limitations (which I need for other work) I cannot test all of mainline patches there.
Quoted 9 lines
Quoted 2 lines
Thanks, should I post it as a proper patch or are adding it to your series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy for maintainers to pickup ) and probably CCing Ulf for his feedback.
Quoted 3 lines
I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
Javier, Alim, Ulf,
I am not grabbing any more patches for v4.4 because I doubt that they could be merged to arm-soc for this cycle. My last pull requests for v4.4 is still pending...
This means that I plan to pick up these series for v4.5, after closing v4.4 merge window (unless Kukjin picks it also). Because of that, we have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would be a nice way to solve dependency.Quoted 5 lines
Quoted 2 lines
Either way we don't have to hurry, I think.
Is It the right time to get this series in?
Thanks!!I started applying it but stopped at #5. It should be squashed with #6 to get rid of (not important) conflict between syscon reboot and existing Exynos restart handler:
Quoted 8 lines
syscon-poweroff syscon-poweroff:
pm_power_offalready claimedc001e52cexynos_power_off
syscon-poweroff: probe of syscon-poweroff failed with error -16The conflict is not really an issue because of ordering of init calls the Exynos will register itself before syscon. Nevertheless splitting the patches does not really make sense... so please merge #5 with #6.
Hmm...nice catch..will send v3 shortly after merging patch #5 and #6.
Quoted 4 lines
Best regards,
Krzysztof
v2 cover Switch to generic syscon regmap based drivers
In reply to Javier Martinez CanillasQuoted 25 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 19 lines
Quoted 19 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Signed-off-by Javier Martinez Canillas <[email protected]>---
Quoted 8 lines
Quoted 3 lines
Looks good.
Reviewed-by Alim Akhtar <[email protected]>Thanks, should I post it as a proper patch or are adding it to your series? I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
Javier,
Can you please post your fix right now? so that I could take this series for v4.4 of late pull-request...
Thanks,
Kukjin
v2 cover Switch to generic syscon regmap based drivers
Quoted 30 lines · Kukjin Kim
Quoted 29 lines · Javier Martinez Canillas
Hello Alim,
On 10/21/2015 04:50 PM, Alim Akhtar wrote:
[snip]
Quoted 22 lines
Quoted 12 lines
[0]:
Fromc9b250ee03bae338339b70693e906145c719f783Mon Sep 17 00:00:00 2001
From: Javier Martinez Canillas <[email protected]>
Date: Wed, 21 Oct 2015 11:59:44 +0200
Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
handlerThe
pwrseq_emmcdriver does a eMMC card reset before a system reboot to allow broken or limited ROM boot-loaders, that don't have an eMMC reset logic, to be able to read the second stage from the eMMC.Quoted 7 lines
But this has to be called before a system reboot handler and while most of them use the priority 128, there are other restart handlers (such as the syscon-reboot one) that use a higher priority. So, use the highest priority to make sure that the eMMC hw is reset before a system reboot.
Signed-off-by Javier Martinez Canillas <[email protected]>---
Looks good.
Reviewed-by Alim Akhtar <[email protected]>
Quoted 9 lines
Quoted 4 lines
Thanks, should I post it as a proper patch or are adding it to your series? I think the latter is more reasonable so with an ack from Ulf, all patches can go through the linux-samsung tree.
Javier,
Can you please post your fix right now? so that I could take this series for v4.4 of late pull-request...
I found the patch in linux-arm-kernel ml just now....let me see. Please kindly ignore previous my comments...
Thanks,
Kukjin
v2 cover Switch to generic syscon regmap based drivers
In reply to Alim AkhtarQuoted 19 lines · Alim Akhtar
Now we have a nice way to reboot/poweroff system using a generic syscon regmap based drivers, this series moves exynos SoCs to make use of the same.
Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select fromKconfigAlim Akhtar (6):
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
ARM: exynos: selectPOWER_RESET_SYSCONand
POWER_RESET_SYSCON_POWEROFF
ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
Quoted 8 lines
arch/arm/boot/dts/exynos3250.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos4.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5.dtsi | 14 ++++++++++++ arch/arm/boot/dts/exynos5410.dtsi | 14 ++++++++++++ arch/arm/mach-exynos/Kconfig | 3 +++ arch/arm/mach-exynos/pmu.c | 43 ------------------------------------- 6 files changed, 59 insertions(+), 43 deletions(-)
Entire patchset tested on Odroid XU3-Lite and Trats2 boards:
Best regards,
Krzysztof