aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Schmitt <Sven.Schmitt@mixed-mode.de>2018-07-24 05:46:07 -0400
committerShawn Guo <shawnguo@kernel.org>2018-09-03 00:25:07 -0400
commitb0682d485f12a720a066ec65f00510df3532e160 (patch)
treebc1ac53f037d9418304cd7812a1b0ef94240b7ac
parent9f4d61d531e0efc9c3283963ae5ef7e314579191 (diff)
soc: imx: gpc: use GPC_PGC_DOMAIN_* indexes
Use GPC_PGC_DOMAIN_* indexes consistent. Signed-off-by: Sven Schmitt <sven.schmitt@mixed-mode.de> Reviewed-by: Leonard Crestez <leonard.crestez@nxp.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
-rw-r--r--drivers/soc/imx/gpc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/soc/imx/gpc.c b/drivers/soc/imx/gpc.c
index d160fc2a7b7a..c1d0ffdac6dd 100644
--- a/drivers/soc/imx/gpc.c
+++ b/drivers/soc/imx/gpc.c
@@ -247,6 +247,7 @@ builtin_platform_driver(imx_pgc_power_domain_driver)
247#define GPC_PGC_DOMAIN_ARM 0 247#define GPC_PGC_DOMAIN_ARM 0
248#define GPC_PGC_DOMAIN_PU 1 248#define GPC_PGC_DOMAIN_PU 1
249#define GPC_PGC_DOMAIN_DISPLAY 2 249#define GPC_PGC_DOMAIN_DISPLAY 2
250#define GPC_PGC_DOMAIN_PCI 3
250 251
251static struct genpd_power_state imx6_pm_domain_pu_state = { 252static struct genpd_power_state imx6_pm_domain_pu_state = {
252 .power_off_latency_ns = 25000, 253 .power_off_latency_ns = 25000,
@@ -254,12 +255,13 @@ static struct genpd_power_state imx6_pm_domain_pu_state = {
254}; 255};
255 256
256static struct imx_pm_domain imx_gpc_domains[] = { 257static struct imx_pm_domain imx_gpc_domains[] = {
257 { 258 [GPC_PGC_DOMAIN_ARM] {
258 .base = { 259 .base = {
259 .name = "ARM", 260 .name = "ARM",
260 .flags = GENPD_FLAG_ALWAYS_ON, 261 .flags = GENPD_FLAG_ALWAYS_ON,
261 }, 262 },
262 }, { 263 },
264 [GPC_PGC_DOMAIN_PU] {
263 .base = { 265 .base = {
264 .name = "PU", 266 .name = "PU",
265 .power_off = imx6_pm_domain_power_off, 267 .power_off = imx6_pm_domain_power_off,
@@ -269,7 +271,8 @@ static struct imx_pm_domain imx_gpc_domains[] = {
269 }, 271 },
270 .reg_offs = 0x260, 272 .reg_offs = 0x260,
271 .cntr_pdn_bit = 0, 273 .cntr_pdn_bit = 0,
272 }, { 274 },
275 [GPC_PGC_DOMAIN_DISPLAY] {
273 .base = { 276 .base = {
274 .name = "DISPLAY", 277 .name = "DISPLAY",
275 .power_off = imx6_pm_domain_power_off, 278 .power_off = imx6_pm_domain_power_off,
@@ -277,7 +280,8 @@ static struct imx_pm_domain imx_gpc_domains[] = {
277 }, 280 },
278 .reg_offs = 0x240, 281 .reg_offs = 0x240,
279 .cntr_pdn_bit = 4, 282 .cntr_pdn_bit = 4,
280 }, { 283 },
284 [GPC_PGC_DOMAIN_PCI] {
281 .base = { 285 .base = {
282 .name = "PCI", 286 .name = "PCI",
283 .power_off = imx6_pm_domain_power_off, 287 .power_off = imx6_pm_domain_power_off,
@@ -348,8 +352,8 @@ static const struct regmap_config imx_gpc_regmap_config = {
348}; 352};
349 353
350static struct generic_pm_domain *imx_gpc_onecell_domains[] = { 354static struct generic_pm_domain *imx_gpc_onecell_domains[] = {
351 &imx_gpc_domains[0].base, 355 &imx_gpc_domains[GPC_PGC_DOMAIN_ARM].base,
352 &imx_gpc_domains[1].base, 356 &imx_gpc_domains[GPC_PGC_DOMAIN_PU].base,
353}; 357};
354 358
355static struct genpd_onecell_data imx_gpc_onecell_data = { 359static struct genpd_onecell_data imx_gpc_onecell_data = {