From 0cc598915fc787193ddb7401a11f80c17ccbabe4 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Fri, 9 Oct 2015 15:46:18 +0200 Subject: [PATCH 1/3] soc: rockchip: Restrict to ARCH_ROCKCHIP By definition this directory contains drivers that are specific to the Rockchip architecture. All Kconfig options should therefore depend on ARCH_ROCKCHIP to avoid exposing these symbols on other architectures. For example, this options currently shows up as new when doing an incremental build on PowerPC. Signed-off-by: Thierry Reding [add COMPILE_TEST alternative condition] Signed-off-by: Heiko Stuebner --- drivers/soc/rockchip/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/rockchip/Kconfig b/drivers/soc/rockchip/Kconfig index 6ee03994801c..7140ff825598 100644 --- a/drivers/soc/rockchip/Kconfig +++ b/drivers/soc/rockchip/Kconfig @@ -1,3 +1,5 @@ +if ARCH_ROCKCHIP || COMPILE_TEST + # # Rockchip Soc drivers # @@ -12,3 +14,5 @@ config ROCKCHIP_PM_DOMAINS mode. The RK3288 PMU is dedicated for managing the power of the whole chip. If unsure, say N. + +endif From c3ce5b3768b17120dca852513af211c4acd3d2b0 Mon Sep 17 00:00:00 2001 From: Heiko Stuebner Date: Thu, 15 Oct 2015 14:35:01 +0200 Subject: [PATCH 2/3] soc: rockchip: power-domain: don't try to print the clock name in error case When we never got the the clock-reference, i.e. when IS_ERR(clk) is true, don't try to print the clock name via %pC as this of course produces a null-pointer-dereference in __clk_get_name(). Signed-off-by: Heiko Stuebner Reviewed-by: Caesar Wang --- drivers/soc/rockchip/pm_domains.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/rockchip/pm_domains.c b/drivers/soc/rockchip/pm_domains.c index 8268d5d2b852..534c58937a56 100644 --- a/drivers/soc/rockchip/pm_domains.c +++ b/drivers/soc/rockchip/pm_domains.c @@ -265,8 +265,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu, if (IS_ERR(clk)) { error = PTR_ERR(clk); dev_err(pmu->dev, - "%s: failed to get clk %pC (index %d): %d\n", - node->name, clk, i, error); + "%s: failed to get clk at index %d: %d\n", + node->name, i, error); goto err_out; } From 4681347153dba01836aca18ebcfb4101c927d8ec Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 16 Oct 2015 16:11:41 +0200 Subject: [PATCH 3/3] dt-bindings: Correct paths in Rockchip power domains binding document Signed-off-by: Geert Uytterhoeven Signed-off-by: Heiko Stuebner --- .../devicetree/bindings/soc/rockchip/power_domain.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt index 4be34188afe4..112756e11802 100644 --- a/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt +++ b/Documentation/devicetree/bindings/soc/rockchip/power_domain.txt @@ -13,7 +13,7 @@ Required properties for power domain controller: Required properties for power domain sub nodes: - reg: index of the power domain, should use macros in: - "include/dt-bindings/power-domain/rk3288.h" - for RK3288 type power domain. + "include/dt-bindings/power/rk3288-power.h" - for RK3288 type power domain. - clocks (optional): phandles to clocks which need to be enabled while power domain switches state. @@ -35,7 +35,7 @@ Node of a device using power domains must have a power-domains property, containing a phandle to the power device node and an index specifying which power domain to use. The index should use macros in: - "include/dt-bindings/power-domain/rk3288.h" - for rk3288 type power domain. + "include/dt-bindings/power/rk3288-power.h" - for rk3288 type power domain. Example of the node using power domain: