Skip to content

Commit 0a1f6dd

Browse files
committed
Merge tag 'clk-meson-v6.15-1' of https://github.com/BayLibre/clk-meson into clk-amlogic
Pull Amlogic clk driver updates from Jerome Brunet: - Fix mmc A clock gate definition on Amlogic g12 SoCs - Properly set cpu cluster A on Amlogic g12b - Fix 32k clock definition on Amlogic gxbb - Correct documentation typo on Amlogic a1 * tag 'clk-meson-v6.15-1' of https://github.com/BayLibre/clk-meson: clk: amlogic: a1: fix a typo clk: amlogic: gxbb: drop non existing 32k clock parent clk: amlogic: gxbb: drop incorrect flag on 32k clock clk: amlogic: g12b: fix cluster A parent data clk: amlogic: g12a: fix mmc A peripheral clock
2 parents 2014c95 + b3c221e commit 0a1f6dd

File tree

3 files changed

+33
-21
lines changed

3 files changed

+33
-21
lines changed

drivers/clk/meson/a1-pll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static struct platform_driver a1_pll_clkc_driver = {
356356
};
357357
module_platform_driver(a1_pll_clkc_driver);
358358

359-
MODULE_DESCRIPTION("Amlogic S4 PLL Clock Controller driver");
359+
MODULE_DESCRIPTION("Amlogic A1 PLL Clock Controller driver");
360360
MODULE_AUTHOR("Jian Hu <jian.hu@amlogic.com>");
361361
MODULE_AUTHOR("Dmitry Rokosov <ddrokosov@sberdevices.ru>");
362362
MODULE_LICENSE("GPL");

drivers/clk/meson/g12a.c

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,8 +1137,18 @@ static struct clk_regmap g12a_cpu_clk_div16_en = {
11371137
.hw.init = &(struct clk_init_data) {
11381138
.name = "cpu_clk_div16_en",
11391139
.ops = &clk_regmap_gate_ro_ops,
1140-
.parent_hws = (const struct clk_hw *[]) {
1141-
&g12a_cpu_clk.hw
1140+
.parent_data = &(const struct clk_parent_data) {
1141+
/*
1142+
* Note:
1143+
* G12A and G12B have different cpu clocks (with
1144+
* different struct clk_hw). We fallback to the global
1145+
* naming string mechanism so this clock picks
1146+
* up the appropriate one. Same goes for the other
1147+
* clock using cpu cluster A clock output and present
1148+
* on both G12 variant.
1149+
*/
1150+
.name = "cpu_clk",
1151+
.index = -1,
11421152
},
11431153
.num_parents = 1,
11441154
/*
@@ -1203,7 +1213,10 @@ static struct clk_regmap g12a_cpu_clk_apb_div = {
12031213
.hw.init = &(struct clk_init_data){
12041214
.name = "cpu_clk_apb_div",
12051215
.ops = &clk_regmap_divider_ro_ops,
1206-
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
1216+
.parent_data = &(const struct clk_parent_data) {
1217+
.name = "cpu_clk",
1218+
.index = -1,
1219+
},
12071220
.num_parents = 1,
12081221
},
12091222
};
@@ -1237,7 +1250,10 @@ static struct clk_regmap g12a_cpu_clk_atb_div = {
12371250
.hw.init = &(struct clk_init_data){
12381251
.name = "cpu_clk_atb_div",
12391252
.ops = &clk_regmap_divider_ro_ops,
1240-
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
1253+
.parent_data = &(const struct clk_parent_data) {
1254+
.name = "cpu_clk",
1255+
.index = -1,
1256+
},
12411257
.num_parents = 1,
12421258
},
12431259
};
@@ -1271,7 +1287,10 @@ static struct clk_regmap g12a_cpu_clk_axi_div = {
12711287
.hw.init = &(struct clk_init_data){
12721288
.name = "cpu_clk_axi_div",
12731289
.ops = &clk_regmap_divider_ro_ops,
1274-
.parent_hws = (const struct clk_hw *[]) { &g12a_cpu_clk.hw },
1290+
.parent_data = &(const struct clk_parent_data) {
1291+
.name = "cpu_clk",
1292+
.index = -1,
1293+
},
12751294
.num_parents = 1,
12761295
},
12771296
};
@@ -1306,13 +1325,6 @@ static struct clk_regmap g12a_cpu_clk_trace_div = {
13061325
.name = "cpu_clk_trace_div",
13071326
.ops = &clk_regmap_divider_ro_ops,
13081327
.parent_data = &(const struct clk_parent_data) {
1309-
/*
1310-
* Note:
1311-
* G12A and G12B have different cpu_clks (with
1312-
* different struct clk_hw). We fallback to the global
1313-
* naming string mechanism so cpu_clk_trace_div picks
1314-
* up the appropriate one.
1315-
*/
13161328
.name = "cpu_clk",
13171329
.index = -1,
13181330
},
@@ -4311,7 +4323,7 @@ static MESON_GATE(g12a_spicc_1, HHI_GCLK_MPEG0, 14);
43114323
static MESON_GATE(g12a_hiu_reg, HHI_GCLK_MPEG0, 19);
43124324
static MESON_GATE(g12a_mipi_dsi_phy, HHI_GCLK_MPEG0, 20);
43134325
static MESON_GATE(g12a_assist_misc, HHI_GCLK_MPEG0, 23);
4314-
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 4);
4326+
static MESON_GATE(g12a_emmc_a, HHI_GCLK_MPEG0, 24);
43154327
static MESON_GATE(g12a_emmc_b, HHI_GCLK_MPEG0, 25);
43164328
static MESON_GATE(g12a_emmc_c, HHI_GCLK_MPEG0, 26);
43174329
static MESON_GATE(g12a_audio_codec, HHI_GCLK_MPEG0, 28);

drivers/clk/meson/gxbb.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,14 +1266,13 @@ static struct clk_regmap gxbb_cts_i958 = {
12661266
},
12671267
};
12681268

1269+
/*
1270+
* This table skips a clock named 'cts_slow_oscin' in the documentation
1271+
* This clock does not exist yet in this controller or the AO one
1272+
*/
1273+
static u32 gxbb_32k_clk_parents_val_table[] = { 0, 2, 3 };
12691274
static const struct clk_parent_data gxbb_32k_clk_parent_data[] = {
12701275
{ .fw_name = "xtal", },
1271-
/*
1272-
* FIXME: This clock is provided by the ao clock controller but the
1273-
* clock is not yet part of the binding of this controller, so string
1274-
* name must be use to set this parent.
1275-
*/
1276-
{ .name = "cts_slow_oscin", .index = -1 },
12771276
{ .hw = &gxbb_fclk_div3.hw },
12781277
{ .hw = &gxbb_fclk_div5.hw },
12791278
};
@@ -1283,6 +1282,7 @@ static struct clk_regmap gxbb_32k_clk_sel = {
12831282
.offset = HHI_32K_CLK_CNTL,
12841283
.mask = 0x3,
12851284
.shift = 16,
1285+
.table = gxbb_32k_clk_parents_val_table,
12861286
},
12871287
.hw.init = &(struct clk_init_data){
12881288
.name = "32k_clk_sel",
@@ -1306,7 +1306,7 @@ static struct clk_regmap gxbb_32k_clk_div = {
13061306
&gxbb_32k_clk_sel.hw
13071307
},
13081308
.num_parents = 1,
1309-
.flags = CLK_SET_RATE_PARENT | CLK_DIVIDER_ROUND_CLOSEST,
1309+
.flags = CLK_SET_RATE_PARENT,
13101310
},
13111311
};
13121312

0 commit comments

Comments
 (0)