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

Commit 001d50c9 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Rafael J. Wysocki
Browse files

PM / Domains: Remove obsolete "samsung,power-domain" check



Currently the generic PM Domain code code checks for the presence of
both (generic) "power-domains" and (Samsung Exynos legacy)
"samsung,power-domain" properties in all device tree nodes representing
devices.

There are two issues with this:
  1. This imposes a small boot-time penalty on all platforms using DT,
  2. Platform-specific checks do not really belong in core framework
     code.

Remove the platform-specific check, as the last user of
"samsung,power-domain" was removed in commit 46dcf0ff ("ARM:
dts: exynos: Remove exynos4415.dtsi").  All other users were converted
before in commit 0da65870 ("ARM: dts: convert to generic power
domain bindings for exynos DT").

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Acked-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 50c4c4e2
Loading
Loading
Loading
Loading
+2 −14
Original line number Diff line number Diff line
@@ -2199,21 +2199,9 @@ int genpd_dev_pm_attach(struct device *dev)

	ret = of_parse_phandle_with_args(dev->of_node, "power-domains",
					"#power-domain-cells", 0, &pd_args);
	if (ret < 0) {
		if (ret != -ENOENT)
	if (ret < 0)
		return ret;

		/*
		 * Try legacy Samsung-specific bindings
		 * (for backwards compatibility of DT ABI)
		 */
		pd_args.args_count = 0;
		pd_args.np = of_parse_phandle(dev->of_node,
						"samsung,power-domain", 0);
		if (!pd_args.np)
			return -ENOENT;
	}

	mutex_lock(&gpd_list_lock);
	pd = genpd_get_from_provider(&pd_args);
	of_node_put(pd_args.np);