]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
clk: mediatek: Drop __initconst from gates
authorSjoerd Simons <sjoerd@collabora.com>
Tue, 23 Dec 2025 11:05:17 +0000 (12:05 +0100)
committerStephen Boyd <sboyd@kernel.org>
Fri, 23 Jan 2026 01:42:29 +0000 (17:42 -0800)
Since commit 8ceff24a754a ("clk: mediatek: clk-gate: Refactor
mtk_clk_register_gate to use mtk_gate struct") the mtk_gate structs
are no longer just used for initialization/registration, but also at
runtime. So drop __initconst annotations.

Fixes: 8ceff24a754a ("clk: mediatek: clk-gate: Refactor mtk_clk_register_gate to use mtk_gate struct")
Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Laura Nao <laura.nao@collabora.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mediatek/clk-mt7981-eth.c
drivers/clk/mediatek/clk-mt8516.c

index 906aec9ddff54bae8bd63d3e3d12946ad1267dfd..0655ebb6c561f6cc370a71e6c2549529e5f8781e 100644 (file)
@@ -31,7 +31,7 @@ static const struct mtk_gate_regs sgmii0_cg_regs = {
                .ops = &mtk_clk_gate_ops_no_setclr_inv, \
        }
 
-static const struct mtk_gate sgmii0_clks[] __initconst = {
+static const struct mtk_gate sgmii0_clks[] = {
        GATE_SGMII0(CLK_SGM0_TX_EN, "sgm0_tx_en", "usb_tx250m", 2),
        GATE_SGMII0(CLK_SGM0_RX_EN, "sgm0_rx_en", "usb_eq_rx250m", 3),
        GATE_SGMII0(CLK_SGM0_CK0_EN, "sgm0_ck0_en", "usb_ln0", 4),
@@ -53,7 +53,7 @@ static const struct mtk_gate_regs sgmii1_cg_regs = {
                .ops = &mtk_clk_gate_ops_no_setclr_inv, \
        }
 
-static const struct mtk_gate sgmii1_clks[] __initconst = {
+static const struct mtk_gate sgmii1_clks[] = {
        GATE_SGMII1(CLK_SGM1_TX_EN, "sgm1_tx_en", "usb_tx250m", 2),
        GATE_SGMII1(CLK_SGM1_RX_EN, "sgm1_rx_en", "usb_eq_rx250m", 3),
        GATE_SGMII1(CLK_SGM1_CK1_EN, "sgm1_ck1_en", "usb_ln0", 4),
@@ -75,7 +75,7 @@ static const struct mtk_gate_regs eth_cg_regs = {
                .ops = &mtk_clk_gate_ops_no_setclr_inv, \
        }
 
-static const struct mtk_gate eth_clks[] __initconst = {
+static const struct mtk_gate eth_clks[] = {
        GATE_ETH(CLK_ETH_FE_EN, "eth_fe_en", "netsys_2x", 6),
        GATE_ETH(CLK_ETH_GP2_EN, "eth_gp2_en", "sgm_325m", 7),
        GATE_ETH(CLK_ETH_GP1_EN, "eth_gp1_en", "sgm_325m", 8),
index 21eb052b0a539c060401bc1990435d0ede8073cc..342a59019fea9bcb896cd2d35936d43bc3a132d8 100644 (file)
@@ -544,7 +544,7 @@ static const struct mtk_gate_regs top5_cg_regs = {
 #define GATE_TOP5(_id, _name, _parent, _shift)                         \
        GATE_MTK(_id, _name, _parent, &top5_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
 
-static const struct mtk_gate top_clks[] __initconst = {
+static const struct mtk_gate top_clks[] = {
        /* TOP1 */
        GATE_TOP1(CLK_TOP_THEM, "them", "ahb_infra_sel", 1),
        GATE_TOP1(CLK_TOP_APDMA, "apdma", "ahb_infra_sel", 2),