Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'sunxi-clk-fixes-for-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into clk-fixes

Pull Allwinner clk driver fixes from Chen-Yu Tsai:

Only two changes:

- Fix the order of arguments in clk macro for
SUNXI_CCU_MP_DATA_WITH_MUX_GATE_FEAT that was recently introduced in
v6.15-rc1

- Add missing post-divider for D1 MMC clocks to correct halved
performance

* tag 'sunxi-clk-fixes-for-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
clk: sunxi-ng: fix order of arguments in clock macro

+47 -20
+24 -18
drivers/clk/sunxi-ng/ccu-sun20i-d1.c
··· 412 412 { .hw = &pll_periph0_2x_clk.common.hw }, 413 413 { .hw = &pll_audio1_div2_clk.common.hw }, 414 414 }; 415 - static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc0_mmc1_parents, 0x830, 416 - 0, 4, /* M */ 417 - 8, 2, /* P */ 418 - 24, 3, /* mux */ 419 - BIT(31), /* gate */ 420 - 0); 415 + static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0", 416 + mmc0_mmc1_parents, 0x830, 417 + 0, 4, /* M */ 418 + 8, 2, /* P */ 419 + 24, 3, /* mux */ 420 + BIT(31), /* gate */ 421 + 2, /* post-div */ 422 + 0); 421 423 422 - static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc0_mmc1_parents, 0x834, 423 - 0, 4, /* M */ 424 - 8, 2, /* P */ 425 - 24, 3, /* mux */ 426 - BIT(31), /* gate */ 427 - 0); 424 + static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1", 425 + mmc0_mmc1_parents, 0x834, 426 + 0, 4, /* M */ 427 + 8, 2, /* P */ 428 + 24, 3, /* mux */ 429 + BIT(31), /* gate */ 430 + 2, /* post-div */ 431 + 0); 428 432 429 433 static const struct clk_parent_data mmc2_parents[] = { 430 434 { .fw_name = "hosc" }, ··· 437 433 { .hw = &pll_periph0_800M_clk.common.hw }, 438 434 { .hw = &pll_audio1_div2_clk.common.hw }, 439 435 }; 440 - static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc2_parents, 0x838, 441 - 0, 4, /* M */ 442 - 8, 2, /* P */ 443 - 24, 3, /* mux */ 444 - BIT(31), /* gate */ 445 - 0); 436 + static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc2_parents, 437 + 0x838, 438 + 0, 4, /* M */ 439 + 8, 2, /* P */ 440 + 24, 3, /* mux */ 441 + BIT(31), /* gate */ 442 + 2, /* post-div */ 443 + 0); 446 444 447 445 static SUNXI_CCU_GATE_HWS(bus_mmc0_clk, "bus-mmc0", psi_ahb_hws, 448 446 0x84c, BIT(0), 0);
+23 -2
drivers/clk/sunxi-ng/ccu_mp.h
··· 52 52 } \ 53 53 } 54 54 55 + #define SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(_struct, _name, _parents, \ 56 + _reg, \ 57 + _mshift, _mwidth, \ 58 + _pshift, _pwidth, \ 59 + _muxshift, _muxwidth, \ 60 + _gate, _postdiv, _flags)\ 61 + struct ccu_mp _struct = { \ 62 + .enable = _gate, \ 63 + .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \ 64 + .p = _SUNXI_CCU_DIV(_pshift, _pwidth), \ 65 + .mux = _SUNXI_CCU_MUX(_muxshift, _muxwidth), \ 66 + .fixed_post_div = _postdiv, \ 67 + .common = { \ 68 + .reg = _reg, \ 69 + .features = CCU_FEATURE_FIXED_POSTDIV, \ 70 + .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \ 71 + _parents, \ 72 + &ccu_mp_ops, \ 73 + _flags), \ 74 + } \ 75 + } 76 + 55 77 #define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg, \ 56 78 _mshift, _mwidth, \ 57 79 _pshift, _pwidth, \ ··· 131 109 _mshift, _mwidth, \ 132 110 _pshift, _pwidth, \ 133 111 _muxshift, _muxwidth, \ 134 - _gate, _features, \ 135 - _flags) \ 112 + _gate, _flags, _features) \ 136 113 struct ccu_mp _struct = { \ 137 114 .enable = _gate, \ 138 115 .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \