diff options
Diffstat (limited to 'arch/arm/mach-imx/gpc.c')
-rw-r--r-- | arch/arm/mach-imx/gpc.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/arch/arm/mach-imx/gpc.c b/arch/arm/mach-imx/gpc.c index 80bad29d609a..8c4467fad837 100644 --- a/arch/arm/mach-imx/gpc.c +++ b/arch/arm/mach-imx/gpc.c | |||
@@ -291,8 +291,6 @@ void __init imx_gpc_check_dt(void) | |||
291 | } | 291 | } |
292 | } | 292 | } |
293 | 293 | ||
294 | #ifdef CONFIG_PM_GENERIC_DOMAINS | ||
295 | |||
296 | static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd) | 294 | static void _imx6q_pm_pu_power_off(struct generic_pm_domain *genpd) |
297 | { | 295 | { |
298 | int iso, iso2sw; | 296 | int iso, iso2sw; |
@@ -399,7 +397,6 @@ static struct genpd_onecell_data imx_gpc_onecell_data = { | |||
399 | static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg) | 397 | static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg) |
400 | { | 398 | { |
401 | struct clk *clk; | 399 | struct clk *clk; |
402 | bool is_off; | ||
403 | int i; | 400 | int i; |
404 | 401 | ||
405 | imx6q_pu_domain.reg = pu_reg; | 402 | imx6q_pu_domain.reg = pu_reg; |
@@ -416,18 +413,13 @@ static int imx_gpc_genpd_init(struct device *dev, struct regulator *pu_reg) | |||
416 | } | 413 | } |
417 | imx6q_pu_domain.num_clks = i; | 414 | imx6q_pu_domain.num_clks = i; |
418 | 415 | ||
419 | is_off = IS_ENABLED(CONFIG_PM); | 416 | /* Enable power always in case bootloader disabled it. */ |
420 | if (is_off) { | 417 | imx6q_pm_pu_power_on(&imx6q_pu_domain.base); |
421 | _imx6q_pm_pu_power_off(&imx6q_pu_domain.base); | 418 | |
422 | } else { | 419 | if (!IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) |
423 | /* | 420 | return 0; |
424 | * Enable power if compiled without CONFIG_PM in case the | ||
425 | * bootloader disabled it. | ||
426 | */ | ||
427 | imx6q_pm_pu_power_on(&imx6q_pu_domain.base); | ||
428 | } | ||
429 | 421 | ||
430 | pm_genpd_init(&imx6q_pu_domain.base, NULL, is_off); | 422 | pm_genpd_init(&imx6q_pu_domain.base, NULL, false); |
431 | return of_genpd_add_provider_onecell(dev->of_node, | 423 | return of_genpd_add_provider_onecell(dev->of_node, |
432 | &imx_gpc_onecell_data); | 424 | &imx_gpc_onecell_data); |
433 | 425 | ||
@@ -437,13 +429,6 @@ clk_err: | |||
437 | return -EINVAL; | 429 | return -EINVAL; |
438 | } | 430 | } |
439 | 431 | ||
440 | #else | ||
441 | static inline int imx_gpc_genpd_init(struct device *dev, struct regulator *reg) | ||
442 | { | ||
443 | return 0; | ||
444 | } | ||
445 | #endif /* CONFIG_PM_GENERIC_DOMAINS */ | ||
446 | |||
447 | static int imx_gpc_probe(struct platform_device *pdev) | 432 | static int imx_gpc_probe(struct platform_device *pdev) |
448 | { | 433 | { |
449 | struct regulator *pu_reg; | 434 | struct regulator *pu_reg; |