Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 60db7e5f authored by Thomas Abraham's avatar Thomas Abraham Committed by Kukjin Kim
Browse files

ARM: EXYNOS: Fix crash on soft reset on EXYNOS5440



The soft-reset control register is located in the XMU controller space.
Map this controller space before writing to the soft-reset controller
register.

Signed-off-by: default avatarThomas Abraham <thomas.ab@samsung.com>
Signed-off-by: default avatarGirish K S <ks.giri@samsung.com>
Signed-off-by: default avatarKukjin <kgene.kim@samsung.com>
parent e877a5aa
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -299,6 +299,7 @@ void exynos4_restart(char mode, const char *cmd)

void exynos5_restart(char mode, const char *cmd)
{
	struct device_node *np;
	u32 val;
	void __iomem *addr;

@@ -306,8 +307,9 @@ void exynos5_restart(char mode, const char *cmd)
		val = 0x1;
		addr = EXYNOS_SWRESET;
	} else if (of_machine_is_compatible("samsung,exynos5440")) {
		val = (0x10 << 20) | (0x1 << 16);
		addr = EXYNOS5440_SWRESET;
		np = of_find_compatible_node(NULL, NULL, "samsung,exynos5440-clock");
		addr = of_iomap(np, 0) + 0xcc;
		val = (0xfff << 20) | (0x1 << 16);
	} else {
		pr_err("%s: cannot support non-DT\n", __func__);
		return;