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

Commit 8b283c02 authored by Marc Zyngier's avatar Marc Zyngier Committed by Jason Cooper
Browse files

ARM: exynos4/5: convert pmu wakeup to stacked domains



Exynos has been (ab)using the gic_arch_extn to provide
wakeup from suspend, and it makes a lot of sense to convert
this code to use stacked domains instead.

This patch does just this, updating the DT files to actually
reflect what the HW provides.

BIG FAT WARNING: because the DTs were so far lying by not
exposing the fact that the PMU block is actually the first
interrupt controller in the chain for RTC, kernels with this patch
applied wont have any suspend-resume facility when booted
with old DTs, and old kernels with updated DTs may not even boot.

Also, I strongly suspect that there is more than two wake-up
interrupts on these platforms, but I leave it to the maintainers
to fix their mess.

Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/1426088693-15724-2-git-send-email-marc.zyngier@arm.com
[ jac: squash in maz's fixup from
  https://lkml.kernel.org/r/5506989D.9050703@arm.com

 ]
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent c517d838
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -130,6 +130,9 @@
		pmu_system_controller: system-controller@10020000 {
			compatible = "samsung,exynos3250-pmu", "syscon";
			reg = <0x10020000 0x4000>;
			interrupt-controller;
			#interrupt-cells = <3>;
			interrupt-parent = <&gic>;
		};

		mipi_phy: video-phy@10020710 {
@@ -184,6 +187,7 @@
			compatible = "samsung,exynos3250-rtc";
			reg = <0x10070000 0x100>;
			interrupts = <0 73 0>, <0 74 0>;
			interrupt-parent = <&pmu_system_controller>;
			status = "disabled";
		};

+4 −0
Original line number Diff line number Diff line
@@ -152,6 +152,9 @@
	pmu_system_controller: system-controller@10020000 {
		compatible = "samsung,exynos4210-pmu", "syscon";
		reg = <0x10020000 0x4000>;
		interrupt-controller;
		#interrupt-cells = <3>;
		interrupt-parent = <&gic>;
	};

	dsi_0: dsi@11C80000 {
@@ -264,6 +267,7 @@
	rtc@10070000 {
		compatible = "samsung,s3c6410-rtc";
		reg = <0x10070000 0x100>;
		interrupt-parent = <&pmu_system_controller>;
		interrupts = <0 44 0>, <0 45 0>;
		clocks = <&clock CLK_RTC>;
		clock-names = "rtc";
+4 −0
Original line number Diff line number Diff line
@@ -196,6 +196,9 @@
		clock-names = "clkout16";
		clocks = <&clock CLK_FIN_PLL>;
		#clock-cells = <1>;
		interrupt-controller;
		#interrupt-cells = <3>;
		interrupt-parent = <&gic>;
	};

	sysreg_system_controller: syscon@10050000 {
@@ -232,6 +235,7 @@
	rtc: rtc@101E0000 {
		clocks = <&clock CLK_RTC>;
		clock-names = "rtc";
		interrupt-parent = <&pmu_system_controller>;
		status = "disabled";
	};

+4 −0
Original line number Diff line number Diff line
@@ -327,6 +327,7 @@
	rtc: rtc@101E0000 {
		clocks = <&clock CLK_RTC>;
		clock-names = "rtc";
		interrupt-parent = <&pmu_system_controller>;
		status = "disabled";
	};

@@ -769,6 +770,9 @@
		clock-names = "clkout16";
		clocks = <&clock CLK_FIN_PLL>;
		#clock-cells = <1>;
		interrupt-controller;
		#interrupt-cells = <3>;
		interrupt-parent = <&gic>;
	};

	sysreg_system_controller: syscon@10050000 {
+5 −10
Original line number Diff line number Diff line
@@ -166,16 +166,14 @@ static void __init exynos_init_io(void)
	exynos_map_io();
}

/*
 * Apparently, these SoCs are not able to wake-up from suspend using
 * the PMU. Too bad. Should they suddenly become capable of such a
 * feat, the matches below should be moved to suspend.c.
 */
static const struct of_device_id exynos_dt_pmu_match[] = {
	{ .compatible = "samsung,exynos3250-pmu" },
	{ .compatible = "samsung,exynos4210-pmu" },
	{ .compatible = "samsung,exynos4212-pmu" },
	{ .compatible = "samsung,exynos4412-pmu" },
	{ .compatible = "samsung,exynos4415-pmu" },
	{ .compatible = "samsung,exynos5250-pmu" },
	{ .compatible = "samsung,exynos5260-pmu" },
	{ .compatible = "samsung,exynos5410-pmu" },
	{ .compatible = "samsung,exynos5420-pmu" },
	{ /*sentinel*/ },
};

@@ -186,9 +184,6 @@ static void exynos_map_pmu(void)
	np = of_find_matching_node(NULL, exynos_dt_pmu_match);
	if (np)
		pmu_base_addr = of_iomap(np, 0);

	if (!pmu_base_addr)
		panic("failed to find exynos pmu register\n");
}

static void __init exynos_init_irq(void)
Loading