Skip to content

Commit 7bcf9ef

Browse files
xdarklightjbrun3t
authored andcommitted
clk: meson: meson8b: Make the video clock trees mutable
Switch from the "_ro" clock op variants to the mutable ones for all video clocks. This will allow the VPU driver to change the clocks as needed for the different video output modes. Signed-off-by: Martin Blumenstingl <[email protected]> Signed-off-by: Jerome Brunet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 040e165 commit 7bcf9ef

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

drivers/clk/meson/meson8b.c

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static struct clk_regmap meson8b_hdmi_pll_dco = {
207207
.hw.init = &(struct clk_init_data){
208208
/* sometimes also called "HPLL" or "HPLL PLL" */
209209
.name = "hdmi_pll_dco",
210-
.ops = &meson_clk_pll_ro_ops,
210+
.ops = &meson_clk_pll_ops,
211211
.parent_hws = (const struct clk_hw *[]) {
212212
&hdmi_pll_dco_in.hw
213213
},
@@ -224,7 +224,7 @@ static struct clk_regmap meson8b_hdmi_pll_lvds_out = {
224224
},
225225
.hw.init = &(struct clk_init_data){
226226
.name = "hdmi_pll_lvds_out",
227-
.ops = &clk_regmap_divider_ro_ops,
227+
.ops = &clk_regmap_divider_ops,
228228
.parent_hws = (const struct clk_hw *[]) {
229229
&meson8b_hdmi_pll_dco.hw
230230
},
@@ -242,7 +242,7 @@ static struct clk_regmap meson8b_hdmi_pll_hdmi_out = {
242242
},
243243
.hw.init = &(struct clk_init_data){
244244
.name = "hdmi_pll_hdmi_out",
245-
.ops = &clk_regmap_divider_ro_ops,
245+
.ops = &clk_regmap_divider_ops,
246246
.parent_hws = (const struct clk_hw *[]) {
247247
&meson8b_hdmi_pll_dco.hw
248248
},
@@ -1104,7 +1104,7 @@ static struct clk_regmap meson8b_vid_pll_lvds_en = {
11041104
},
11051105
.hw.init = &(struct clk_init_data){
11061106
.name = "vid_pll_lvds_en",
1107-
.ops = &clk_regmap_gate_ro_ops,
1107+
.ops = &clk_regmap_gate_ops,
11081108
.parent_hws = (const struct clk_hw *[]) {
11091109
&meson8b_hdmi_pll_lvds_out.hw
11101110
},
@@ -1121,7 +1121,7 @@ static struct clk_regmap meson8b_vid_pll_in_sel = {
11211121
},
11221122
.hw.init = &(struct clk_init_data){
11231123
.name = "vid_pll_in_sel",
1124-
.ops = &clk_regmap_mux_ro_ops,
1124+
.ops = &clk_regmap_mux_ops,
11251125
/*
11261126
* TODO: depending on the SoC there is also a second parent:
11271127
* Meson8: unknown
@@ -1143,7 +1143,7 @@ static struct clk_regmap meson8b_vid_pll_in_en = {
11431143
},
11441144
.hw.init = &(struct clk_init_data){
11451145
.name = "vid_pll_in_en",
1146-
.ops = &clk_regmap_gate_ro_ops,
1146+
.ops = &clk_regmap_gate_ops,
11471147
.parent_hws = (const struct clk_hw *[]) {
11481148
&meson8b_vid_pll_in_sel.hw
11491149
},
@@ -1160,7 +1160,7 @@ static struct clk_regmap meson8b_vid_pll_pre_div = {
11601160
},
11611161
.hw.init = &(struct clk_init_data){
11621162
.name = "vid_pll_pre_div",
1163-
.ops = &clk_regmap_divider_ro_ops,
1163+
.ops = &clk_regmap_divider_ops,
11641164
.parent_hws = (const struct clk_hw *[]) {
11651165
&meson8b_vid_pll_in_en.hw
11661166
},
@@ -1177,7 +1177,7 @@ static struct clk_regmap meson8b_vid_pll_post_div = {
11771177
},
11781178
.hw.init = &(struct clk_init_data){
11791179
.name = "vid_pll_post_div",
1180-
.ops = &clk_regmap_divider_ro_ops,
1180+
.ops = &clk_regmap_divider_ops,
11811181
.parent_hws = (const struct clk_hw *[]) {
11821182
&meson8b_vid_pll_pre_div.hw
11831183
},
@@ -1194,7 +1194,7 @@ static struct clk_regmap meson8b_vid_pll = {
11941194
},
11951195
.hw.init = &(struct clk_init_data){
11961196
.name = "vid_pll",
1197-
.ops = &clk_regmap_mux_ro_ops,
1197+
.ops = &clk_regmap_mux_ops,
11981198
/* TODO: parent 0x2 is vid_pll_pre_div_mult7_div2 */
11991199
.parent_hws = (const struct clk_hw *[]) {
12001200
&meson8b_vid_pll_pre_div.hw,
@@ -1213,7 +1213,7 @@ static struct clk_regmap meson8b_vid_pll_final_div = {
12131213
},
12141214
.hw.init = &(struct clk_init_data){
12151215
.name = "vid_pll_final_div",
1216-
.ops = &clk_regmap_divider_ro_ops,
1216+
.ops = &clk_regmap_divider_ops,
12171217
.parent_hws = (const struct clk_hw *[]) {
12181218
&meson8b_vid_pll.hw
12191219
},
@@ -1240,7 +1240,7 @@ static struct clk_regmap meson8b_vclk_in_sel = {
12401240
},
12411241
.hw.init = &(struct clk_init_data){
12421242
.name = "vclk_in_sel",
1243-
.ops = &clk_regmap_mux_ro_ops,
1243+
.ops = &clk_regmap_mux_ops,
12441244
.parent_hws = meson8b_vclk_mux_parent_hws,
12451245
.num_parents = ARRAY_SIZE(meson8b_vclk_mux_parent_hws),
12461246
.flags = CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,
@@ -1254,7 +1254,7 @@ static struct clk_regmap meson8b_vclk_in_en = {
12541254
},
12551255
.hw.init = &(struct clk_init_data){
12561256
.name = "vclk_in_en",
1257-
.ops = &clk_regmap_gate_ro_ops,
1257+
.ops = &clk_regmap_gate_ops,
12581258
.parent_hws = (const struct clk_hw *[]) {
12591259
&meson8b_vclk_in_sel.hw
12601260
},
@@ -1270,7 +1270,7 @@ static struct clk_regmap meson8b_vclk_en = {
12701270
},
12711271
.hw.init = &(struct clk_init_data){
12721272
.name = "vclk_en",
1273-
.ops = &clk_regmap_gate_ro_ops,
1273+
.ops = &clk_regmap_gate_ops,
12741274
.parent_hws = (const struct clk_hw *[]) {
12751275
&meson8b_vclk_in_en.hw
12761276
},
@@ -1286,7 +1286,7 @@ static struct clk_regmap meson8b_vclk_div1_gate = {
12861286
},
12871287
.hw.init = &(struct clk_init_data){
12881288
.name = "vclk_div1_en",
1289-
.ops = &clk_regmap_gate_ro_ops,
1289+
.ops = &clk_regmap_gate_ops,
12901290
.parent_hws = (const struct clk_hw *[]) {
12911291
&meson8b_vclk_en.hw
12921292
},
@@ -1316,7 +1316,7 @@ static struct clk_regmap meson8b_vclk_div2_div_gate = {
13161316
},
13171317
.hw.init = &(struct clk_init_data){
13181318
.name = "vclk_div2_en",
1319-
.ops = &clk_regmap_gate_ro_ops,
1319+
.ops = &clk_regmap_gate_ops,
13201320
.parent_hws = (const struct clk_hw *[]) {
13211321
&meson8b_vclk_div2_div.hw
13221322
},
@@ -1346,7 +1346,7 @@ static struct clk_regmap meson8b_vclk_div4_div_gate = {
13461346
},
13471347
.hw.init = &(struct clk_init_data){
13481348
.name = "vclk_div4_en",
1349-
.ops = &clk_regmap_gate_ro_ops,
1349+
.ops = &clk_regmap_gate_ops,
13501350
.parent_hws = (const struct clk_hw *[]) {
13511351
&meson8b_vclk_div4_div.hw
13521352
},
@@ -1376,7 +1376,7 @@ static struct clk_regmap meson8b_vclk_div6_div_gate = {
13761376
},
13771377
.hw.init = &(struct clk_init_data){
13781378
.name = "vclk_div6_en",
1379-
.ops = &clk_regmap_gate_ro_ops,
1379+
.ops = &clk_regmap_gate_ops,
13801380
.parent_hws = (const struct clk_hw *[]) {
13811381
&meson8b_vclk_div6_div.hw
13821382
},
@@ -1406,7 +1406,7 @@ static struct clk_regmap meson8b_vclk_div12_div_gate = {
14061406
},
14071407
.hw.init = &(struct clk_init_data){
14081408
.name = "vclk_div12_en",
1409-
.ops = &clk_regmap_gate_ro_ops,
1409+
.ops = &clk_regmap_gate_ops,
14101410
.parent_hws = (const struct clk_hw *[]) {
14111411
&meson8b_vclk_div12_div.hw
14121412
},
@@ -1423,7 +1423,7 @@ static struct clk_regmap meson8b_vclk2_in_sel = {
14231423
},
14241424
.hw.init = &(struct clk_init_data){
14251425
.name = "vclk2_in_sel",
1426-
.ops = &clk_regmap_mux_ro_ops,
1426+
.ops = &clk_regmap_mux_ops,
14271427
.parent_hws = meson8b_vclk_mux_parent_hws,
14281428
.num_parents = ARRAY_SIZE(meson8b_vclk_mux_parent_hws),
14291429
.flags = CLK_SET_RATE_PARENT | CLK_SET_RATE_NO_REPARENT,
@@ -1437,7 +1437,7 @@ static struct clk_regmap meson8b_vclk2_clk_in_en = {
14371437
},
14381438
.hw.init = &(struct clk_init_data){
14391439
.name = "vclk2_in_en",
1440-
.ops = &clk_regmap_gate_ro_ops,
1440+
.ops = &clk_regmap_gate_ops,
14411441
.parent_hws = (const struct clk_hw *[]) {
14421442
&meson8b_vclk2_in_sel.hw
14431443
},
@@ -1453,7 +1453,7 @@ static struct clk_regmap meson8b_vclk2_clk_en = {
14531453
},
14541454
.hw.init = &(struct clk_init_data){
14551455
.name = "vclk2_en",
1456-
.ops = &clk_regmap_gate_ro_ops,
1456+
.ops = &clk_regmap_gate_ops,
14571457
.parent_hws = (const struct clk_hw *[]) {
14581458
&meson8b_vclk2_clk_in_en.hw
14591459
},
@@ -1469,7 +1469,7 @@ static struct clk_regmap meson8b_vclk2_div1_gate = {
14691469
},
14701470
.hw.init = &(struct clk_init_data){
14711471
.name = "vclk2_div1_en",
1472-
.ops = &clk_regmap_gate_ro_ops,
1472+
.ops = &clk_regmap_gate_ops,
14731473
.parent_hws = (const struct clk_hw *[]) {
14741474
&meson8b_vclk2_clk_en.hw
14751475
},
@@ -1499,7 +1499,7 @@ static struct clk_regmap meson8b_vclk2_div2_div_gate = {
14991499
},
15001500
.hw.init = &(struct clk_init_data){
15011501
.name = "vclk2_div2_en",
1502-
.ops = &clk_regmap_gate_ro_ops,
1502+
.ops = &clk_regmap_gate_ops,
15031503
.parent_hws = (const struct clk_hw *[]) {
15041504
&meson8b_vclk2_div2_div.hw
15051505
},
@@ -1529,7 +1529,7 @@ static struct clk_regmap meson8b_vclk2_div4_div_gate = {
15291529
},
15301530
.hw.init = &(struct clk_init_data){
15311531
.name = "vclk2_div4_en",
1532-
.ops = &clk_regmap_gate_ro_ops,
1532+
.ops = &clk_regmap_gate_ops,
15331533
.parent_hws = (const struct clk_hw *[]) {
15341534
&meson8b_vclk2_div4_div.hw
15351535
},
@@ -1559,7 +1559,7 @@ static struct clk_regmap meson8b_vclk2_div6_div_gate = {
15591559
},
15601560
.hw.init = &(struct clk_init_data){
15611561
.name = "vclk2_div6_en",
1562-
.ops = &clk_regmap_gate_ro_ops,
1562+
.ops = &clk_regmap_gate_ops,
15631563
.parent_hws = (const struct clk_hw *[]) {
15641564
&meson8b_vclk2_div6_div.hw
15651565
},
@@ -1589,7 +1589,7 @@ static struct clk_regmap meson8b_vclk2_div12_div_gate = {
15891589
},
15901590
.hw.init = &(struct clk_init_data){
15911591
.name = "vclk2_div12_en",
1592-
.ops = &clk_regmap_gate_ro_ops,
1592+
.ops = &clk_regmap_gate_ops,
15931593
.parent_hws = (const struct clk_hw *[]) {
15941594
&meson8b_vclk2_div12_div.hw
15951595
},
@@ -1614,7 +1614,7 @@ static struct clk_regmap meson8b_cts_enct_sel = {
16141614
},
16151615
.hw.init = &(struct clk_init_data){
16161616
.name = "cts_enct_sel",
1617-
.ops = &clk_regmap_mux_ro_ops,
1617+
.ops = &clk_regmap_mux_ops,
16181618
.parent_hws = meson8b_vclk_enc_mux_parent_hws,
16191619
.num_parents = ARRAY_SIZE(meson8b_vclk_enc_mux_parent_hws),
16201620
.flags = CLK_SET_RATE_PARENT,
@@ -1628,7 +1628,7 @@ static struct clk_regmap meson8b_cts_enct = {
16281628
},
16291629
.hw.init = &(struct clk_init_data){
16301630
.name = "cts_enct",
1631-
.ops = &clk_regmap_gate_ro_ops,
1631+
.ops = &clk_regmap_gate_ops,
16321632
.parent_hws = (const struct clk_hw *[]) {
16331633
&meson8b_cts_enct_sel.hw
16341634
},
@@ -1645,7 +1645,7 @@ static struct clk_regmap meson8b_cts_encp_sel = {
16451645
},
16461646
.hw.init = &(struct clk_init_data){
16471647
.name = "cts_encp_sel",
1648-
.ops = &clk_regmap_mux_ro_ops,
1648+
.ops = &clk_regmap_mux_ops,
16491649
.parent_hws = meson8b_vclk_enc_mux_parent_hws,
16501650
.num_parents = ARRAY_SIZE(meson8b_vclk_enc_mux_parent_hws),
16511651
.flags = CLK_SET_RATE_PARENT,
@@ -1659,7 +1659,7 @@ static struct clk_regmap meson8b_cts_encp = {
16591659
},
16601660
.hw.init = &(struct clk_init_data){
16611661
.name = "cts_encp",
1662-
.ops = &clk_regmap_gate_ro_ops,
1662+
.ops = &clk_regmap_gate_ops,
16631663
.parent_hws = (const struct clk_hw *[]) {
16641664
&meson8b_cts_encp_sel.hw
16651665
},
@@ -1676,7 +1676,7 @@ static struct clk_regmap meson8b_cts_enci_sel = {
16761676
},
16771677
.hw.init = &(struct clk_init_data){
16781678
.name = "cts_enci_sel",
1679-
.ops = &clk_regmap_mux_ro_ops,
1679+
.ops = &clk_regmap_mux_ops,
16801680
.parent_hws = meson8b_vclk_enc_mux_parent_hws,
16811681
.num_parents = ARRAY_SIZE(meson8b_vclk_enc_mux_parent_hws),
16821682
.flags = CLK_SET_RATE_PARENT,
@@ -1690,7 +1690,7 @@ static struct clk_regmap meson8b_cts_enci = {
16901690
},
16911691
.hw.init = &(struct clk_init_data){
16921692
.name = "cts_enci",
1693-
.ops = &clk_regmap_gate_ro_ops,
1693+
.ops = &clk_regmap_gate_ops,
16941694
.parent_hws = (const struct clk_hw *[]) {
16951695
&meson8b_cts_enci_sel.hw
16961696
},
@@ -1707,7 +1707,7 @@ static struct clk_regmap meson8b_hdmi_tx_pixel_sel = {
17071707
},
17081708
.hw.init = &(struct clk_init_data){
17091709
.name = "hdmi_tx_pixel_sel",
1710-
.ops = &clk_regmap_mux_ro_ops,
1710+
.ops = &clk_regmap_mux_ops,
17111711
.parent_hws = meson8b_vclk_enc_mux_parent_hws,
17121712
.num_parents = ARRAY_SIZE(meson8b_vclk_enc_mux_parent_hws),
17131713
.flags = CLK_SET_RATE_PARENT,
@@ -1721,7 +1721,7 @@ static struct clk_regmap meson8b_hdmi_tx_pixel = {
17211721
},
17221722
.hw.init = &(struct clk_init_data){
17231723
.name = "hdmi_tx_pixel",
1724-
.ops = &clk_regmap_gate_ro_ops,
1724+
.ops = &clk_regmap_gate_ops,
17251725
.parent_hws = (const struct clk_hw *[]) {
17261726
&meson8b_hdmi_tx_pixel_sel.hw
17271727
},
@@ -1746,7 +1746,7 @@ static struct clk_regmap meson8b_cts_encl_sel = {
17461746
},
17471747
.hw.init = &(struct clk_init_data){
17481748
.name = "cts_encl_sel",
1749-
.ops = &clk_regmap_mux_ro_ops,
1749+
.ops = &clk_regmap_mux_ops,
17501750
.parent_hws = meson8b_vclk2_enc_mux_parent_hws,
17511751
.num_parents = ARRAY_SIZE(meson8b_vclk2_enc_mux_parent_hws),
17521752
.flags = CLK_SET_RATE_PARENT,
@@ -1760,7 +1760,7 @@ static struct clk_regmap meson8b_cts_encl = {
17601760
},
17611761
.hw.init = &(struct clk_init_data){
17621762
.name = "cts_encl",
1763-
.ops = &clk_regmap_gate_ro_ops,
1763+
.ops = &clk_regmap_gate_ops,
17641764
.parent_hws = (const struct clk_hw *[]) {
17651765
&meson8b_cts_encl_sel.hw
17661766
},
@@ -1777,7 +1777,7 @@ static struct clk_regmap meson8b_cts_vdac0_sel = {
17771777
},
17781778
.hw.init = &(struct clk_init_data){
17791779
.name = "cts_vdac0_sel",
1780-
.ops = &clk_regmap_mux_ro_ops,
1780+
.ops = &clk_regmap_mux_ops,
17811781
.parent_hws = meson8b_vclk2_enc_mux_parent_hws,
17821782
.num_parents = ARRAY_SIZE(meson8b_vclk2_enc_mux_parent_hws),
17831783
.flags = CLK_SET_RATE_PARENT,
@@ -1791,7 +1791,7 @@ static struct clk_regmap meson8b_cts_vdac0 = {
17911791
},
17921792
.hw.init = &(struct clk_init_data){
17931793
.name = "cts_vdac0",
1794-
.ops = &clk_regmap_gate_ro_ops,
1794+
.ops = &clk_regmap_gate_ops,
17951795
.parent_hws = (const struct clk_hw *[]) {
17961796
&meson8b_cts_vdac0_sel.hw
17971797
},

0 commit comments

Comments
 (0)