ARM: OMAP: dra7: powerdomain data: Register SoC specific powerdomains
authorLokesh Vutla <lokeshvutla@ti.com>
Sat, 12 Aug 2017 04:06:02 +0000 (09:36 +0530)
committerTony Lindgren <tony@atomide.com>
Mon, 14 Aug 2017 17:33:29 +0000 (10:33 -0700)
Custom efuse powerdomain is always on in dra72 ES2.0
and dra76 SoCs. So register it as aon for these SoCs.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/powerdomains7xx_data.c

index eb350a67313367ca8c3fe405f0119c7225832180..f50963916a211382aea622c9a26f755f4fad08ad 100644 (file)
@@ -29,6 +29,7 @@
 #include "prcm44xx.h"
 #include "prm7xx.h"
 #include "prcm_mpu7xx.h"
+#include "soc.h"
 
 /* iva_7xx_pwrdm: IVA-HD power domain */
 static struct powerdomain iva_7xx_pwrdm = {
@@ -63,6 +64,14 @@ static struct powerdomain custefuse_7xx_pwrdm = {
        .flags            = PWRDM_HAS_LOWPOWERSTATECHANGE,
 };
 
+/* custefuse_aon_7xx_pwrdm: Customer efuse controller power domain */
+static struct powerdomain custefuse_aon_7xx_pwrdm = {
+       .name             = "custefuse_pwrdm",
+       .prcm_offs        = DRA7XX_PRM_CUSTEFUSE_INST,
+       .prcm_partition   = DRA7XX_PRM_PARTITION,
+       .pwrsts           = PWRSTS_ON,
+};
+
 /* ipu_7xx_pwrdm: Audio back end power domain */
 static struct powerdomain ipu_7xx_pwrdm = {
        .name             = "ipu_pwrdm",
@@ -350,7 +359,6 @@ static struct powerdomain eve1_7xx_pwrdm = {
 static struct powerdomain *powerdomains_dra7xx[] __initdata = {
        &iva_7xx_pwrdm,
        &rtc_7xx_pwrdm,
-       &custefuse_7xx_pwrdm,
        &ipu_7xx_pwrdm,
        &dss_7xx_pwrdm,
        &l4per_7xx_pwrdm,
@@ -374,9 +382,32 @@ static struct powerdomain *powerdomains_dra7xx[] __initdata = {
        NULL
 };
 
+static struct powerdomain *powerdomains_dra76x[] __initdata = {
+       &custefuse_aon_7xx_pwrdm,
+       NULL
+};
+
+static struct powerdomain *powerdomains_dra74x[] __initdata = {
+       &custefuse_7xx_pwrdm,
+       NULL
+};
+
+static struct powerdomain *powerdomains_dra72x[] __initdata = {
+       &custefuse_aon_7xx_pwrdm,
+       NULL
+};
+
 void __init dra7xx_powerdomains_init(void)
 {
        pwrdm_register_platform_funcs(&omap4_pwrdm_operations);
        pwrdm_register_pwrdms(powerdomains_dra7xx);
+
+       if (soc_is_dra76x())
+               pwrdm_register_pwrdms(powerdomains_dra76x);
+       else if (soc_is_dra74x())
+               pwrdm_register_pwrdms(powerdomains_dra74x);
+       else if (soc_is_dra72x())
+               pwrdm_register_pwrdms(powerdomains_dra72x);
+
        pwrdm_complete_init();
 }