diff options
| -rw-r--r-- | Documentation/devicetree/bindings/arm/cpus.txt | 9 | ||||
| -rw-r--r-- | arch/arm/mach-rockchip/platsmp.c | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/arm/cpus.txt b/Documentation/devicetree/bindings/arm/cpus.txt index fc446347ab6d..b2aacbe16ed9 100644 --- a/Documentation/devicetree/bindings/arm/cpus.txt +++ b/Documentation/devicetree/bindings/arm/cpus.txt | |||
| @@ -227,6 +227,15 @@ nodes to be present and contain the properties described below. | |||
| 227 | # List of phandles to idle state nodes supported | 227 | # List of phandles to idle state nodes supported |
| 228 | by this cpu [3]. | 228 | by this cpu [3]. |
| 229 | 229 | ||
| 230 | - rockchip,pmu | ||
| 231 | Usage: optional for systems that have an "enable-method" | ||
| 232 | property value of "rockchip,rk3066-smp" | ||
| 233 | While optional, it is the preferred way to get access to | ||
| 234 | the cpu-core power-domains. | ||
| 235 | Value type: <phandle> | ||
| 236 | Definition: Specifies the syscon node controlling the cpu core | ||
| 237 | power domains. | ||
| 238 | |||
| 230 | Example 1 (dual-cluster big.LITTLE system 32-bit): | 239 | Example 1 (dual-cluster big.LITTLE system 32-bit): |
| 231 | 240 | ||
| 232 | cpus { | 241 | cpus { |
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c index 4c36fbf99afb..57b53b32e103 100644 --- a/arch/arm/mach-rockchip/platsmp.c +++ b/arch/arm/mach-rockchip/platsmp.c | |||
| @@ -155,6 +155,19 @@ static int __init rockchip_smp_prepare_pmu(void) | |||
| 155 | struct device_node *node; | 155 | struct device_node *node; |
| 156 | void __iomem *pmu_base; | 156 | void __iomem *pmu_base; |
| 157 | 157 | ||
| 158 | /* | ||
| 159 | * This function is only called via smp_ops->smp_prepare_cpu(). | ||
| 160 | * That only happens if a "/cpus" device tree node exists | ||
| 161 | * and has an "enable-method" property that selects the SMP | ||
| 162 | * operations defined herein. | ||
| 163 | */ | ||
| 164 | node = of_find_node_by_path("/cpus"); | ||
| 165 | |||
| 166 | pmu = syscon_regmap_lookup_by_phandle(node, "rockchip,pmu"); | ||
| 167 | of_node_put(node); | ||
| 168 | if (!IS_ERR(pmu)) | ||
| 169 | return 0; | ||
| 170 | |||
| 158 | pmu = syscon_regmap_lookup_by_compatible("rockchip,rk3066-pmu"); | 171 | pmu = syscon_regmap_lookup_by_compatible("rockchip,rk3066-pmu"); |
| 159 | if (!IS_ERR(pmu)) | 172 | if (!IS_ERR(pmu)) |
| 160 | return 0; | 173 | return 0; |
