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>
This commit is contained in:
Sven Schmitt 2018-07-24 09:46:07 +00:00 committed by Shawn Guo
parent 9f4d61d531
commit b0682d485f
1 changed files with 10 additions and 6 deletions

View File

@ -247,6 +247,7 @@ builtin_platform_driver(imx_pgc_power_domain_driver)
#define GPC_PGC_DOMAIN_ARM 0 #define GPC_PGC_DOMAIN_ARM 0
#define GPC_PGC_DOMAIN_PU 1 #define GPC_PGC_DOMAIN_PU 1
#define GPC_PGC_DOMAIN_DISPLAY 2 #define GPC_PGC_DOMAIN_DISPLAY 2
#define GPC_PGC_DOMAIN_PCI 3
static struct genpd_power_state imx6_pm_domain_pu_state = { static struct genpd_power_state imx6_pm_domain_pu_state = {
.power_off_latency_ns = 25000, .power_off_latency_ns = 25000,
@ -254,12 +255,13 @@ static struct genpd_power_state imx6_pm_domain_pu_state = {
}; };
static struct imx_pm_domain imx_gpc_domains[] = { static struct imx_pm_domain imx_gpc_domains[] = {
{ [GPC_PGC_DOMAIN_ARM] {
.base = { .base = {
.name = "ARM", .name = "ARM",
.flags = GENPD_FLAG_ALWAYS_ON, .flags = GENPD_FLAG_ALWAYS_ON,
}, },
}, { },
[GPC_PGC_DOMAIN_PU] {
.base = { .base = {
.name = "PU", .name = "PU",
.power_off = imx6_pm_domain_power_off, .power_off = imx6_pm_domain_power_off,
@ -269,7 +271,8 @@ static struct imx_pm_domain imx_gpc_domains[] = {
}, },
.reg_offs = 0x260, .reg_offs = 0x260,
.cntr_pdn_bit = 0, .cntr_pdn_bit = 0,
}, { },
[GPC_PGC_DOMAIN_DISPLAY] {
.base = { .base = {
.name = "DISPLAY", .name = "DISPLAY",
.power_off = imx6_pm_domain_power_off, .power_off = imx6_pm_domain_power_off,
@ -277,7 +280,8 @@ static struct imx_pm_domain imx_gpc_domains[] = {
}, },
.reg_offs = 0x240, .reg_offs = 0x240,
.cntr_pdn_bit = 4, .cntr_pdn_bit = 4,
}, { },
[GPC_PGC_DOMAIN_PCI] {
.base = { .base = {
.name = "PCI", .name = "PCI",
.power_off = imx6_pm_domain_power_off, .power_off = imx6_pm_domain_power_off,
@ -348,8 +352,8 @@ static const struct regmap_config imx_gpc_regmap_config = {
}; };
static struct generic_pm_domain *imx_gpc_onecell_domains[] = { static struct generic_pm_domain *imx_gpc_onecell_domains[] = {
&imx_gpc_domains[0].base, &imx_gpc_domains[GPC_PGC_DOMAIN_ARM].base,
&imx_gpc_domains[1].base, &imx_gpc_domains[GPC_PGC_DOMAIN_PU].base,
}; };
static struct genpd_onecell_data imx_gpc_onecell_data = { static struct genpd_onecell_data imx_gpc_onecell_data = {