Skip to content

Commit cf78031

Browse files
committed
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk fixes from Stephen Boyd: "A handful of const updates for reset ops and a couple fixes to the newly introduced IPQ4019 clock driver" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: ipq4019: add some fixed clocks for ddrppl and fepll clk: qcom: ipq4019: switch remaining defines to enums clk: qcom: Make reset_control_ops const clk: tegra: Make reset_control_ops const clk: sunxi: Make reset_control_ops const clk: atlas7: Make reset_control_ops const clk: rockchip: Make reset_control_ops const clk: mmp: Make reset_control_ops const clk: mediatek: Make reset_control_ops const
2 parents 1826907 + 2aac7dd commit cf78031

File tree

11 files changed

+45
-45
lines changed

11 files changed

+45
-45
lines changed

drivers/clk/mediatek/reset.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int mtk_reset(struct reset_controller_dev *rcdev,
5757
return mtk_reset_deassert(rcdev, id);
5858
}
5959

60-
static struct reset_control_ops mtk_reset_ops = {
60+
static const struct reset_control_ops mtk_reset_ops = {
6161
.assert = mtk_reset_assert,
6262
.deassert = mtk_reset_deassert,
6363
.reset = mtk_reset,

drivers/clk/mmp/reset.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static int mmp_clk_reset_deassert(struct reset_controller_dev *rcdev,
7474
return 0;
7575
}
7676

77-
static struct reset_control_ops mmp_clk_reset_ops = {
77+
static const struct reset_control_ops mmp_clk_reset_ops = {
7878
.assert = mmp_clk_reset_assert,
7979
.deassert = mmp_clk_reset_deassert,
8080
};

drivers/clk/qcom/gcc-ipq4019.c

+35-35
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,10 @@ static const char * const gcc_xo_ddr_500_200[] = {
129129
};
130130

131131
#define F(f, s, h, m, n) { (f), (s), (2 * (h) - 1), (m), (n) }
132-
#define P_XO 0
133-
#define FE_PLL_200 1
134-
#define FE_PLL_500 2
135-
#define DDRC_PLL_666 3
136-
137-
#define DDRC_PLL_666_SDCC 1
138-
#define FE_PLL_125_DLY 1
139-
140-
#define FE_PLL_WCSS2G 1
141-
#define FE_PLL_WCSS5G 1
142132

143133
static const struct freq_tbl ftbl_gcc_audio_pwm_clk[] = {
144134
F(48000000, P_XO, 1, 0, 0),
145-
F(200000000, FE_PLL_200, 1, 0, 0),
135+
F(200000000, P_FEPLL200, 1, 0, 0),
146136
{ }
147137
};
148138

@@ -334,15 +324,15 @@ static struct clk_branch gcc_blsp1_qup2_spi_apps_clk = {
334324
};
335325

336326
static const struct freq_tbl ftbl_gcc_blsp1_uart1_2_apps_clk[] = {
337-
F(1843200, FE_PLL_200, 1, 144, 15625),
338-
F(3686400, FE_PLL_200, 1, 288, 15625),
339-
F(7372800, FE_PLL_200, 1, 576, 15625),
340-
F(14745600, FE_PLL_200, 1, 1152, 15625),
341-
F(16000000, FE_PLL_200, 1, 2, 25),
327+
F(1843200, P_FEPLL200, 1, 144, 15625),
328+
F(3686400, P_FEPLL200, 1, 288, 15625),
329+
F(7372800, P_FEPLL200, 1, 576, 15625),
330+
F(14745600, P_FEPLL200, 1, 1152, 15625),
331+
F(16000000, P_FEPLL200, 1, 2, 25),
342332
F(24000000, P_XO, 1, 1, 2),
343-
F(32000000, FE_PLL_200, 1, 4, 25),
344-
F(40000000, FE_PLL_200, 1, 1, 5),
345-
F(46400000, FE_PLL_200, 1, 29, 125),
333+
F(32000000, P_FEPLL200, 1, 4, 25),
334+
F(40000000, P_FEPLL200, 1, 1, 5),
335+
F(46400000, P_FEPLL200, 1, 29, 125),
346336
F(48000000, P_XO, 1, 0, 0),
347337
{ }
348338
};
@@ -410,9 +400,9 @@ static struct clk_branch gcc_blsp1_uart2_apps_clk = {
410400
};
411401

412402
static const struct freq_tbl ftbl_gcc_gp_clk[] = {
413-
F(1250000, FE_PLL_200, 1, 16, 0),
414-
F(2500000, FE_PLL_200, 1, 8, 0),
415-
F(5000000, FE_PLL_200, 1, 4, 0),
403+
F(1250000, P_FEPLL200, 1, 16, 0),
404+
F(2500000, P_FEPLL200, 1, 8, 0),
405+
F(5000000, P_FEPLL200, 1, 4, 0),
416406
{ }
417407
};
418408

@@ -512,11 +502,11 @@ static struct clk_branch gcc_gp3_clk = {
512502
static const struct freq_tbl ftbl_gcc_sdcc1_apps_clk[] = {
513503
F(144000, P_XO, 1, 3, 240),
514504
F(400000, P_XO, 1, 1, 0),
515-
F(20000000, FE_PLL_500, 1, 1, 25),
516-
F(25000000, FE_PLL_500, 1, 1, 20),
517-
F(50000000, FE_PLL_500, 1, 1, 10),
518-
F(100000000, FE_PLL_500, 1, 1, 5),
519-
F(193000000, DDRC_PLL_666_SDCC, 1, 0, 0),
505+
F(20000000, P_FEPLL500, 1, 1, 25),
506+
F(25000000, P_FEPLL500, 1, 1, 20),
507+
F(50000000, P_FEPLL500, 1, 1, 10),
508+
F(100000000, P_FEPLL500, 1, 1, 5),
509+
F(193000000, P_DDRPLL, 1, 0, 0),
520510
{ }
521511
};
522512

@@ -536,9 +526,9 @@ static struct clk_rcg2 sdcc1_apps_clk_src = {
536526

537527
static const struct freq_tbl ftbl_gcc_apps_clk[] = {
538528
F(48000000, P_XO, 1, 0, 0),
539-
F(200000000, FE_PLL_200, 1, 0, 0),
540-
F(500000000, FE_PLL_500, 1, 0, 0),
541-
F(626000000, DDRC_PLL_666, 1, 0, 0),
529+
F(200000000, P_FEPLL200, 1, 0, 0),
530+
F(500000000, P_FEPLL500, 1, 0, 0),
531+
F(626000000, P_DDRPLLAPSS, 1, 0, 0),
542532
{ }
543533
};
544534

@@ -557,7 +547,7 @@ static struct clk_rcg2 apps_clk_src = {
557547

558548
static const struct freq_tbl ftbl_gcc_apps_ahb_clk[] = {
559549
F(48000000, P_XO, 1, 0, 0),
560-
F(100000000, FE_PLL_200, 2, 0, 0),
550+
F(100000000, P_FEPLL200, 2, 0, 0),
561551
{ }
562552
};
563553

@@ -940,7 +930,7 @@ static struct clk_branch gcc_usb2_mock_utmi_clk = {
940930
};
941931

942932
static const struct freq_tbl ftbl_gcc_usb30_mock_utmi_clk[] = {
943-
F(2000000, FE_PLL_200, 10, 0, 0),
933+
F(2000000, P_FEPLL200, 10, 0, 0),
944934
{ }
945935
};
946936

@@ -1007,7 +997,7 @@ static struct clk_branch gcc_usb3_mock_utmi_clk = {
1007997
};
1008998

1009999
static const struct freq_tbl ftbl_gcc_fephy_dly_clk[] = {
1010-
F(125000000, FE_PLL_125_DLY, 1, 0, 0),
1000+
F(125000000, P_FEPLL125DLY, 1, 0, 0),
10111001
{ }
10121002
};
10131003

@@ -1027,7 +1017,7 @@ static struct clk_rcg2 fephy_125m_dly_clk_src = {
10271017

10281018
static const struct freq_tbl ftbl_gcc_wcss2g_clk[] = {
10291019
F(48000000, P_XO, 1, 0, 0),
1030-
F(250000000, FE_PLL_WCSS2G, 1, 0, 0),
1020+
F(250000000, P_FEPLLWCSS2G, 1, 0, 0),
10311021
{ }
10321022
};
10331023

@@ -1097,7 +1087,7 @@ static struct clk_branch gcc_wcss2g_rtc_clk = {
10971087

10981088
static const struct freq_tbl ftbl_gcc_wcss5g_clk[] = {
10991089
F(48000000, P_XO, 1, 0, 0),
1100-
F(250000000, FE_PLL_WCSS5G, 1, 0, 0),
1090+
F(250000000, P_FEPLLWCSS5G, 1, 0, 0),
11011091
{ }
11021092
};
11031093

@@ -1325,6 +1315,16 @@ MODULE_DEVICE_TABLE(of, gcc_ipq4019_match_table);
13251315

13261316
static int gcc_ipq4019_probe(struct platform_device *pdev)
13271317
{
1318+
struct device *dev = &pdev->dev;
1319+
1320+
clk_register_fixed_rate(dev, "fepll125", "xo", 0, 200000000);
1321+
clk_register_fixed_rate(dev, "fepll125dly", "xo", 0, 200000000);
1322+
clk_register_fixed_rate(dev, "fepllwcss2g", "xo", 0, 200000000);
1323+
clk_register_fixed_rate(dev, "fepllwcss5g", "xo", 0, 200000000);
1324+
clk_register_fixed_rate(dev, "fepll200", "xo", 0, 200000000);
1325+
clk_register_fixed_rate(dev, "fepll500", "xo", 0, 200000000);
1326+
clk_register_fixed_rate(dev, "ddrpllapss", "xo", 0, 666000000);
1327+
13281328
return qcom_cc_probe(pdev, &gcc_ipq4019_desc);
13291329
}
13301330

drivers/clk/qcom/reset.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ qcom_reset_deassert(struct reset_controller_dev *rcdev, unsigned long id)
5555
return regmap_update_bits(rst->regmap, map->reg, mask, 0);
5656
}
5757

58-
struct reset_control_ops qcom_reset_ops = {
58+
const struct reset_control_ops qcom_reset_ops = {
5959
.reset = qcom_reset,
6060
.assert = qcom_reset_assert,
6161
.deassert = qcom_reset_deassert,

drivers/clk/qcom/reset.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ struct qcom_reset_controller {
3232
#define to_qcom_reset_controller(r) \
3333
container_of(r, struct qcom_reset_controller, rcdev);
3434

35-
extern struct reset_control_ops qcom_reset_ops;
35+
extern const struct reset_control_ops qcom_reset_ops;
3636

3737
#endif

drivers/clk/rockchip/softrst.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ static int rockchip_softrst_deassert(struct reset_controller_dev *rcdev,
8181
return 0;
8282
}
8383

84-
static struct reset_control_ops rockchip_softrst_ops = {
84+
static const struct reset_control_ops rockchip_softrst_ops = {
8585
.assert = rockchip_softrst_assert,
8686
.deassert = rockchip_softrst_deassert,
8787
};

drivers/clk/sirf/clk-atlas7.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1423,7 +1423,7 @@ static int atlas7_reset_module(struct reset_controller_dev *rcdev,
14231423
return 0;
14241424
}
14251425

1426-
static struct reset_control_ops atlas7_rst_ops = {
1426+
static const struct reset_control_ops atlas7_rst_ops = {
14271427
.reset = atlas7_reset_module,
14281428
};
14291429

drivers/clk/sunxi/clk-a10-ve.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static int sunxi_ve_of_xlate(struct reset_controller_dev *rcdev,
8585
return 0;
8686
}
8787

88-
static struct reset_control_ops sunxi_ve_reset_ops = {
88+
static const struct reset_control_ops sunxi_ve_reset_ops = {
8989
.assert = sunxi_ve_reset_assert,
9090
.deassert = sunxi_ve_reset_deassert,
9191
};

drivers/clk/sunxi/clk-sun9i-mmc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int sun9i_mmc_reset_deassert(struct reset_controller_dev *rcdev,
8383
return 0;
8484
}
8585

86-
static struct reset_control_ops sun9i_mmc_reset_ops = {
86+
static const struct reset_control_ops sun9i_mmc_reset_ops = {
8787
.assert = sun9i_mmc_reset_assert,
8888
.deassert = sun9i_mmc_reset_deassert,
8989
};

drivers/clk/sunxi/clk-usb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static int sunxi_usb_reset_deassert(struct reset_controller_dev *rcdev,
7676
return 0;
7777
}
7878

79-
static struct reset_control_ops sunxi_usb_reset_ops = {
79+
static const struct reset_control_ops sunxi_usb_reset_ops = {
8080
.assert = sunxi_usb_reset_assert,
8181
.deassert = sunxi_usb_reset_deassert,
8282
};

drivers/clk/tegra/clk.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void __init tegra_init_from_table(struct tegra_clk_init_table *tbl,
271271
}
272272
}
273273

274-
static struct reset_control_ops rst_ops = {
274+
static const struct reset_control_ops rst_ops = {
275275
.assert = tegra_clk_rst_assert,
276276
.deassert = tegra_clk_rst_deassert,
277277
};

0 commit comments

Comments
 (0)