Skip to content

Commit bc95d4f

Browse files
Matthew McClintockbebarino
authored andcommitted
clk: qcom: ipq4019: switch remaining defines to enums
When this was added not all the remaining defines were switched over to use enums, so let's complete that process here Reported-by: Stephen Boyd <[email protected]> Signed-off-by: Matthew McClintock <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent add479e commit bc95d4f

File tree

1 file changed

+25
-35
lines changed

1 file changed

+25
-35
lines changed

drivers/clk/qcom/gcc-ipq4019.c

Lines changed: 25 additions & 35 deletions
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

0 commit comments

Comments
 (0)