|
5 | 5 | * Copyright (c) 2015 ROCKCHIP, Co. Ltd.
|
6 | 6 | */
|
7 | 7 |
|
| 8 | +#include <linux/arm-smccc.h> |
8 | 9 | #include <linux/io.h>
|
9 | 10 | #include <linux/iopoll.h>
|
10 | 11 | #include <linux/err.h>
|
|
20 | 21 | #include <linux/regmap.h>
|
21 | 22 | #include <linux/mfd/syscon.h>
|
22 | 23 | #include <soc/rockchip/pm_domains.h>
|
| 24 | +#include <soc/rockchip/rockchip_sip.h> |
23 | 25 | #include <dt-bindings/power/px30-power.h>
|
24 | 26 | #include <dt-bindings/power/rockchip,rv1126-power.h>
|
25 | 27 | #include <dt-bindings/power/rk3036-power.h>
|
@@ -540,6 +542,7 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
|
540 | 542 | struct generic_pm_domain *genpd = &pd->genpd;
|
541 | 543 | u32 pd_pwr_offset = pd->info->pwr_offset;
|
542 | 544 | bool is_on, is_mem_on = false;
|
| 545 | + struct arm_smccc_res res; |
543 | 546 |
|
544 | 547 | if (pd->info->pwr_mask == 0)
|
545 | 548 | return;
|
@@ -567,6 +570,11 @@ static void rockchip_do_pmu_set_power_domain(struct rockchip_pm_domain *pd,
|
567 | 570 | genpd->name, is_on);
|
568 | 571 | return;
|
569 | 572 | }
|
| 573 | + |
| 574 | + /* Inform firmware to keep this pd on or off */ |
| 575 | + arm_smccc_smc(ROCKCHIP_SIP_SUSPEND_MODE, ROCKCHIP_SLEEP_PD_CONFIG, |
| 576 | + pmu->info->pwr_offset + pd_pwr_offset, |
| 577 | + pd->info->pwr_mask, on, 0, 0, 0, &res); |
570 | 578 | }
|
571 | 579 |
|
572 | 580 | static int rockchip_pd_power(struct rockchip_pm_domain *pd, bool power_on)
|
|
0 commit comments