Skip to content

Commit 14de023

Browse files
committed
Merge tag 'v5.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-rockchip
Pull Rockchip clk driver updates from Heiko Stuebner: - Reduce memory footprint of PLL rate tables - A fix for the newly added rk3568 clk driver - exported clock for the newly added video decoder * tag 'v5.14-rockchip-clk1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: export ACLK_VCODEC for RK3036 clk: rockchip: fix rk3568 cpll clk gate bits clk: rockchip: Optimize PLL table memory usage
2 parents 6efb943 + 2adafc0 commit 14de023

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
lines changed

drivers/clk/rockchip/clk-rk3036.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ static struct rockchip_clk_branch rk3036_clk_branches[] __initdata = {
259259
RK2928_CLKGATE_CON(1), 13, GFLAGS,
260260
&rk3036_uart2_fracmux),
261261

262-
COMPOSITE(0, "aclk_vcodec", mux_pll_src_3plls_p, 0,
262+
COMPOSITE(ACLK_VCODEC, "aclk_vcodec", mux_pll_src_3plls_p, 0,
263263
RK2928_CLKSEL_CON(32), 14, 2, MFLAGS, 8, 5, DFLAGS,
264264
RK2928_CLKGATE_CON(3), 11, GFLAGS),
265265
FACTOR_GATE(HCLK_VCODEC, "hclk_vcodec", "aclk_vcodec", 0, 1, 4,

drivers/clk/rockchip/clk-rk3568.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,17 +454,17 @@ static struct rockchip_clk_branch rk3568_clk_branches[] __initdata = {
454454
COMPOSITE_NOMUX(CPLL_125M, "cpll_125m", "cpll", CLK_IGNORE_UNUSED,
455455
RK3568_CLKSEL_CON(80), 0, 5, DFLAGS,
456456
RK3568_CLKGATE_CON(35), 10, GFLAGS),
457+
COMPOSITE_NOMUX(CPLL_100M, "cpll_100m", "cpll", CLK_IGNORE_UNUSED,
458+
RK3568_CLKSEL_CON(82), 0, 5, DFLAGS,
459+
RK3568_CLKGATE_CON(35), 11, GFLAGS),
457460
COMPOSITE_NOMUX(CPLL_62P5M, "cpll_62p5", "cpll", CLK_IGNORE_UNUSED,
458461
RK3568_CLKSEL_CON(80), 8, 5, DFLAGS,
459-
RK3568_CLKGATE_CON(35), 11, GFLAGS),
462+
RK3568_CLKGATE_CON(35), 12, GFLAGS),
460463
COMPOSITE_NOMUX(CPLL_50M, "cpll_50m", "cpll", CLK_IGNORE_UNUSED,
461464
RK3568_CLKSEL_CON(81), 0, 5, DFLAGS,
462-
RK3568_CLKGATE_CON(35), 12, GFLAGS),
465+
RK3568_CLKGATE_CON(35), 13, GFLAGS),
463466
COMPOSITE_NOMUX(CPLL_25M, "cpll_25m", "cpll", CLK_IGNORE_UNUSED,
464467
RK3568_CLKSEL_CON(81), 8, 6, DFLAGS,
465-
RK3568_CLKGATE_CON(35), 13, GFLAGS),
466-
COMPOSITE_NOMUX(CPLL_100M, "cpll_100m", "cpll", CLK_IGNORE_UNUSED,
467-
RK3568_CLKSEL_CON(82), 0, 5, DFLAGS,
468468
RK3568_CLKGATE_CON(35), 14, GFLAGS),
469469
COMPOSITE_NOMUX(0, "clk_osc0_div_750k", "xin24m", CLK_IGNORE_UNUSED,
470470
RK3568_CLKSEL_CON(82), 8, 6, DFLAGS,

drivers/clk/rockchip/clk.h

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,24 @@ struct rockchip_clk_provider {
271271

272272
struct rockchip_pll_rate_table {
273273
unsigned long rate;
274-
unsigned int nr;
275-
unsigned int nf;
276-
unsigned int no;
277-
unsigned int nb;
278-
/* for RK3036/RK3399 */
279-
unsigned int fbdiv;
280-
unsigned int postdiv1;
281-
unsigned int refdiv;
282-
unsigned int postdiv2;
283-
unsigned int dsmpd;
284-
unsigned int frac;
274+
union {
275+
struct {
276+
/* for RK3066 */
277+
unsigned int nr;
278+
unsigned int nf;
279+
unsigned int no;
280+
unsigned int nb;
281+
};
282+
struct {
283+
/* for RK3036/RK3399 */
284+
unsigned int fbdiv;
285+
unsigned int postdiv1;
286+
unsigned int refdiv;
287+
unsigned int postdiv2;
288+
unsigned int dsmpd;
289+
unsigned int frac;
290+
};
291+
};
285292
};
286293

287294
/**

0 commit comments

Comments
 (0)