From 0688017ad40081f62989bd25fa64ad35b19abbec Mon Sep 17 00:00:00 2001 From: Rajendra Nayak Date: Tue, 6 Dec 2016 14:52:19 +0530 Subject: [HACK] clk: qcom: Hook up gpu_gx gdsc as a parent of gpu_gdsc the GPU device on msm8996 requires 2 gdscs to be powered on. With powerdomains we have a limitation wherein only one powerdomain can be associated with a given device in DT. So hook the 2 gdscs together so both are powered on/off when the gpu driver needs them to. [Amit] We use this hack until genpd allows multiple powerdomains to be associated with a device. Signed-off-by: Rajendra Nayak Signed-off-by: Amit Kucheria --- drivers/clk/qcom/mmcc-msm8996.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/clk/qcom/mmcc-msm8996.c b/drivers/clk/qcom/mmcc-msm8996.c index 7235510eac94..92e2fb88ee60 100644 --- a/drivers/clk/qcom/mmcc-msm8996.c +++ b/drivers/clk/qcom/mmcc-msm8996.c @@ -3053,16 +3053,6 @@ static struct gdsc mdss_gdsc = { .pwrsts = PWRSTS_OFF_ON, }; -static struct gdsc gpu_gdsc = { - .gdscr = 0x4034, - .gds_hw_ctrl = 0x4038, - .pd = { - .name = "gpu", - }, - .pwrsts = PWRSTS_OFF_ON, - .flags = VOTABLE, -}; - static struct gdsc gpu_gx_gdsc = { .gdscr = 0x4024, .clamp_io_ctrl = 0x4300, @@ -3075,6 +3065,17 @@ static struct gdsc gpu_gx_gdsc = { .flags = CLAMP_IO, }; +static struct gdsc gpu_gdsc = { + .gdscr = 0x4034, + .gds_hw_ctrl = 0x4038, + .pd = { + .name = "gpu", + }, + .parent = &gpu_gx_gdsc.pd, + .pwrsts = PWRSTS_OFF_ON, + .flags = VOTABLE, +}; + static struct clk_regmap *mmcc_msm8996_clocks[] = { [MMPLL0_EARLY] = &mmpll0_early.clkr, [MMPLL0_PLL] = &mmpll0.clkr, -- cgit v1.2.3