mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
Merge branch 'clk-fixes' into clk-next
Resolve conflicts with i.MX95 changes88768d6f8c("clk: imx95-blk-ctl: Rename lvds and displaymix csr blk") in clk-imx andaacc875a44("clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data") in clk-fixes. * clk-fixes: clk: sunxi-ng: v3s: Fix TCON clock parents clk: sunxi-ng: v3s: Fix CSI1 MCLK clock name clk: sunxi-ng: v3s: Fix CSI SCLK clock name dt-bindings: clock: mediatek: Add #reset-cells property for MT8188 clk: imx: Fix an out-of-bounds access in dispmix_csr_clk_dev_data clk: scmi: Handle case where child clocks are initialized before their parents clk: sunxi-ng: a523: Mark MBUS clock as critical
This commit is contained in:
@@ -52,6 +52,9 @@ properties:
|
||||
'#clock-cells':
|
||||
const: 1
|
||||
|
||||
'#reset-cells':
|
||||
const: 1
|
||||
|
||||
required:
|
||||
- compatible
|
||||
- reg
|
||||
|
||||
@@ -110,7 +110,7 @@ examples:
|
||||
reg = <0x01cb4000 0x1000>;
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_CSI>,
|
||||
<&ccu CLK_CSI1_SCLK>,
|
||||
<&ccu CLK_CSI_SCLK>,
|
||||
<&ccu CLK_DRAM_CSI>;
|
||||
clock-names = "bus",
|
||||
"mod",
|
||||
|
||||
@@ -79,7 +79,7 @@ examples:
|
||||
reg = <0x01cb8000 0x1000>;
|
||||
interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_CSI>,
|
||||
<&ccu CLK_CSI1_SCLK>,
|
||||
<&ccu CLK_CSI_SCLK>,
|
||||
<&ccu CLK_DRAM_CSI>;
|
||||
clock-names = "bus", "mod", "ram";
|
||||
resets = <&ccu RST_BUS_CSI>;
|
||||
|
||||
@@ -103,7 +103,7 @@ examples:
|
||||
reg = <0x01cb1000 0x1000>;
|
||||
interrupts = <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_CSI>,
|
||||
<&ccu CLK_CSI1_SCLK>;
|
||||
<&ccu CLK_CSI_SCLK>;
|
||||
clock-names = "bus", "mod";
|
||||
resets = <&ccu RST_BUS_CSI>;
|
||||
|
||||
|
||||
@@ -652,7 +652,7 @@
|
||||
reg = <0x01cb4000 0x3000>;
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&ccu CLK_BUS_CSI>,
|
||||
<&ccu CLK_CSI1_SCLK>,
|
||||
<&ccu CLK_CSI_SCLK>,
|
||||
<&ccu CLK_DRAM_CSI>;
|
||||
clock-names = "bus", "mod", "ram";
|
||||
resets = <&ccu RST_BUS_CSI>;
|
||||
|
||||
@@ -404,6 +404,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
|
||||
const struct scmi_handle *handle = sdev->handle;
|
||||
struct scmi_protocol_handle *ph;
|
||||
const struct clk_ops *scmi_clk_ops_db[SCMI_MAX_CLK_OPS] = {};
|
||||
struct scmi_clk *sclks;
|
||||
|
||||
if (!handle)
|
||||
return -ENODEV;
|
||||
@@ -430,18 +431,21 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
|
||||
transport_is_atomic = handle->is_transport_atomic(handle,
|
||||
&atomic_threshold_us);
|
||||
|
||||
for (idx = 0; idx < count; idx++) {
|
||||
struct scmi_clk *sclk;
|
||||
const struct clk_ops *scmi_ops;
|
||||
sclks = devm_kcalloc(dev, count, sizeof(*sclks), GFP_KERNEL);
|
||||
if (!sclks)
|
||||
return -ENOMEM;
|
||||
|
||||
sclk = devm_kzalloc(dev, sizeof(*sclk), GFP_KERNEL);
|
||||
if (!sclk)
|
||||
return -ENOMEM;
|
||||
for (idx = 0; idx < count; idx++)
|
||||
hws[idx] = &sclks[idx].hw;
|
||||
|
||||
for (idx = 0; idx < count; idx++) {
|
||||
struct scmi_clk *sclk = &sclks[idx];
|
||||
const struct clk_ops *scmi_ops;
|
||||
|
||||
sclk->info = scmi_proto_clk_ops->info_get(ph, idx);
|
||||
if (!sclk->info) {
|
||||
dev_dbg(dev, "invalid clock info for idx %d\n", idx);
|
||||
devm_kfree(dev, sclk);
|
||||
hws[idx] = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -479,13 +483,11 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
|
||||
if (err) {
|
||||
dev_err(dev, "failed to register clock %d\n", idx);
|
||||
devm_kfree(dev, sclk->parent_data);
|
||||
devm_kfree(dev, sclk);
|
||||
hws[idx] = NULL;
|
||||
} else {
|
||||
dev_dbg(dev, "Registered clock:%s%s\n",
|
||||
sclk->info->name,
|
||||
scmi_ops->enable ? " (atomic ops)" : "");
|
||||
hws[idx] = &sclk->hw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -385,7 +385,8 @@ static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT(mbus_clk, "mbus", mbus_parents,
|
||||
0, 0, /* no P */
|
||||
24, 3, /* mux */
|
||||
BIT(31), /* gate */
|
||||
0, CCU_FEATURE_UPDATE_BIT);
|
||||
CLK_IS_CRITICAL,
|
||||
CCU_FEATURE_UPDATE_BIT);
|
||||
|
||||
static const struct clk_hw *mbus_hws[] = { &mbus_clk.common.hw };
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
|
||||
0x104, 0, 4, 24, 3, BIT(31),
|
||||
CLK_SET_RATE_NO_REPARENT);
|
||||
|
||||
static const char * const tcon_parents[] = { "pll-video" };
|
||||
static const char * const tcon_parents[] = { "pll-video", "pll-periph0" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(tcon_clk, "tcon", tcon_parents,
|
||||
0x118, 0, 4, 24, 3, BIT(31),
|
||||
CLK_SET_RATE_NO_REPARENT);
|
||||
@@ -363,11 +363,11 @@ static const char * const csi_mclk_parents[] = { "osc24M", "pll-video",
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi0_mclk_clk, "csi0-mclk", csi_mclk_parents,
|
||||
0x130, 0, 5, 8, 3, BIT(15), 0);
|
||||
|
||||
static const char * const csi1_sclk_parents[] = { "pll-video", "pll-isp" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi1_sclk_clk, "csi-sclk", csi1_sclk_parents,
|
||||
static const char * const csi_sclk_parents[] = { "pll-video", "pll-isp" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi_sclk_clk, "csi-sclk", csi_sclk_parents,
|
||||
0x134, 16, 4, 24, 3, BIT(31), 0);
|
||||
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi1_mclk_clk, "csi-mclk", csi_mclk_parents,
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(csi1_mclk_clk, "csi1-mclk", csi_mclk_parents,
|
||||
0x134, 0, 5, 8, 3, BIT(15), 0);
|
||||
|
||||
static SUNXI_CCU_M_WITH_GATE(ve_clk, "ve", "pll-ve",
|
||||
@@ -453,7 +453,7 @@ static struct ccu_common *sun8i_v3s_ccu_clks[] = {
|
||||
&tcon_clk.common,
|
||||
&csi_misc_clk.common,
|
||||
&csi0_mclk_clk.common,
|
||||
&csi1_sclk_clk.common,
|
||||
&csi_sclk_clk.common,
|
||||
&csi1_mclk_clk.common,
|
||||
&ve_clk.common,
|
||||
&ac_dig_clk.common,
|
||||
@@ -552,7 +552,7 @@ static struct clk_hw_onecell_data sun8i_v3s_hw_clks = {
|
||||
[CLK_TCON0] = &tcon_clk.common.hw,
|
||||
[CLK_CSI_MISC] = &csi_misc_clk.common.hw,
|
||||
[CLK_CSI0_MCLK] = &csi0_mclk_clk.common.hw,
|
||||
[CLK_CSI1_SCLK] = &csi1_sclk_clk.common.hw,
|
||||
[CLK_CSI_SCLK] = &csi_sclk_clk.common.hw,
|
||||
[CLK_CSI1_MCLK] = &csi1_mclk_clk.common.hw,
|
||||
[CLK_VE] = &ve_clk.common.hw,
|
||||
[CLK_AC_DIG] = &ac_dig_clk.common.hw,
|
||||
@@ -634,7 +634,7 @@ static struct clk_hw_onecell_data sun8i_v3_hw_clks = {
|
||||
[CLK_TCON0] = &tcon_clk.common.hw,
|
||||
[CLK_CSI_MISC] = &csi_misc_clk.common.hw,
|
||||
[CLK_CSI0_MCLK] = &csi0_mclk_clk.common.hw,
|
||||
[CLK_CSI1_SCLK] = &csi1_sclk_clk.common.hw,
|
||||
[CLK_CSI_SCLK] = &csi_sclk_clk.common.hw,
|
||||
[CLK_CSI1_MCLK] = &csi1_mclk_clk.common.hw,
|
||||
[CLK_VE] = &ve_clk.common.hw,
|
||||
[CLK_AC_DIG] = &ac_dig_clk.common.hw,
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
#define CLK_TCON0 64
|
||||
#define CLK_CSI_MISC 65
|
||||
#define CLK_CSI0_MCLK 66
|
||||
#define CLK_CSI1_SCLK 67
|
||||
#define CLK_CSI_SCLK 67
|
||||
#define CLK_CSI1_MCLK 68
|
||||
#define CLK_VE 69
|
||||
#define CLK_AC_DIG 70
|
||||
|
||||
Reference in New Issue
Block a user