Skip to content

Commit

Permalink
clk: qcom: gcc-sc8280xp: Add missing GDSC flags
Browse files Browse the repository at this point in the history
[ Upstream commit 2fd02de ]

All of the 8280's GCC GDSCs can and should use the retain registers so
as not to lose their state when entering lower power modes.

Fixes: d65d005 ("clk: qcom: add sc8280xp GCC driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20230620-topic-sc8280_gccgdsc-v2-1-562c1428c10d@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
konradybcio authored and gregkh committed Sep 13, 2023
1 parent 747848b commit 06d3a7e
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions drivers/clk/qcom/gcc-sc8280xp.c
Expand Up @@ -6760,7 +6760,7 @@ static struct gdsc pcie_0_tunnel_gdsc = {
.name = "pcie_0_tunnel_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE,
.flags = VOTABLE | RETAIN_FF_ENABLE,
};

static struct gdsc pcie_1_tunnel_gdsc = {
Expand All @@ -6771,7 +6771,7 @@ static struct gdsc pcie_1_tunnel_gdsc = {
.name = "pcie_1_tunnel_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE,
.flags = VOTABLE | RETAIN_FF_ENABLE,
};

/*
Expand All @@ -6786,7 +6786,7 @@ static struct gdsc pcie_2a_gdsc = {
.name = "pcie_2a_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE | ALWAYS_ON,
.flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
};

static struct gdsc pcie_2b_gdsc = {
Expand All @@ -6797,7 +6797,7 @@ static struct gdsc pcie_2b_gdsc = {
.name = "pcie_2b_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE | ALWAYS_ON,
.flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
};

static struct gdsc pcie_3a_gdsc = {
Expand All @@ -6808,7 +6808,7 @@ static struct gdsc pcie_3a_gdsc = {
.name = "pcie_3a_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE | ALWAYS_ON,
.flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
};

static struct gdsc pcie_3b_gdsc = {
Expand All @@ -6819,7 +6819,7 @@ static struct gdsc pcie_3b_gdsc = {
.name = "pcie_3b_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE | ALWAYS_ON,
.flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
};

static struct gdsc pcie_4_gdsc = {
Expand All @@ -6830,7 +6830,7 @@ static struct gdsc pcie_4_gdsc = {
.name = "pcie_4_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = VOTABLE | ALWAYS_ON,
.flags = VOTABLE | RETAIN_FF_ENABLE | ALWAYS_ON,
};

static struct gdsc ufs_card_gdsc = {
Expand All @@ -6839,6 +6839,7 @@ static struct gdsc ufs_card_gdsc = {
.name = "ufs_card_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc ufs_phy_gdsc = {
Expand All @@ -6847,6 +6848,7 @@ static struct gdsc ufs_phy_gdsc = {
.name = "ufs_phy_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc usb30_mp_gdsc = {
Expand All @@ -6855,6 +6857,7 @@ static struct gdsc usb30_mp_gdsc = {
.name = "usb30_mp_gdsc",
},
.pwrsts = PWRSTS_RET_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc usb30_prim_gdsc = {
Expand All @@ -6863,6 +6866,7 @@ static struct gdsc usb30_prim_gdsc = {
.name = "usb30_prim_gdsc",
},
.pwrsts = PWRSTS_RET_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc usb30_sec_gdsc = {
Expand All @@ -6871,6 +6875,7 @@ static struct gdsc usb30_sec_gdsc = {
.name = "usb30_sec_gdsc",
},
.pwrsts = PWRSTS_RET_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc emac_0_gdsc = {
Expand All @@ -6879,6 +6884,7 @@ static struct gdsc emac_0_gdsc = {
.name = "emac_0_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct gdsc emac_1_gdsc = {
Expand All @@ -6887,6 +6893,7 @@ static struct gdsc emac_1_gdsc = {
.name = "emac_1_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.flags = RETAIN_FF_ENABLE,
};

static struct clk_regmap *gcc_sc8280xp_clocks[] = {
Expand Down

0 comments on commit 06d3a7e

Please sign in to comment.