From 9d1f2e5d31e2884243b4ef1f4ccf99e81e6d1edb Mon Sep 17 00:00:00 2001 From: zhangshuqi Date: Wed, 6 Nov 2024 15:41:57 +0800 Subject: [PATCH] Adapt lts from v6.6.29-->v6.6.30 Signed-off-by: zhangshuqi --- linux-6.6/rk3568_patch/kernel.patch | 434 ++++++++++++++-------------- 1 file changed, 224 insertions(+), 210 deletions(-) diff --git a/linux-6.6/rk3568_patch/kernel.patch b/linux-6.6/rk3568_patch/kernel.patch index f9ae72d..7fcedcb 100644 --- a/linux-6.6/rk3568_patch/kernel.patch +++ b/linux-6.6/rk3568_patch/kernel.patch @@ -1277,7 +1277,7 @@ index 000000000..f4a24fa21 + status = "disabled"; + }; diff --git a/Makefile b/Makefile -index 09d2124b3..ef68635f9 100644 +index 1c144301b..54a088450 100644 --- a/Makefile +++ b/Makefile @@ -1130,6 +1130,15 @@ ifdef CONFIG_TRIM_UNUSED_KSYMS @@ -1853,7 +1853,7 @@ index fee5e7111..ea403de13 100644 &gpu { diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi -index 20e3f41ef..aa3e21bd6 100644 +index f2ca5d30d..937a15005 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi @@ -27,7 +27,7 @@ module_led: led-0 { @@ -1914,7 +1914,7 @@ index f2279aa6c..1f76d3501 100644 status = "okay"; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi -index 4a3d0af5e..b13208797 100644 +index fb1ea84c2..24b66732d 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -9,8 +9,13 @@ @@ -2796,7 +2796,7 @@ index 4a3d0af5e..b13208797 100644 hdmi_sound: hdmi-sound { @@ -1964,6 +2186,8 @@ hdmi: hdmi@ff940000 { - reg-io-width = <4>; + power-domains = <&power RK3399_PD_HDCP>; rockchip,grf = <&grf>; #sound-dai-cells = <0>; + pinctrl-names = "default"; @@ -2804,7 +2804,7 @@ index 4a3d0af5e..b13208797 100644 status = "disabled"; ports { -@@ -1983,7 +2207,7 @@ hdmi_in_vopl: endpoint@1 { +@@ -1991,7 +2215,7 @@ hdmi_out: port@1 { }; }; @@ -2813,7 +2813,7 @@ index 4a3d0af5e..b13208797 100644 compatible = "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi"; reg = <0x0 0xff960000 0x0 0x8000>; interrupts = ; -@@ -2002,29 +2226,24 @@ ports { +@@ -2010,29 +2234,24 @@ ports { #address-cells = <1>; #size-cells = <0>; @@ -2849,7 +2849,7 @@ index 4a3d0af5e..b13208797 100644 compatible = "rockchip,rk3399-mipi-dsi", "snps,dw-mipi-dsi"; reg = <0x0 0xff968000 0x0 0x8000>; interrupts = ; -@@ -2044,29 +2263,39 @@ ports { +@@ -2052,29 +2271,39 @@ ports { #address-cells = <1>; #size-cells = <0>; @@ -2899,7 +2899,7 @@ index 4a3d0af5e..b13208797 100644 compatible = "rockchip,rk3399-edp"; reg = <0x0 0xff970000 0x0 0x8000>; interrupts = ; -@@ -2083,7 +2312,6 @@ edp: dp@ff970000 { +@@ -2091,7 +2320,6 @@ edp: dp@ff970000 { ports { #address-cells = <1>; #size-cells = <0>; @@ -2907,7 +2907,7 @@ index 4a3d0af5e..b13208797 100644 edp_in: port@0 { reg = <0>; #address-cells = <1>; -@@ -2099,24 +2327,112 @@ edp_in_vopl: endpoint@1 { +@@ -2107,24 +2335,112 @@ edp_in_vopl: endpoint@1 { remote-endpoint = <&vopl_out_edp>; }; }; @@ -3025,7 +3025,7 @@ index 4a3d0af5e..b13208797 100644 }; pinctrl: pinctrl { -@@ -2204,6 +2520,11 @@ pcfg_pull_none: pcfg-pull-none { +@@ -2212,6 +2528,11 @@ pcfg_pull_none: pcfg-pull-none { bias-disable; }; @@ -3037,7 +3037,7 @@ index 4a3d0af5e..b13208797 100644 pcfg_pull_none_12ma: pcfg-pull-none-12ma { bias-disable; drive-strength = <12>; -@@ -2234,6 +2555,11 @@ pcfg_pull_up_8ma: pcfg-pull-up-8ma { +@@ -2242,6 +2563,11 @@ pcfg_pull_up_8ma: pcfg-pull-up-8ma { drive-strength = <8>; }; @@ -3049,7 +3049,7 @@ index 4a3d0af5e..b13208797 100644 pcfg_pull_up_18ma: pcfg-pull-up-18ma { bias-pull-up; drive-strength = <18>; -@@ -2406,6 +2732,13 @@ i2c3_xfer: i2c3-xfer { +@@ -2414,6 +2740,13 @@ i2c3_xfer: i2c3-xfer { <4 RK_PC1 1 &pcfg_pull_none>, <4 RK_PC0 1 &pcfg_pull_none>; }; @@ -3063,7 +3063,7 @@ index 4a3d0af5e..b13208797 100644 }; i2c4 { -@@ -2459,16 +2792,6 @@ i2s0_2ch_bus: i2s0-2ch-bus { +@@ -2467,16 +2800,6 @@ i2s0_2ch_bus: i2s0-2ch-bus { <4 RK_PA0 1 &pcfg_pull_none>; }; @@ -3080,7 +3080,7 @@ index 4a3d0af5e..b13208797 100644 i2s0_8ch_bus: i2s0-8ch-bus { rockchip,pins = <3 RK_PD0 1 &pcfg_pull_none>, -@@ -2478,7 +2801,11 @@ i2s0_8ch_bus: i2s0-8ch-bus { +@@ -2486,7 +2809,11 @@ i2s0_8ch_bus: i2s0-8ch-bus { <3 RK_PD4 1 &pcfg_pull_none>, <3 RK_PD5 1 &pcfg_pull_none>, <3 RK_PD6 1 &pcfg_pull_none>, @@ -3093,7 +3093,7 @@ index 4a3d0af5e..b13208797 100644 <4 RK_PA0 1 &pcfg_pull_none>; }; -@@ -2772,7 +3099,7 @@ uart0 { +@@ -2780,7 +3107,7 @@ uart0 { uart0_xfer: uart0-xfer { rockchip,pins = <2 RK_PC0 1 &pcfg_pull_up>, @@ -3102,7 +3102,7 @@ index 4a3d0af5e..b13208797 100644 }; uart0_cts: uart0-cts { -@@ -2790,7 +3117,7 @@ uart1 { +@@ -2798,7 +3125,7 @@ uart1 { uart1_xfer: uart1-xfer { rockchip,pins = <3 RK_PB4 2 &pcfg_pull_up>, @@ -3111,7 +3111,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2798,7 +3125,7 @@ uart2a { +@@ -2806,7 +3133,7 @@ uart2a { uart2a_xfer: uart2a-xfer { rockchip,pins = <4 RK_PB0 2 &pcfg_pull_up>, @@ -3120,7 +3120,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2806,7 +3133,7 @@ uart2b { +@@ -2814,7 +3141,7 @@ uart2b { uart2b_xfer: uart2b-xfer { rockchip,pins = <4 RK_PC0 2 &pcfg_pull_up>, @@ -3129,7 +3129,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2814,7 +3141,7 @@ uart2c { +@@ -2822,7 +3149,7 @@ uart2c { uart2c_xfer: uart2c-xfer { rockchip,pins = <4 RK_PC3 1 &pcfg_pull_up>, @@ -3138,7 +3138,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2822,7 +3149,7 @@ uart3 { +@@ -2830,7 +3157,7 @@ uart3 { uart3_xfer: uart3-xfer { rockchip,pins = <3 RK_PB6 2 &pcfg_pull_up>, @@ -3147,7 +3147,7 @@ index 4a3d0af5e..b13208797 100644 }; uart3_cts: uart3-cts { -@@ -2840,7 +3167,7 @@ uart4 { +@@ -2848,7 +3175,7 @@ uart4 { uart4_xfer: uart4-xfer { rockchip,pins = <1 RK_PA7 1 &pcfg_pull_up>, @@ -3156,7 +3156,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2848,7 +3175,7 @@ uarthdcp { +@@ -2856,7 +3183,7 @@ uarthdcp { uarthdcp_xfer: uarthdcp-xfer { rockchip,pins = <4 RK_PC5 2 &pcfg_pull_up>, @@ -3165,7 +3165,7 @@ index 4a3d0af5e..b13208797 100644 }; }; -@@ -2903,6 +3230,11 @@ pwm3a_pin: pwm3a-pin { +@@ -2911,6 +3238,11 @@ pwm3a_pin: pwm3a-pin { rockchip,pins = <0 RK_PA6 1 &pcfg_pull_none>; }; @@ -3177,7 +3177,7 @@ index 4a3d0af5e..b13208797 100644 }; pwm3b { -@@ -2910,6 +3242,11 @@ pwm3b_pin: pwm3b-pin { +@@ -2918,6 +3250,11 @@ pwm3b_pin: pwm3b-pin { rockchip,pins = <1 RK_PB6 1 &pcfg_pull_none>; }; @@ -3189,7 +3189,7 @@ index 4a3d0af5e..b13208797 100644 }; hdmi { -@@ -2938,4 +3275,27 @@ pcie_clkreqnb_cpm: pci-clkreqnb-cpm { +@@ -2946,4 +3283,27 @@ pcie_clkreqnb_cpm: pci-clkreqnb-cpm { }; }; @@ -3269,7 +3269,7 @@ index 6c4b17d27..4e2a2fb1d 100644 + snps,usb2-lpm-disable; }; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts -index f9127ddfb..26d7fda27 100644 +index dc5892d25..856fe4b66 100644 --- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts +++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts @@ -66,13 +66,6 @@ hdmi_con_in: endpoint { @@ -3310,7 +3310,7 @@ index f9127ddfb..26d7fda27 100644 regulator-initial-mode = <0x2>; regulator-min-microvolt = <500000>; regulator-max-microvolt = <1350000>; -@@ -618,12 +614,6 @@ hym8563_int: hym8563-int { +@@ -620,12 +616,6 @@ hym8563_int: hym8563-int { }; }; @@ -3759,7 +3759,7 @@ index 19f8fc369..674792567 100644 regulator-max-microvolt = <1350000>; diff --git a/arch/arm64/boot/dts/rockchip/rk3568-linux.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-linux.dtsi new file mode 100644 -index 000000000..df2bd19f9 +index 000000000..838606964 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/rk3568-linux.dtsi @@ -0,0 +1,60 @@ @@ -36950,10 +36950,10 @@ index f7412b137..32f833d73 100644 return ret; diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c -index 50228cb0c..924ad0fee 100644 +index 4a67c0d48..09ced4bbe 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c -@@ -5434,3 +5434,274 @@ void __init of_clk_init(const struct of_device_id *matches) +@@ -5547,3 +5547,274 @@ void __init of_clk_init(const struct of_device_id *matches) } } #endif @@ -57170,7 +57170,7 @@ index fb2875ce1..52cdde09e 100644 { .compatible = "st,stih410", }, { .compatible = "st,stih418", }, diff --git a/drivers/cpufreq/cpufreq-dt.c b/drivers/cpufreq/cpufreq-dt.c -index 8bd6e5e8f..6e4800058 100644 +index 2d83bbc65..914488f8e 100644 --- a/drivers/cpufreq/cpufreq-dt.c +++ b/drivers/cpufreq/cpufreq-dt.c @@ -23,6 +23,9 @@ @@ -66364,7 +66364,7 @@ index 3aa03cbfb..045e811b4 100644 -struct rk_crypto_info *get_rk_crypto(void); #endif diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c -index 8c1431806..edd40e16a 100644 +index 29c953721..edd40e16a 100644 --- a/drivers/crypto/rockchip/rk3288_crypto_ahash.c +++ b/drivers/crypto/rockchip/rk3288_crypto_ahash.c @@ -8,15 +8,8 @@ @@ -66500,7 +66500,7 @@ index 8c1431806..edd40e16a 100644 switch (crypto_ahash_digestsize(tfm)) { case SHA1_DIGEST_SIZE: rctx->mode = RK_CRYPTO_HASH_SHA1; -@@ -296,83 +271,89 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq) +@@ -296,44 +271,41 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq) goto theend; } @@ -66565,7 +66565,7 @@ index 8c1431806..edd40e16a 100644 local_bh_disable(); crypto_finalize_hash_request(engine, breq, err); local_bh_enable(); - +@@ -341,38 +313,47 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq) return 0; } @@ -551064,7 +551064,7 @@ index 000000000..4368f3397 + +#endif diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c -index ab55d7132..4184bb8a0 100644 +index ab55d7132..19b759584 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -6,18 +6,26 @@ @@ -594966,7 +594966,7 @@ index 086fdf262..8357f8e30 100644 MODULE_DESCRIPTION("Rockchip RK3xxx I2C Bus driver"); MODULE_AUTHOR("Max Schwarz "); diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c -index 7f30bccee..b8ca8441f 100644 +index 3642d4246..0c0555fef 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -62,6 +62,7 @@ @@ -598406,7 +598406,7 @@ index afd6a1841..6d8d96b84 100644 /* * Deactivate and disable all SPIs. Leave the PPI and SGIs diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c -index 676c9250d..b702d4db3 100644 +index fc0528c51..79f4d53a1 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -163,6 +163,7 @@ struct its_device { @@ -598603,7 +598603,7 @@ index 676c9250d..b702d4db3 100644 kfree(its_dev); } -@@ -5094,6 +5156,7 @@ static int __init its_probe_one(struct its_node *its) +@@ -5089,6 +5151,7 @@ static int __init its_probe_one(struct its_node *its) struct page *page; u32 ctlr; int err; @@ -598611,7 +598611,7 @@ index 676c9250d..b702d4db3 100644 its_enable_quirks(its); -@@ -5127,7 +5190,12 @@ static int __init its_probe_one(struct its_node *its) +@@ -5122,7 +5185,12 @@ static int __init its_probe_one(struct its_node *its) } } @@ -598625,7 +598625,7 @@ index 676c9250d..b702d4db3 100644 get_order(ITS_CMD_QUEUE_SZ)); if (!page) { err = -ENOMEM; -@@ -5153,7 +5221,11 @@ static int __init its_probe_one(struct its_node *its) +@@ -5148,7 +5216,11 @@ static int __init its_probe_one(struct its_node *its) gits_write_cbaser(baser, its->base + GITS_CBASER); tmp = gits_read_cbaser(its->base + GITS_CBASER); @@ -730121,10 +730121,10 @@ index 000000000..cbeb67a08 +MODULE_AUTHOR("Wadim Egorov "); +MODULE_DESCRIPTION("RK808/RK818 PMIC driver"); diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c -index 32d49100d..50b41a23e 100644 +index 3564a0f63..6750365c2 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c -@@ -3002,6 +3002,9 @@ static void mmc_blk_remove_debugfs(struct mmc_card *card, +@@ -3004,6 +3004,9 @@ static void mmc_blk_remove_debugfs(struct mmc_card *card, #endif /* CONFIG_DEBUG_FS */ @@ -730134,7 +730134,7 @@ index 32d49100d..50b41a23e 100644 static int mmc_blk_probe(struct mmc_card *card) { struct mmc_blk_data *md; -@@ -3032,6 +3035,11 @@ static int mmc_blk_probe(struct mmc_card *card) +@@ -3034,6 +3037,11 @@ static int mmc_blk_probe(struct mmc_card *card) if (ret) goto out; @@ -730146,7 +730146,7 @@ index 32d49100d..50b41a23e 100644 /* Add two debugfs entries */ mmc_blk_add_debugfs(card, md); -@@ -3062,6 +3070,12 @@ static void mmc_blk_remove(struct mmc_card *card) +@@ -3064,6 +3072,12 @@ static void mmc_blk_remove(struct mmc_card *card) struct mmc_blk_data *md = dev_get_drvdata(&card->dev); mmc_blk_remove_debugfs(card, md); @@ -730876,7 +730876,7 @@ index 000000000..5ddcdf1a7 + diff --git a/drivers/mtd/rknand/api_flash.h b/drivers/mtd/rknand/api_flash.h new file mode 100644 -index 000000000..3ca267b11 +index 000000000..e97ee3d5a --- /dev/null +++ b/drivers/mtd/rknand/api_flash.h @@ -0,0 +1,203 @@ @@ -731085,7 +731085,7 @@ index 000000000..3ca267b11 +#endif diff --git a/drivers/mtd/rknand/rknand_base.h b/drivers/mtd/rknand/rknand_base.h new file mode 100644 -index 000000000..6460e9eac +index 000000000..e04eb09df --- /dev/null +++ b/drivers/mtd/rknand/rknand_base.h @@ -0,0 +1,93 @@ @@ -731184,7 +731184,7 @@ index 000000000..6460e9eac +#endif diff --git a/drivers/mtd/rknand/rknand_base_ko.c b/drivers/mtd/rknand/rknand_base_ko.c new file mode 100644 -index 000000000..5a462b76d +index 000000000..8b0c0f5ef --- /dev/null +++ b/drivers/mtd/rknand/rknand_base_ko.c @@ -0,0 +1,699 @@ @@ -734212,7 +734212,7 @@ index 509101112..1c9ca3bcb 100644 static struct platform_driver emac_rockchip_driver = { diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig -index 25f2d42de..791e32f8c 100644 +index 92d7d5a00..68530a9be 100644 --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig @@ -25,6 +25,26 @@ config STMMAC_SELFTESTS @@ -734301,7 +734301,7 @@ index 5b57aee19..3a4fe1cd9 100644 obj-$(CONFIG_DWMAC_STARFIVE) += dwmac-starfive.o obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h -index b0dd8adce..9695e9421 100644 +index 4dbc076f7..a989dc805 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -50,10 +50,18 @@ @@ -738099,10 +738099,10 @@ index d920a50dd..f121c1b18 100644 }; MODULE_DEVICE_TABLE(of, rk_gmac_dwmac_match); diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c -index c6ff1fa0e..4493d23ea 100644 +index 4ead0ddf4..55e35c298 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c -@@ -1134,6 +1134,7 @@ static int dwmac4_config_l4_filter(struct mac_device_info *hw, u32 filter_no, +@@ -1159,6 +1159,7 @@ static int dwmac4_config_l4_filter(struct mac_device_info *hw, u32 filter_no, return 0; } @@ -738110,7 +738110,7 @@ index c6ff1fa0e..4493d23ea 100644 const struct stmmac_ops dwmac4_ops = { .core_init = dwmac4_core_init, .phylink_get_caps = dwmac4_phylink_get_caps, -@@ -1176,6 +1177,7 @@ const struct stmmac_ops dwmac4_ops = { +@@ -1201,6 +1202,7 @@ const struct stmmac_ops dwmac4_ops = { .del_hw_vlan_rx_fltr = dwmac4_del_hw_vlan_rx_fltr, .restore_hw_vlan_rx_fltr = dwmac4_restore_hw_vlan_rx_fltr, }; @@ -738118,7 +738118,7 @@ index c6ff1fa0e..4493d23ea 100644 const struct stmmac_ops dwmac410_ops = { .core_init = dwmac4_core_init, -@@ -1208,7 +1210,9 @@ const struct stmmac_ops dwmac410_ops = { +@@ -1233,7 +1235,9 @@ const struct stmmac_ops dwmac410_ops = { .pcs_get_adv_lp = dwmac4_get_adv_lp, .debug = dwmac4_debug, .set_filter = dwmac4_set_filter, @@ -738128,7 +738128,7 @@ index c6ff1fa0e..4493d23ea 100644 .set_mac_loopback = dwmac4_set_mac_loopback, .update_vlan_hash = dwmac4_update_vlan_hash, .sarc_configure = dwmac4_sarc_configure, -@@ -1216,16 +1220,19 @@ const struct stmmac_ops dwmac410_ops = { +@@ -1241,16 +1245,19 @@ const struct stmmac_ops dwmac410_ops = { .set_arp_offload = dwmac4_set_arp_offload, .config_l3_filter = dwmac4_config_l3_filter, .config_l4_filter = dwmac4_config_l4_filter, @@ -738148,7 +738148,7 @@ index c6ff1fa0e..4493d23ea 100644 const struct stmmac_ops dwmac510_ops = { .core_init = dwmac4_core_init, .phylink_get_caps = dwmac4_phylink_get_caps, -@@ -1278,6 +1285,7 @@ const struct stmmac_ops dwmac510_ops = { +@@ -1303,6 +1310,7 @@ const struct stmmac_ops dwmac510_ops = { .del_hw_vlan_rx_fltr = dwmac4_del_hw_vlan_rx_fltr, .restore_hw_vlan_rx_fltr = dwmac4_restore_hw_vlan_rx_fltr, }; @@ -738256,7 +738256,7 @@ index 521b1b5ff..c2829dbf4 100644 } diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -index d1adb102a..556f29f05 100644 +index 19c58ad8d..2ce0ba82f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -147,6 +147,14 @@ static void stmmac_exit_fs(struct net_device *dev); @@ -738304,7 +738304,7 @@ index d1adb102a..556f29f05 100644 fwnode = priv->plat->port_node; if (!fwnode) fwnode = dev_fwnode(priv->device); -@@ -2916,6 +2927,11 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv) +@@ -2901,6 +2912,11 @@ static void stmmac_check_ether_addr(struct stmmac_priv *priv) if (!is_valid_ether_addr(priv->dev->dev_addr)) { stmmac_get_umac_addr(priv, priv->hw, addr, 0); @@ -738316,7 +738316,7 @@ index d1adb102a..556f29f05 100644 if (is_valid_ether_addr(addr)) eth_hw_addr_set(priv->dev, addr); else -@@ -3776,9 +3792,12 @@ stmmac_setup_dma_desc(struct stmmac_priv *priv, unsigned int mtu) +@@ -3761,9 +3777,12 @@ stmmac_setup_dma_desc(struct stmmac_priv *priv, unsigned int mtu) dma_conf->dma_rx_size = priv->dma_conf.dma_rx_size; if (!dma_conf->dma_tx_size) @@ -738331,7 +738331,7 @@ index d1adb102a..556f29f05 100644 /* Earlier check for TBS */ for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) { -@@ -3951,6 +3970,9 @@ static int stmmac_release(struct net_device *dev) +@@ -3936,6 +3955,9 @@ static int stmmac_release(struct net_device *dev) phylink_stop(priv->phylink); phylink_disconnect_phy(priv->phylink); @@ -738341,7 +738341,7 @@ index d1adb102a..556f29f05 100644 stmmac_disable_all_queues(priv); for (chan = 0; chan < priv->plat->tx_queues_to_use; chan++) -@@ -5138,7 +5160,7 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) +@@ -5123,7 +5145,7 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue) len = 0; } @@ -738350,7 +738350,7 @@ index d1adb102a..556f29f05 100644 break; read_again: -@@ -5339,7 +5361,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) +@@ -5324,7 +5346,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue) } read_again: @@ -738359,7 +738359,7 @@ index d1adb102a..556f29f05 100644 break; buf1_len = 0; -@@ -7139,22 +7161,30 @@ static void stmmac_napi_add(struct net_device *dev) +@@ -7124,22 +7146,30 @@ static void stmmac_napi_add(struct net_device *dev) for (queue = 0; queue < maxq; queue++) { struct stmmac_channel *ch = &priv->channel[queue]; @@ -738395,7 +738395,7 @@ index d1adb102a..556f29f05 100644 } } } -@@ -7319,6 +7349,113 @@ static const struct xdp_metadata_ops stmmac_xdp_metadata_ops = { +@@ -7312,6 +7342,113 @@ static const struct xdp_metadata_ops stmmac_xdp_metadata_ops = { .xmo_rx_timestamp = stmmac_xdp_rx_timestamp, }; @@ -738509,7 +738509,7 @@ index d1adb102a..556f29f05 100644 /** * stmmac_dvr_probe * @device: device pointer -@@ -7617,6 +7754,22 @@ int stmmac_dvr_probe(struct device *device, +@@ -7610,6 +7747,22 @@ int stmmac_dvr_probe(struct device *device, goto error_netdev_register; } @@ -738532,7 +738532,7 @@ index d1adb102a..556f29f05 100644 #ifdef CONFIG_DEBUG_FS stmmac_init_fs(ndev); #endif -@@ -7729,6 +7882,9 @@ int stmmac_suspend(struct device *dev) +@@ -7722,6 +7875,9 @@ int stmmac_suspend(struct device *dev) stmmac_pmt(priv, priv->hw, priv->wolopts); priv->irq_wake = 1; } else { @@ -738542,7 +738542,7 @@ index d1adb102a..556f29f05 100644 stmmac_mac_set(priv, priv->ioaddr, false); pinctrl_pm_select_sleep_state(priv->device); } -@@ -7828,6 +7984,9 @@ int stmmac_resume(struct device *dev) +@@ -7821,6 +7977,9 @@ int stmmac_resume(struct device *dev) /* reset the phy so that it's ready */ if (priv->mii) stmmac_mdio_reset(priv->mii); @@ -1193628,7 +1193628,7 @@ index 000000000..617b9ed78 +MODULE_DESCRIPTION("Rockchip MIPI RX DPHY driver"); +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c -index 5de5e2e97..e9fcc9eb0 100644 +index 26b157f53..82175cf07 100644 --- a/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +++ b/drivers/phy/rockchip/phy-rockchip-naneng-combphy.c @@ -5,85 +5,25 @@ @@ -1193733,7 +1193733,7 @@ index 5de5e2e97..e9fcc9eb0 100644 struct combphy_reg pipe_clk_25m; struct combphy_reg pipe_clk_100m; struct combphy_reg pipe_phymode_sel; -@@ -119,18 +60,23 @@ struct rockchip_combphy_grfcfg { +@@ -119,20 +60,25 @@ struct rockchip_combphy_grfcfg { struct combphy_reg con3_for_sata; struct combphy_reg pipe_con0_for_sata; struct combphy_reg pipe_con1_for_sata; @@ -1193747,6 +1193747,8 @@ index 5de5e2e97..e9fcc9eb0 100644 }; struct rockchip_combphy_cfg { + unsigned int num_phys; + unsigned int phy_ids[3]; + const int num_clks; + const struct clk_bulk_data *clks; const struct rockchip_combphy_grfcfg *grfcfg; @@ -1193757,10 +1193759,10 @@ index 5de5e2e97..e9fcc9eb0 100644 struct rockchip_combphy_priv { - u8 type; + u8 mode; + int id; void __iomem *mmio; int num_clks; - struct clk_bulk_data *clks; -@@ -138,11 +84,9 @@ struct rockchip_combphy_priv { +@@ -141,11 +87,9 @@ struct rockchip_combphy_priv { struct regmap *pipe_grf; struct regmap *phy_grf; struct phy *phy; @@ -1193773,7 +1193775,7 @@ index 5de5e2e97..e9fcc9eb0 100644 }; static void rockchip_combphy_updatel(struct rockchip_combphy_priv *priv, -@@ -181,44 +125,126 @@ static u32 rockchip_combphy_is_ready(struct rockchip_combphy_priv *priv) +@@ -184,44 +128,126 @@ static u32 rockchip_combphy_is_ready(struct rockchip_combphy_priv *priv) return val; } @@ -1193917,7 +1193919,7 @@ index 5de5e2e97..e9fcc9eb0 100644 ret = readx_poll_timeout_atomic(rockchip_combphy_is_ready, priv, val, val == cfg->pipe_phy_status.enable, -@@ -238,6 +264,10 @@ static int rockchip_combphy_init(struct phy *phy) +@@ -241,6 +267,10 @@ static int rockchip_combphy_init(struct phy *phy) static int rockchip_combphy_exit(struct phy *phy) { struct rockchip_combphy_priv *priv = phy_get_drvdata(phy); @@ -1193928,7 +1193930,7 @@ index 5de5e2e97..e9fcc9eb0 100644 clk_bulk_disable_unprepare(priv->num_clks, priv->clks); reset_control_assert(priv->phy_rst); -@@ -245,13 +275,47 @@ static int rockchip_combphy_exit(struct phy *phy) +@@ -248,13 +278,47 @@ static int rockchip_combphy_exit(struct phy *phy) return 0; } @@ -1193977,7 +1193979,7 @@ index 5de5e2e97..e9fcc9eb0 100644 { struct rockchip_combphy_priv *priv = dev_get_drvdata(dev); -@@ -260,57 +324,77 @@ static struct phy *rockchip_combphy_xlate(struct device *dev, struct of_phandle_ +@@ -263,57 +327,77 @@ static struct phy *rockchip_combphy_xlate(struct device *dev, struct of_phandle_ return ERR_PTR(-EINVAL); } @@ -1194084,7 +1194086,7 @@ index 5de5e2e97..e9fcc9eb0 100644 } static int rockchip_combphy_probe(struct platform_device *pdev) -@@ -324,7 +408,7 @@ static int rockchip_combphy_probe(struct platform_device *pdev) +@@ -327,7 +411,7 @@ static int rockchip_combphy_probe(struct platform_device *pdev) phy_cfg = of_device_get_match_data(dev); if (!phy_cfg) { @@ -1194093,7 +1194095,7 @@ index 5de5e2e97..e9fcc9eb0 100644 return -EINVAL; } -@@ -332,26 +416,30 @@ static int rockchip_combphy_probe(struct platform_device *pdev) +@@ -335,12 +419,22 @@ static int rockchip_combphy_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; @@ -1194114,6 +1194116,12 @@ index 5de5e2e97..e9fcc9eb0 100644 + if (!priv->clks) + return -ENOMEM; + + /* find the phy-id from the io address */ + priv->id = -ENODEV; + for (id = 0; id < phy_cfg->num_phys; id++) { +@@ -351,19 +445,13 @@ static int rockchip_combphy_probe(struct platform_device *pdev) + } + priv->dev = dev; - priv->type = PHY_NONE; + priv->mode = PHY_NONE; @@ -1194132,7 +1194140,7 @@ index 5de5e2e97..e9fcc9eb0 100644 priv->phy = devm_phy_create(dev, NULL, &rochchip_combphy_ops); if (IS_ERR(priv->phy)) { dev_err(dev, "failed to create combphy\n"); -@@ -366,85 +454,358 @@ static int rockchip_combphy_probe(struct platform_device *pdev) +@@ -378,85 +466,358 @@ static int rockchip_combphy_probe(struct platform_device *pdev) return PTR_ERR_OR_ZERO(phy_provider); } @@ -1194144,8 +1194152,7 @@ index 5de5e2e97..e9fcc9eb0 100644 unsigned long rate; - u32 val; + int i; - -- switch (priv->type) { ++ + /* Configure PHY reference clock frequency */ + for (i = 0; i < priv->num_clks; i++) { + if (!strncmp(priv->clks[i].id, "refclk", 6)) { @@ -1194158,7 +1194165,8 @@ index 5de5e2e97..e9fcc9eb0 100644 + dev_err(priv->dev, "No refclk found\n"); + return -EINVAL; + } -+ + +- switch (priv->type) { + switch (priv->mode) { case PHY_TYPE_PCIE: - /* Set SSC downward spread spectrum. */ @@ -1194227,7 +1194235,7 @@ index 5de5e2e97..e9fcc9eb0 100644 + + return 0; +} - ++ +static const struct rockchip_combphy_grfcfg rk3528_combphy_grfcfgs = { + /* pipe-phy-grf */ + .pcie_mode_set = { 0x48000, 5, 0, 0x00, 0x11 }, @@ -1194249,7 +1194257,7 @@ index 5de5e2e97..e9fcc9eb0 100644 + /* pipe-grf */ + .u3otg0_port_en = { 0x40044, 15, 0, 0x0181, 0x1100 }, +}; -+ + +static const struct clk_bulk_data rk3528_clks[] = { + { .id = "refclk" }, + { .id = "apbclk" }, @@ -1194300,41 +1194308,41 @@ index 5de5e2e97..e9fcc9eb0 100644 - PHYREG32); + /* Set SSC downward spread spectrum */ + rockchip_combphy_updatel(priv, GENMASK(5, 4), BIT(4), 0x7c); -+ -+ /* Enable adaptive CTLE for USB3.0 Rx */ -+ rockchip_combphy_updatel(priv, GENMASK(0, 0), BIT(0), 0x0e << 2); -+ -+ /* Set PLL KVCO fine tuning signals */ -+ rockchip_combphy_updatel(priv, GENMASK(4, 2), 0x2 << 2, 0x20 << 2); - /* Enable adaptive CTLE for USB3.0 Rx. */ - val = readl(priv->mmio + PHYREG15); - val |= PHYREG15_CTLE_EN; - writel(val, priv->mmio + PHYREG15); -+ /* Set PLL LPF R1 to su_trim[10:7]=1001 */ -+ writel(0x4, priv->mmio + (0xb << 2)); ++ /* Enable adaptive CTLE for USB3.0 Rx */ ++ rockchip_combphy_updatel(priv, GENMASK(0, 0), BIT(0), 0x0e << 2); - /* Set PLL KVCO fine tuning signals. */ - rockchip_combphy_updatel(priv, PHYREG33_PLL_KVCO_MASK, - PHYREG33_PLL_KVCO_VALUE << PHYREG33_PLL_KVCO_SHIFT, - PHYREG33); -+ /* Set PLL input clock divider 1/2 */ -+ rockchip_combphy_updatel(priv, GENMASK(7, 6), BIT(6), 0x5 << 2); ++ /* Set PLL KVCO fine tuning signals */ ++ rockchip_combphy_updatel(priv, GENMASK(4, 2), 0x2 << 2, 0x20 << 2); - /* Enable controlling random jitter. */ - writel(PHYREG12_PLL_LPF_ADJ_VALUE, priv->mmio + PHYREG12); -+ /* Set PLL loop divider */ -+ writel(0x32, priv->mmio + (0x11 << 2)); ++ /* Set PLL LPF R1 to su_trim[10:7]=1001 */ ++ writel(0x4, priv->mmio + (0xb << 2)); - /* Set PLL input clock divider 1/2. */ - rockchip_combphy_updatel(priv, PHYREG6_PLL_DIV_MASK, - PHYREG6_PLL_DIV_2 << PHYREG6_PLL_DIV_SHIFT, - PHYREG6); -+ /* Set PLL KVCO to min and set PLL charge pump current to max */ -+ writel(0xf0, priv->mmio + (0xa << 2)); ++ /* Set PLL input clock divider 1/2 */ ++ rockchip_combphy_updatel(priv, GENMASK(7, 6), BIT(6), 0x5 << 2); - writel(PHYREG18_PLL_LOOP, priv->mmio + PHYREG18); - writel(PHYREG11_SU_TRIM_0_7, priv->mmio + PHYREG11); ++ /* Set PLL loop divider */ ++ writel(0x32, priv->mmio + (0x11 << 2)); ++ ++ /* Set PLL KVCO to min and set PLL charge pump current to max */ ++ writel(0xf0, priv->mmio + (0xa << 2)); ++ + /* Set Rx squelch input filler bandwidth */ + writel(0x0e, priv->mmio + (0x14 << 2)); @@ -1194347,19 +1194355,7 @@ index 5de5e2e97..e9fcc9eb0 100644 + dev_err(priv->dev, "incompatible PHY type\n"); + return -EINVAL; + } - -- case PHY_TYPE_SATA: -- /* Enable adaptive CTLE for SATA Rx. */ -- val = readl(priv->mmio + PHYREG15); -- val |= PHYREG15_CTLE_EN; -- writel(val, priv->mmio + PHYREG15); -- /* -- * Set tx_rterm=50ohm and rx_rterm=44ohm for SATA. -- * 0: 60ohm, 8: 50ohm 15: 44ohm (by step abort 1ohm) -- */ -- val = PHYREG7_TX_RTERM_50OHM << PHYREG7_TX_RTERM_SHIFT; -- val |= PHYREG7_RX_RTERM_44OHM << PHYREG7_RX_RTERM_SHIFT; -- writel(val, priv->mmio + PHYREG7); ++ + rate = clk_get_rate(refclk); + + switch (rate) { @@ -1194378,7 +1194374,19 @@ index 5de5e2e97..e9fcc9eb0 100644 + if (priv->mode == PHY_TYPE_PCIE) { + /* PLL KVCO tuning fine */ + rockchip_combphy_updatel(priv, GENMASK(4, 2), 0x2 << 2, 0x20 << 2); -+ + +- case PHY_TYPE_SATA: +- /* Enable adaptive CTLE for SATA Rx. */ +- val = readl(priv->mmio + PHYREG15); +- val |= PHYREG15_CTLE_EN; +- writel(val, priv->mmio + PHYREG15); +- /* +- * Set tx_rterm=50ohm and rx_rterm=44ohm for SATA. +- * 0: 60ohm, 8: 50ohm 15: 44ohm (by step abort 1ohm) +- */ +- val = PHYREG7_TX_RTERM_50OHM << PHYREG7_TX_RTERM_SHIFT; +- val |= PHYREG7_RX_RTERM_44OHM << PHYREG7_RX_RTERM_SHIFT; +- writel(val, priv->mmio + PHYREG7); + /* Enable controlling random jitter, aka RMJ */ + writel(0x4, priv->mmio + (0xb << 2)); + @@ -1194451,14 +1194459,14 @@ index 5de5e2e97..e9fcc9eb0 100644 + .combphy_cfg = rk3562_combphy_cfg, + .force_det_out = true, +}; -+ + +static int rk3568_combphy_cfg(struct rockchip_combphy_priv *priv) +{ + const struct rockchip_combphy_grfcfg *cfg = priv->cfg->grfcfg; + struct clk *refclk = NULL; + unsigned long rate; + int i; - ++ + /* Configure PHY reference clock frequency */ + for (i = 0; i < priv->num_clks; i++) { + if (!strncmp(priv->clks[i].id, "refclk", 6)) { @@ -1194532,7 +1194540,7 @@ index 5de5e2e97..e9fcc9eb0 100644 case PHY_TYPE_QSGMII: rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_xpcs_phy_ready, true); rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_phymode_sel, true); -@@ -452,78 +813,60 @@ static int rk3568_combphy_cfg(struct rockchip_combphy_priv *priv) +@@ -464,78 +825,60 @@ static int rk3568_combphy_cfg(struct rockchip_combphy_priv *priv) rockchip_combphy_param_write(priv->phy_grf, &cfg->pipe_sel_qsgmii, true); rockchip_combphy_param_write(priv->phy_grf, &cfg->qsgmii_mode_set, true); break; @@ -1194642,14 +1194650,14 @@ index 5de5e2e97..e9fcc9eb0 100644 return 0; } -@@ -558,72 +901,91 @@ static const struct rockchip_combphy_grfcfg rk3568_combphy_grfcfgs = { +@@ -570,7 +913,16 @@ static const struct rockchip_combphy_grfcfg rk3568_combphy_grfcfgs = { .con3_for_sata = { 0x000c, 15, 0, 0x00, 0x4407 }, /* pipe-grf */ .pipe_con0_for_sata = { 0x0000, 15, 0, 0x00, 0x2220 }, -+ .pipe_sgmii_mac_sel = { 0x0040, 1, 1, 0x00, 0x01 }, ++ .pipe_sgmii_mac_sel = { 0x0040, 1, 1, 0x00, 0x01 }, .pipe_xpcs_phy_ready = { 0x0040, 2, 2, 0x00, 0x01 }, -+ .u3otg0_port_en = { 0x0104, 15, 0, 0x0181, 0x1100 }, -+ .u3otg1_port_en = { 0x0144, 15, 0, 0x0181, 0x1100 }, ++ .u3otg0_port_en = { 0x0104, 15, 0, 0x0181, 0x1100 }, ++ .u3otg1_port_en = { 0x0144, 15, 0, 0x0181, 0x1100 }, +}; + +static const struct clk_bulk_data rk3568_clks[] = { @@ -1194659,11 +1194667,15 @@ index 5de5e2e97..e9fcc9eb0 100644 }; static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { -+ .num_clks = ARRAY_SIZE(rk3568_clks), -+ .clks = rk3568_clks, +@@ -580,74 +932,78 @@ static const struct rockchip_combphy_cfg rk3568_combphy_cfgs = { + 0xfe830000, + 0xfe840000, + }, ++ .num_clks = ARRAY_SIZE(rk3568_clks), ++ .clks = rk3568_clks, .grfcfg = &rk3568_combphy_grfcfgs, .combphy_cfg = rk3568_combphy_cfg, -+ .force_det_out = true, ++ .force_det_out = true, }; static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) @@ -1194697,8 +1194709,14 @@ index 5de5e2e97..e9fcc9eb0 100644 rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_pcie, true); rockchip_combphy_param_write(priv->phy_grf, &cfg->con2_for_pcie, true); rockchip_combphy_param_write(priv->phy_grf, &cfg->con3_for_pcie, true); -- rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l0_sel, true); -- rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l1_sel, true); +- switch (priv->id) { +- case 1: +- rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l0_sel, true); +- break; +- case 2: +- rockchip_combphy_param_write(priv->pipe_grf, &cfg->pipe_pcie1l1_sel, true); +- break; +- } break; case PHY_TYPE_USB3: /* Set SSC downward spread spectrum */ @@ -1194767,7 +1194785,7 @@ index 5de5e2e97..e9fcc9eb0 100644 rockchip_combphy_param_write(priv->phy_grf, &cfg->con0_for_sata, true); rockchip_combphy_param_write(priv->phy_grf, &cfg->con1_for_sata, true); -@@ -639,44 +1001,68 @@ static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) +@@ -663,44 +1019,68 @@ static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) return -EINVAL; } @@ -1194863,7 +1194881,7 @@ index 5de5e2e97..e9fcc9eb0 100644 } break; default: -@@ -684,23 +1070,43 @@ static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) +@@ -708,23 +1088,43 @@ static int rk3588_combphy_cfg(struct rockchip_combphy_priv *priv) return -EINVAL; } @@ -1194920,7 +1194938,7 @@ index 5de5e2e97..e9fcc9eb0 100644 } return 0; -@@ -713,6 +1119,7 @@ static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = { +@@ -737,6 +1137,7 @@ static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = { .pipe_rxterm_set = { 0x0000, 12, 12, 0x00, 0x01 }, .pipe_txelec_set = { 0x0004, 1, 1, 0x00, 0x01 }, .pipe_txcomp_set = { 0x0004, 4, 4, 0x00, 0x01 }, @@ -1194928,14 +1194946,14 @@ index 5de5e2e97..e9fcc9eb0 100644 .pipe_clk_25m = { 0x0004, 14, 13, 0x00, 0x01 }, .pipe_clk_100m = { 0x0004, 14, 13, 0x00, 0x02 }, .pipe_rxterm_sel = { 0x0008, 8, 8, 0x00, 0x01 }, -@@ -730,17 +1137,32 @@ static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = { +@@ -754,9 +1155,13 @@ static const struct rockchip_combphy_grfcfg rk3588_combphy_grfcfgs = { .con3_for_sata = { 0x000c, 15, 0, 0x00, 0x0407 }, /* pipe-grf */ .pipe_con0_for_sata = { 0x0000, 11, 5, 0x00, 0x22 }, - .pipe_con1_for_sata = { 0x0000, 2, 0, 0x00, 0x2 }, - .pipe_pcie1l0_sel = { 0x0100, 0, 0, 0x01, 0x0 }, - .pipe_pcie1l1_sel = { 0x0100, 1, 1, 0x01, 0x0 }, -+ .pipe_con1_for_sata = { 0x0004, 2, 0, 0x00, 0x2 }, ++ .pipe_con1_for_sata = { 0x0004, 2, 0, 0x00, 0x2 }, +}; + +static const struct clk_bulk_data rk3588_clks[] = { @@ -1194945,11 +1194963,15 @@ index 5de5e2e97..e9fcc9eb0 100644 }; static const struct rockchip_combphy_cfg rk3588_combphy_cfgs = { -+ .num_clks = ARRAY_SIZE(rk3588_clks), -+ .clks = rk3588_clks, +@@ -766,11 +1171,22 @@ static const struct rockchip_combphy_cfg rk3588_combphy_cfgs = { + 0xfee10000, + 0xfee20000, + }, ++ .num_clks = ARRAY_SIZE(rk3588_clks), ++ .clks = rk3588_clks, .grfcfg = &rk3588_combphy_grfcfgs, .combphy_cfg = rk3588_combphy_cfg, -+ .force_det_out = true, ++ .force_det_out = true, }; static const struct of_device_id rockchip_combphy_of_match[] = { @@ -1194964,7 +1194986,7 @@ index 5de5e2e97..e9fcc9eb0 100644 { .compatible = "rockchip,rk3568-naneng-combphy", .data = &rk3568_combphy_cfgs, -@@ -756,7 +1178,7 @@ MODULE_DEVICE_TABLE(of, rockchip_combphy_of_match); +@@ -786,7 +1202,7 @@ MODULE_DEVICE_TABLE(of, rockchip_combphy_of_match); static struct platform_driver rockchip_combphy_driver = { .probe = rockchip_combphy_probe, .driver = { @@ -1203583,10 +1203605,10 @@ index 000000000..2d142cf73 +MODULE_DESCRIPTION("Rockchip HDMI/DP Combo PHY with Samsung IP block"); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c b/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c -index 121e5961c..7eb8899e9 100644 +index 9857ee45b..ab4e84b50 100644 --- a/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c +++ b/drivers/phy/rockchip/phy-rockchip-snps-pcie3.c -@@ -12,24 +12,21 @@ +@@ -12,34 +12,27 @@ #include #include #include @@ -1203614,18 +1203636,17 @@ index 121e5961c..7eb8899e9 100644 /* Register for RK3588 */ #define PHP_GRF_PCIESEL_CON 0x100 #define RK3588_PCIE3PHY_GRF_CMN_CON0 0x0 -@@ -37,10 +34,6 @@ + #define RK3588_PCIE3PHY_GRF_PHY0_STATUS1 0x904 #define RK3588_PCIE3PHY_GRF_PHY1_STATUS1 0xa04 #define RK3588_SRAM_INIT_DONE(reg) (reg & BIT(0)) - +- -#define RK3588_BIFURCATION_LANE_0_1 BIT(0) -#define RK3588_BIFURCATION_LANE_2_3 BIT(1) -#define RK3588_LANE_AGGREGATION BIT(2) -- - struct rockchip_p3phy_ops; + #define RK3588_PCIE1LN_SEL_EN (GENMASK(1, 0) << 16) + #define RK3588_PCIE30_PHY_MODE_EN (GENMASK(2, 0) << 16) - struct rockchip_p3phy_priv { -@@ -56,8 +49,7 @@ struct rockchip_p3phy_priv { +@@ -58,8 +51,7 @@ struct rockchip_p3phy_priv { struct phy *phy; struct clk_bulk_data *clks; int num_clks; @@ -1203635,7 +1203656,7 @@ index 121e5961c..7eb8899e9 100644 }; struct rockchip_p3phy_ops { -@@ -76,6 +68,9 @@ static int rockchip_p3phy_set_mode(struct phy *phy, enum phy_mode mode, int subm +@@ -78,6 +70,9 @@ static int rockchip_p3phy_set_mode(struct phy *phy, enum phy_mode mode, int subm case PHY_MODE_PCIE_EP: priv->mode = PHY_MODE_PCIE_EP; break; @@ -1203645,7 +1203666,7 @@ index 121e5961c..7eb8899e9 100644 default: dev_err(&phy->dev, "%s, invalid mode\n", __func__); return -EINVAL; -@@ -84,34 +79,30 @@ static int rockchip_p3phy_set_mode(struct phy *phy, enum phy_mode mode, int subm +@@ -86,34 +81,30 @@ static int rockchip_p3phy_set_mode(struct phy *phy, enum phy_mode mode, int subm return 0; } @@ -1203695,7 +1203716,7 @@ index 121e5961c..7eb8899e9 100644 reset_control_deassert(priv->p30phy); -@@ -119,9 +110,24 @@ static int rockchip_p3phy_rk3568_init(struct rockchip_p3phy_priv *priv) +@@ -121,9 +112,24 @@ static int rockchip_p3phy_rk3568_init(struct rockchip_p3phy_priv *priv) GRF_PCIE30PHY_STATUS0, reg, SRAM_INIT_DONE(reg), 0, 500); @@ -1203721,11 +1203742,11 @@ index 121e5961c..7eb8899e9 100644 return ret; } -@@ -132,41 +138,11 @@ static const struct rockchip_p3phy_ops rk3568_ops = { +@@ -134,34 +140,11 @@ static const struct rockchip_p3phy_ops rk3568_ops = { static int rockchip_p3phy_rk3588_init(struct rockchip_p3phy_priv *priv) { u32 reg = 0; -- u8 mode = 0; +- u8 mode = RK3588_LANE_AGGREGATION; /* default */ int ret; /* Deassert PCIe PMA output clamp mode */ @@ -1203733,37 +1203754,30 @@ index 121e5961c..7eb8899e9 100644 - /* Set bifurcation if needed */ - for (int i = 0; i < priv->num_lanes; i++) { -- if (!priv->lanes[i]) -- mode |= (BIT(i) << 3); -- - if (priv->lanes[i] > 1) -- mode |= (BIT(i) >> 1); +- mode &= ~RK3588_LANE_AGGREGATION; +- if (priv->lanes[i] == 3) +- mode |= RK3588_BIFURCATION_LANE_0_1; +- if (priv->lanes[i] == 4) +- mode |= RK3588_BIFURCATION_LANE_2_3; - } - -- if (!mode) -- reg = RK3588_LANE_AGGREGATION; -- else { -- if (mode & (BIT(0) | BIT(1))) -- reg |= RK3588_BIFURCATION_LANE_0_1; -- -- if (mode & (BIT(2) | BIT(3))) -- reg |= RK3588_BIFURCATION_LANE_2_3; -- } -- -- regmap_write(priv->phy_grf, RK3588_PCIE3PHY_GRF_CMN_CON0, (0x7<<16) | reg); +- reg = mode; +- regmap_write(priv->phy_grf, RK3588_PCIE3PHY_GRF_CMN_CON0, +- RK3588_PCIE30_PHY_MODE_EN | reg); - - /* Set pcie1ln_sel in PHP_GRF_PCIESEL_CON */ - if (!IS_ERR(priv->pipe_grf)) { -- reg = (mode & (BIT(6) | BIT(7))) >> 6; +- reg = mode & (RK3588_BIFURCATION_LANE_0_1 | RK3588_BIFURCATION_LANE_2_3); - if (reg) - regmap_write(priv->pipe_grf, PHP_GRF_PCIESEL_CON, -- (reg << 16) | reg); +- RK3588_PCIE1LN_SEL_EN | reg); - } - reset_control_deassert(priv->p30phy); ret = regmap_read_poll_timeout(priv->phy_grf, -@@ -178,8 +154,8 @@ static int rockchip_p3phy_rk3588_init(struct rockchip_p3phy_priv *priv) +@@ -173,8 +156,8 @@ static int rockchip_p3phy_rk3588_init(struct rockchip_p3phy_priv *priv) reg, RK3588_SRAM_INIT_DONE(reg), 0, 500); if (ret) @@ -1203774,7 +1203788,7 @@ index 121e5961c..7eb8899e9 100644 return ret; } -@@ -233,6 +209,7 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) +@@ -228,6 +211,7 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) struct rockchip_p3phy_priv *priv; struct device_node *np = dev->of_node; int ret; @@ -1203782,7 +1203796,7 @@ index 121e5961c..7eb8899e9 100644 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) -@@ -256,29 +233,31 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) +@@ -251,29 +235,31 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) return PTR_ERR(priv->phy_grf); } @@ -1203836,7 +1203850,7 @@ index 121e5961c..7eb8899e9 100644 priv->phy = devm_phy_create(dev, NULL, &rochchip_p3phy_ops); if (IS_ERR(priv->phy)) { -@@ -286,13 +265,11 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) +@@ -281,13 +267,11 @@ static int rockchip_p3phy_probe(struct platform_device *pdev) return PTR_ERR(priv->phy); } @@ -1574549,7 +1574563,7 @@ index 000000000..8bef3d728 +obj-$(CONFIG_BLACKBOX_STORAGE_BY_MEMORY) += system_adapter_by_memory.o diff --git a/drivers/staging/blackbox/rockchip/system_adapter.c b/drivers/staging/blackbox/rockchip/system_adapter.c new file mode 100644 -index 000000000..538f8fbd7 +index 000000000..43fe00249 --- /dev/null +++ b/drivers/staging/blackbox/rockchip/system_adapter.c @@ -0,0 +1,312 @@ @@ -1575933,7 +1575947,7 @@ index f13e91f2c..13025a666 100644 unsigned int uart_16550_compatible:1; }; diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c -index 141627370..47d943b92 100644 +index a17803da8..bf5b436d7 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -55,6 +55,7 @@ @@ -1576000,7 +1576014,7 @@ index 141627370..47d943b92 100644 /* Remember loaded iotype */ up->cur_iotype = p->iotype; p->handle_irq = serial8250_default_handle_irq; -@@ -1541,8 +1549,13 @@ static inline void __start_tx(struct uart_port *port) +@@ -1535,8 +1543,13 @@ static inline void __start_tx(struct uart_port *port) { struct uart_8250_port *up = up_to_u8250p(port); @@ -1576014,7 +1576028,7 @@ index 141627370..47d943b92 100644 if (serial8250_set_THRI(up)) { if (up->bugs & UART_BUG_TXEN) { -@@ -1880,6 +1893,12 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); +@@ -1874,6 +1887,12 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) { @@ -1576027,7 +1576041,7 @@ index 141627370..47d943b92 100644 switch (iir & 0x3f) { case UART_IIR_THRI: /* -@@ -1902,6 +1921,7 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) +@@ -1896,6 +1915,7 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) return true; } return up->dma->rx_dma(up); @@ -1576035,7 +1576049,7 @@ index 141627370..47d943b92 100644 } /* -@@ -1910,8 +1930,10 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) +@@ -1904,8 +1924,10 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) int serial8250_handle_irq(struct uart_port *port, unsigned int iir) { struct uart_8250_port *up = up_to_u8250p(port); @@ -1576046,7 +1576060,7 @@ index 141627370..47d943b92 100644 unsigned long flags; u16 status; -@@ -1922,6 +1944,17 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) +@@ -1916,6 +1938,17 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) status = serial_lsr_in(up); @@ -1576064,7 +1576078,7 @@ index 141627370..47d943b92 100644 /* * If port is stopped and there are no error conditions in the * FIFO, then don't drain the FIFO, as this may lead to TTY buffer -@@ -1944,14 +1977,37 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) +@@ -1938,14 +1971,37 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) if (!up->dma || handle_rx_dma(up, iir)) status = serial8250_rx_chars(up, status); } @@ -1576102,7 +1576116,7 @@ index 141627370..47d943b92 100644 uart_unlock_and_check_sysrq_irqrestore(port, flags); return 1; -@@ -2451,7 +2507,11 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2445,7 +2501,11 @@ int serial8250_do_startup(struct uart_port *port) if (uart_console(port)) msg = "forbid DMA for kernel console"; else if (serial8250_request_dma(up)) @@ -1576114,7 +1576128,7 @@ index 141627370..47d943b92 100644 if (msg) { dev_warn_ratelimited(port->dev, "%s\n", msg); up->dma = NULL; -@@ -2654,6 +2714,9 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, +@@ -2648,6 +2708,9 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, { struct uart_8250_port *up = up_to_u8250p(port); @@ -1576124,7 +1576138,7 @@ index 141627370..47d943b92 100644 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (is_omap1510_8250(up)) { if (baud == 115200) { -@@ -2673,6 +2736,16 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, +@@ -2667,6 +2730,16 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, serial_port_out(port, UART_LCR, up->lcr | UART_LCR_DLAB); serial_dl_write(up, quot); @@ -1576141,7 +1576155,7 @@ index 141627370..47d943b92 100644 } EXPORT_SYMBOL_GPL(serial8250_do_set_divisor); -@@ -2853,6 +2926,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2847,6 +2920,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, if ((termios->c_cflag & CREAD) == 0) port->ignore_status_mask |= UART_LSR_DR; @@ -1576149,7 +1576163,7 @@ index 141627370..47d943b92 100644 /* * CTS flow control flag and modem status interrupts */ -@@ -2866,6 +2940,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2860,6 +2934,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, up->ier |= UART_IER_RTOIE; serial_port_out(port, UART_IER, up->ier); @@ -1576157,7 +1576171,7 @@ index 141627370..47d943b92 100644 if (up->capabilities & UART_CAP_EFR) { unsigned char efr = 0; -@@ -2884,8 +2959,23 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2878,8 +2953,23 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_EFR, efr); } @@ -1576181,7 +1576195,7 @@ index 141627370..47d943b92 100644 /* * LCR DLAB must be set to enable 64-byte FIFO mode. If the FCR * is written without DLAB set, this mode will be disabled. -@@ -2894,6 +2984,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2888,6 +2978,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_FCR, up->fcr); serial_port_out(port, UART_LCR, up->lcr); /* reset DLAB */ @@ -1576189,7 +1576203,7 @@ index 141627370..47d943b92 100644 if (port->type != PORT_16750) { /* emulated UARTs (Lucent Venus 167x) need two steps */ if (up->fcr & UART_FCR_ENABLE_FIFO) -@@ -2901,6 +2992,21 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2895,6 +2986,21 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_FCR, up->fcr); /* set fcr */ } serial8250_set_mctrl(port, port->mctrl); @@ -1576212,10 +1576226,10 @@ index 141627370..47d943b92 100644 serial8250_rpm_put(up); diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c -index 71635dfa7..07446b94b 100644 +index 741797220..74bd74fe9 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c -@@ -1850,7 +1850,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) +@@ -1865,7 +1865,8 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id) * bus_resume methods. */ if (hdev->parent) { /* normal device */ @@ -1576226,10 +1576240,10 @@ index 71635dfa7..07446b94b 100644 const struct hc_driver *drv = bus_to_hcd(hdev->bus)->driver; diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c -index 15e9bd180..96c67eaca 100644 +index b4783574b..195696fb6 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c -@@ -322,6 +322,10 @@ static const struct usb_device_id usb_quirk_list[] = { +@@ -325,6 +325,10 @@ static const struct usb_device_id usb_quirk_list[] = { /* Alcor Micro Corp. Hub */ { USB_DEVICE(0x058f, 0x9254), .driver_info = USB_QUIRK_RESET_RESUME }, @@ -1576240,7 +1576254,7 @@ index 15e9bd180..96c67eaca 100644 /* appletouch */ { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, -@@ -425,6 +429,11 @@ static const struct usb_device_id usb_quirk_list[] = { +@@ -428,6 +432,11 @@ static const struct usb_device_id usb_quirk_list[] = { /* Generic RTL8153 based ethernet adapters */ { USB_DEVICE(0x0bda, 0x8153), .driver_info = USB_QUIRK_NO_LPM }, @@ -1576252,7 +1576266,7 @@ index 15e9bd180..96c67eaca 100644 /* SONiX USB DEVICE Touchpad */ { USB_DEVICE(0x0c45, 0x7056), .driver_info = USB_QUIRK_IGNORE_REMOTE_WAKEUP }, -@@ -520,6 +529,9 @@ static const struct usb_device_id usb_quirk_list[] = { +@@ -523,6 +532,9 @@ static const struct usb_device_id usb_quirk_list[] = { { USB_DEVICE(0x2040, 0x7200), .driver_info = USB_QUIRK_CONFIG_INTF_STRINGS }, @@ -1675765,15 +1675779,15 @@ index 5acb77968..b81871205 100644 int (*clks_config)(void *priv, bool enabled); int (*crosststamp)(ktime_t *device, struct system_counterval_t *system, diff --git a/include/linux/usb/quirks.h b/include/linux/usb/quirks.h -index eeb7c2157..e3e543d04 100644 +index 59409c1fc..dc11edff2 100644 --- a/include/linux/usb/quirks.h +++ b/include/linux/usb/quirks.h -@@ -72,4 +72,7 @@ - /* device has endpoints that should be ignored */ - #define USB_QUIRK_ENDPOINT_IGNORE BIT(15) +@@ -75,4 +75,7 @@ + /* short SET_ADDRESS request timeout */ + #define USB_QUIRK_SHORT_SET_ADDRESS_REQ_TIMEOUT BIT(16) +/* device can't support auto suspend function */ -+#define USB_QUIRK_AUTO_SUSPEND BIT(16) ++#define USB_QUIRK_AUTO_SUSPEND BIT(17) + #endif /* __LINUX_USB_QUIRKS_H */ diff --git a/include/linux/version_compat_defs.h b/include/linux/version_compat_defs.h @@ -1699857,7 +1699871,7 @@ index 000000000..c217380d1 + +#endif diff --git a/init/Kconfig b/init/Kconfig -index f67b31dac..4002f8fdd 100644 +index 54692e4cf..8aca666a1 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1373,6 +1373,12 @@ if BLK_DEV_INITRD @@ -1699874,7 +1699888,7 @@ index f67b31dac..4002f8fdd 100644 config BOOT_CONFIG diff --git a/init/initramfs.c b/init/initramfs.c -index 8d0fd946c..e6fc7d3a2 100644 +index efc477b90..dcf290295 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -15,6 +15,7 @@ @@ -1699896,10 +1699910,10 @@ index 8d0fd946c..e6fc7d3a2 100644 loff_t saved_offset = this_header; if (*buf == '0' && !(this_header & 3)) { diff --git a/init/main.c b/init/main.c -index 9e6ab6d59..0b5bee0aa 100644 +index b25c779e9..e91df45ba 100644 --- a/init/main.c +++ b/init/main.c -@@ -1545,6 +1545,10 @@ static noinline void __init kernel_init_freeable(void) +@@ -1547,6 +1547,10 @@ static noinline void __init kernel_init_freeable(void) smp_init(); sched_init_smp(); @@ -1702076,7 +1702090,7 @@ index 6c23c6af7..355b10611 100644 KBUILD_CPPFLAGS += $(CLANG_FLAGS) export CLANG_FLAGS diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn -index 2fe6f2828..79705d880 100644 +index 16c750bb9..7ee30ec9b 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -145,6 +145,9 @@ KBUILD_CFLAGS += $(call cc-disable-warning, unaligned-access) @@ -1702454,10 +1702468,10 @@ index 000000000..63e3da6f4 + make_boot_img; +fi diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c -index 5191fdbd3..cb6406f48 100644 +index 269bd79bc..afab872ee 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c -@@ -792,44 +794,31 @@ static void check_section(const char *modname, struct elf_info *elf, +@@ -794,44 +794,31 @@ static void check_section(const char *modname, struct elf_info *elf, #define ALL_INIT_DATA_SECTIONS \ ".init.setup", ".init.rodata", ".meminit.rodata", \ ".init.data", ".meminit.data" @@ -1702492,9 +1702506,9 @@ index 5191fdbd3..cb6406f48 100644 #define INIT_SECTIONS ".init.*" -#define MEM_INIT_SECTIONS ".meminit.*" - --#define EXIT_SECTIONS ".exit.*" - +-#define EXIT_SECTIONS ".exit.*" + -#define ALL_TEXT_SECTIONS ALL_INIT_TEXT_SECTIONS, ALL_EXIT_TEXT_SECTIONS, \ +#define ALL_TEXT_SECTIONS ".init.text", ".meminit.text", ".exit.text", \ TEXT_SECTIONS, OTHER_TEXT_SECTIONS @@ -1702507,7 +1702521,7 @@ index 5191fdbd3..cb6406f48 100644 XXXINIT_TO_SOME_INIT, ANY_INIT_TO_ANY_EXIT, ANY_EXIT_TO_ANY_INIT, -@@ -860,20 +849,10 @@ static const struct sectioncheck sectioncheck[] = { +@@ -862,20 +849,10 @@ static const struct sectioncheck sectioncheck[] = { /* Do not reference init/exit code/data from * normal code and data */ @@ -1702530,7 +1702544,7 @@ index 5191fdbd3..cb6406f48 100644 }, /* Do not reference init code/data from meminit code/data */ { -@@ -998,19 +977,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, +@@ -1000,19 +977,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, /* symbols in data sections that may refer to any init/exit sections */ if (match(fromsec, PATTERNS(DATA_SECTIONS)) && match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) && @@ -1702551,7 +1702565,7 @@ index 5191fdbd3..cb6406f48 100644 return 0; /* -@@ -1020,7 +987,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, +@@ -1022,7 +987,7 @@ static int secref_whitelist(const char *fromsec, const char *fromsym, */ if (!extra_warn && match(fromsec, PATTERNS(DATA_SECTIONS)) && @@ -1702560,7 +1702574,7 @@ index 5191fdbd3..cb6406f48 100644 match(fromsym, PATTERNS("*driver"))) return 0; -@@ -1240,10 +1147,10 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf, +@@ -1187,10 +1152,10 @@ static void check_export_symbol(struct module *mod, struct elf_info *elf, ELF_ST_TYPE(sym->st_info) == STT_LOPROC) s->is_func = true; @@ -1702573,7 +1702587,7 @@ index 5191fdbd3..cb6406f48 100644 warn("%s: %s: EXPORT_SYMBOL used for exit symbol. Remove __exit or EXPORT_SYMBOL.\n", mod->name, name); } -@@ -1460,32 +1367,20 @@ static void get_rel_type_and_sym(struct elf_info *elf, uint64_t r_info, +@@ -1407,32 +1372,20 @@ static void get_rel_type_and_sym(struct elf_info *elf, uint64_t r_info, return; } @@ -1702613,7 +1702627,7 @@ index 5191fdbd3..cb6406f48 100644 for (rela = start; rela < stop; rela++) { Elf_Sym *tsym; -@@ -1517,17 +1412,10 @@ static void section_rela(struct module *mod, struct elf_info *elf, +@@ -1464,17 +1417,10 @@ static void section_rela(struct module *mod, struct elf_info *elf, } static void section_rel(struct module *mod, struct elf_info *elf, @@ -1702634,7 +1702648,7 @@ index 5191fdbd3..cb6406f48 100644 for (rel = start; rel < stop; rel++) { Elf_Sym *tsym; -@@ -1575,16 +1463,33 @@ static void section_rel(struct module *mod, struct elf_info *elf, +@@ -1522,16 +1468,33 @@ static void section_rel(struct module *mod, struct elf_info *elf, static void check_sec_ref(struct module *mod, struct elf_info *elf) { int i; @@ -1702675,7 +1702689,7 @@ index 5191fdbd3..cb6406f48 100644 } diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h -index 5f94c2c9f..69baf014d 100644 +index 6413f26fc..1392afec1 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -1,4 +1,5 @@ @@ -1702684,7 +1702698,7 @@ index 5f94c2c9f..69baf014d 100644 #include #include #include -@@ -50,21 +52,19 @@ +@@ -51,21 +52,19 @@ #define ELF_R_TYPE ELF64_R_TYPE #endif -- Gitee