Skip to contentSkip to conversation

ARM: EXYNOS: fix software reset logic for EXYNOS5440 SOC

PATCH In review 이정석 2 participants 2 messages May 23, 2013 – May 24, 2013

Subsystems (3)
lore
Share & tools
lore

이정석

author
#0 lore raw

PATCH 1/1 ARM: EXYNOS: fix software reset logic for EXYNOS5440 SOC

This patch fixes software reset logic. Software reset applies only to powered-on domains in SOC because software reset to all domains causes reboot failure.

---
 arch/arm/mach-exynos/common.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/common.c +1 -0
index 7f431dd..a22615d 100644
@@ -317,9 +317,13 @@ void exynos5_restart(char mode, const char *cmd)
 		val = 0x1;
 		addr = EXYNOS_SWRESET;
 	} else if (of_machine_is_compatible("samsung,exynos5440")) {
+		u32 status;
 		np = of_find_compatible_node(NULL, NULL,

"samsung,exynos5440-clock");
+ addr = of_iomap(np, 0) + 0xbc;
+ status = __raw_readl(addr);
addr = of_iomap(np, 0) + 0xcc;
- val = (0xfff << 20) | (0x1 << 16);
+ val = __raw_readl(addr);
+ val = (val & 0xffff0000) | (status & 0xffff);
} else {
pr_err("%s: cannot support non-DT\n", __func__); return;

Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 15 lines · 이정석

This patch fixes software reset logic. Software reset applies only to powered-on domains in SOC because software reset to all domains causes reboot failure.

---
  arch/arm/mach-exynos/common.c |    6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)
arch/arm/mach-exynos/common.c +0 -0
index 7f431dd..a22615d 100644

arch/arm/mach-exynos/common.c void exynos5_restart(char mode, const char *cmd) · line 322

Quoted 6 lines
arch/arm/mach-exynos/common.c +1 -0
@@ -317,9 +317,13 @@ void exynos5_restart(char mode, const char *cmd)
  		val = 0x1;
  		addr = EXYNOS_SWRESET;
  	} else if (of_machine_is_compatible("samsung,exynos5440")) {
+		u32 status;
  		np = of_find_compatible_node(NULL, NULL,
 "samsung,exynos5440-clock");

line wrapped?

Quoted 9 lines
arch/arm/mach-exynos/common.c +4 -1
+		addr = of_iomap(np, 0) + 0xbc;
+		status = __raw_readl(addr);
  		addr = of_iomap(np, 0) + 0xcc;
-		val = (0xfff<<  20) | (0x1<<  16);
+		val = __raw_readl(addr);
+		val = (val&  0xffff0000) | (status&  0xffff);
  	} else {
  		pr_err("%s: cannot support non-DT\n", __func__);

return;

Looks good to me, applied after fixing line wrapped.

Thanks.

- Kukjin