mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 02:21:39 -04:00
Merge tag 'qcom-clk-fixes-for-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into clk-fixes
Pull Qualcomm clock driver fixes from Bjorn Andersson: - Fix the Eliza display clock controller to avoid RCG stall. Revert the rework of the "PHY mux" clock, as this broke PCIe on several different targets - Drop (and correct one) bouncing maintainer email addresses in Qualcomm clk DeviceTree bindings * tag 'qcom-clk-fixes-for-7.2' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux: dt-bindings: clock: Replace bouncing emails Revert "clk: qcom: regmap-phy-mux: Rework the implementation" clk: qcom: dispcc-eliza: Fix disp_cc_mdss_mdp_clk_src RCG stall on Eliza EVK
This commit is contained in:
@@ -7,8 +7,6 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Qualcomm Global Clock & Reset Controller on MSM8937, MSM8940, MSM8953 and SDM439
|
||||
|
||||
maintainers:
|
||||
- Adam Skladowski <a_skl39@protonmail.com>
|
||||
- Sireesh Kodali <sireeshkodali@protonmail.com>
|
||||
- Barnabas Czeman <barnabas.czeman@mainlining.org>
|
||||
|
||||
description: |
|
||||
|
||||
@@ -8,7 +8,6 @@ title: Qualcomm Global Clock & Reset Controller on IPQ9574
|
||||
|
||||
maintainers:
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
- Anusha Rao <quic_anusha@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm global clock control module provides the clocks, resets and power
|
||||
|
||||
@@ -8,7 +8,6 @@ title: Qualcomm Networking Sub System Clock & Reset Controller on IPQ9574 and IP
|
||||
|
||||
maintainers:
|
||||
- Bjorn Andersson <andersson@kernel.org>
|
||||
- Anusha Rao <quic_anusha@quicinc.com>
|
||||
|
||||
description: |
|
||||
Qualcomm networking sub system clock control module provides the clocks,
|
||||
|
||||
@@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||
title: Samsung Exynos Auto v9 SoC clock controller
|
||||
|
||||
maintainers:
|
||||
- Chanho Park <chanho61.park@samsung.com>
|
||||
- Alim Akhtar <alim.akhtar@samsung.com>
|
||||
- Chanwoo Choi <cw00.choi@samsung.com>
|
||||
- Krzysztof Kozlowski <krzk@kernel.org>
|
||||
- Sylwester Nawrocki <s.nawrocki@samsung.com>
|
||||
|
||||
@@ -15,66 +15,48 @@
|
||||
#define PHY_MUX_PHY_SRC 0
|
||||
#define PHY_MUX_REF_SRC 2
|
||||
|
||||
#define XO_RATE 19200000UL
|
||||
|
||||
static inline struct clk_regmap_phy_mux *to_clk_regmap_phy_mux(struct clk_regmap *clkr)
|
||||
{
|
||||
return container_of(clkr, struct clk_regmap_phy_mux, clkr);
|
||||
}
|
||||
|
||||
static unsigned long phy_mux_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
|
||||
static int phy_mux_is_enabled(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_regmap *clkr = to_clk_regmap(hw);
|
||||
struct clk_regmap_phy_mux *phy_mux = to_clk_regmap_phy_mux(clkr);
|
||||
u32 val;
|
||||
unsigned int val;
|
||||
|
||||
regmap_read(clkr->regmap, phy_mux->reg, &val);
|
||||
val = FIELD_GET(PHY_MUX_MASK, val);
|
||||
|
||||
switch (FIELD_GET(PHY_MUX_MASK, val)) {
|
||||
case PHY_MUX_PHY_SRC:
|
||||
return ULONG_MAX;
|
||||
case PHY_MUX_REF_SRC:
|
||||
return XO_RATE;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
WARN_ON(val != PHY_MUX_PHY_SRC && val != PHY_MUX_REF_SRC);
|
||||
|
||||
return val == PHY_MUX_PHY_SRC;
|
||||
}
|
||||
|
||||
static int phy_mux_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
|
||||
{
|
||||
if (req->rate == XO_RATE || req->rate == ULONG_MAX)
|
||||
return 0;
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int phy_mux_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
|
||||
static int phy_mux_enable(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_regmap *clkr = to_clk_regmap(hw);
|
||||
struct clk_regmap_phy_mux *phy_mux = to_clk_regmap_phy_mux(clkr);
|
||||
u32 val;
|
||||
|
||||
switch (rate) {
|
||||
case XO_RATE:
|
||||
val = PHY_MUX_REF_SRC;
|
||||
break;
|
||||
case ULONG_MAX:
|
||||
val = PHY_MUX_PHY_SRC;
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
return regmap_update_bits(clkr->regmap, phy_mux->reg,
|
||||
PHY_MUX_MASK,
|
||||
FIELD_PREP(PHY_MUX_MASK, PHY_MUX_PHY_SRC));
|
||||
}
|
||||
|
||||
static void phy_mux_disable(struct clk_hw *hw)
|
||||
{
|
||||
struct clk_regmap *clkr = to_clk_regmap(hw);
|
||||
struct clk_regmap_phy_mux *phy_mux = to_clk_regmap_phy_mux(clkr);
|
||||
|
||||
regmap_update_bits(clkr->regmap, phy_mux->reg,
|
||||
PHY_MUX_MASK,
|
||||
FIELD_PREP(PHY_MUX_MASK, val));
|
||||
|
||||
return 0;
|
||||
FIELD_PREP(PHY_MUX_MASK, PHY_MUX_REF_SRC));
|
||||
}
|
||||
|
||||
const struct clk_ops clk_regmap_phy_mux_ops = {
|
||||
.recalc_rate = phy_mux_recalc_rate,
|
||||
.determine_rate = phy_mux_determine_rate,
|
||||
.set_rate = phy_mux_set_rate,
|
||||
.enable = phy_mux_enable,
|
||||
.disable = phy_mux_disable,
|
||||
.is_enabled = phy_mux_is_enabled,
|
||||
};
|
||||
EXPORT_SYMBOL_GPL(clk_regmap_phy_mux_ops);
|
||||
|
||||
@@ -756,7 +756,7 @@ static struct clk_rcg2 disp_cc_mdss_mdp_clk_src = {
|
||||
.parent_data = disp_cc_parent_data_11,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_11),
|
||||
.flags = CLK_SET_RATE_PARENT,
|
||||
.ops = &clk_rcg2_shared_ops,
|
||||
.ops = &clk_rcg2_shared_no_init_park_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user