-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sunxi-6.11: ac200-ephy-ctl: fix error incompatible pointer type
- Loading branch information
Showing
3 changed files
with
356 additions
and
2 deletions.
There are no files selected for viewing
174 changes: 174 additions & 0 deletions
174
.../sunxi-6.11/patches.fixes/0001-ethernet-sunxi-gmac-fix-error-incompatible-pointer-t.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
From 09cc6d44c56df787e0911a097a5f37d274ee242f Mon Sep 17 00:00:00 2001 | ||
From: The-going <[email protected]> | ||
Date: Sun, 22 Sep 2024 15:33:12 +0300 | ||
Subject: [PATCH] ethernet: sunxi-gmac: fix error incompatible pointer type | ||
|
||
--- | ||
drivers/leds/rgb/leds-ws2812.c | 4 +- | ||
drivers/net/ethernet/allwinner/sunxi-gmac.c | 84 ++++++++++----------- | ||
2 files changed, 42 insertions(+), 46 deletions(-) | ||
|
||
diff --git a/drivers/leds/rgb/leds-ws2812.c b/drivers/leds/rgb/leds-ws2812.c | ||
index 1af735ce8e4d..c9981724bba9 100644 | ||
--- a/drivers/leds/rgb/leds-ws2812.c | ||
+++ b/drivers/leds/rgb/leds-ws2812.c | ||
@@ -198,12 +198,10 @@ static int ws2812_probe(struct platform_device *pdev) | ||
return 0; | ||
} | ||
|
||
-static int ws2812_remove(struct platform_device *pdev) | ||
+static void ws2812_remove(struct platform_device *pdev) | ||
{ | ||
misc_deregister(&ws2812_misc_dev); | ||
gpio_free(ws2812_pin); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id ws2812_of_match[] = { | ||
diff --git a/drivers/net/ethernet/allwinner/sunxi-gmac.c b/drivers/net/ethernet/allwinner/sunxi-gmac.c | ||
index 30efda8038f2..7c9d00e79ab4 100644 | ||
--- a/drivers/net/ethernet/allwinner/sunxi-gmac.c | ||
+++ b/drivers/net/ethernet/allwinner/sunxi-gmac.c | ||
@@ -200,29 +200,31 @@ static ssize_t adjust_bgs_show(struct device *dev, struct device_attribute *attr | ||
static ssize_t adjust_bgs_write(struct device *dev, struct device_attribute *attr, | ||
const char *buf, size_t count) | ||
{ | ||
- unsigned int out = 0; | ||
- struct net_device *ndev = to_net_dev(dev); | ||
- struct geth_priv *priv = netdev_priv(ndev); | ||
- u32 clk_value = readl(priv->base_phy); | ||
- u32 efuse_value; | ||
+ unsigned int out = 0; | ||
+ struct net_device *ndev = to_net_dev(dev); | ||
+ struct geth_priv *priv = netdev_priv(ndev); | ||
+ u32 clk_value = readl(priv->base_phy); | ||
+ u32 efuse_value; | ||
|
||
- out = simple_strtoul(buf, NULL, 10); | ||
+ out = simple_strtoul(buf, NULL, 10); | ||
|
||
- if (priv->phy_ext == INT_PHY) { | ||
- clk_value &= ~(0xF << 28); | ||
- if (sunxi_efuse_read(EFUSE_OEM_NAME, &efuse_value) != 0) | ||
- pr_err("get PHY efuse fail!\n"); | ||
- else | ||
+ if (priv->phy_ext == INT_PHY) { | ||
+ clk_value &= ~(0xF << 28); | ||
+ | ||
+ if (sunxi_efuse_read(EFUSE_OEM_NAME, &efuse_value) != 0) { | ||
+ pr_err("get PHY efuse fail!\n"); | ||
+ } else { | ||
#if defined(CONFIG_ARCH_SUN50IW2) | ||
- clk_value |= (((efuse_value >> 24) & 0x0F) + out) << 28; | ||
+ clk_value |= (((efuse_value >> 24) & 0x0F) + out) << 28; | ||
#else | ||
- pr_warn("miss config come from efuse!\n"); | ||
+ pr_warn("miss config come from efuse!\n"); | ||
#endif | ||
- } | ||
+ } | ||
+ } | ||
|
||
- writel(clk_value, priv->base_phy); | ||
+ writel(clk_value, priv->base_phy); | ||
|
||
- return count; | ||
+ return count; | ||
} | ||
|
||
static struct device_attribute adjust_reg[] = { | ||
@@ -990,22 +992,21 @@ static void geth_resume(struct device *dev) | ||
static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state) | ||
{ | ||
struct net_device *ndev = platform_get_drvdata(ofdev); | ||
- struct geth_priv *priv = netdev_priv(ndev); | ||
- | ||
- cancel_work_sync(&priv->eth_work); | ||
+ struct geth_priv *priv = netdev_priv(ndev); | ||
|
||
- if (!ndev || !netif_running(ndev)) | ||
- return 0; | ||
+ cancel_work_sync(&priv->eth_work); | ||
|
||
- spin_lock(&priv->lock); | ||
- netif_device_detach(ndev); | ||
- spin_unlock(&priv->lock); | ||
+ if (!ndev || !netif_running(ndev)) | ||
+ return 0; | ||
|
||
- geth_stop(ndev); | ||
+ spin_lock(&priv->lock); | ||
+ netif_device_detach(ndev); | ||
+ spin_unlock(&priv->lock); | ||
|
||
- if (priv->phy_ext == EXT_PHY) | ||
- geth_select_gpio_state(priv->pinctrl, PINCTRL_STATE_SLEEP); | ||
+ geth_stop(ndev); | ||
|
||
+ if (priv->phy_ext == EXT_PHY) | ||
+ geth_select_gpio_state(priv->pinctrl, PINCTRL_STATE_SLEEP); | ||
|
||
return 0; | ||
} | ||
@@ -1013,10 +1014,9 @@ static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state) | ||
static int ucc_geth_resume(struct platform_device *ofdev) | ||
{ | ||
struct net_device *ndev = platform_get_drvdata(ofdev); | ||
- struct geth_priv *priv = netdev_priv(ndev); | ||
- | ||
- schedule_work(&priv->eth_work); | ||
+ struct geth_priv *priv = netdev_priv(ndev); | ||
|
||
+ schedule_work(&priv->eth_work); | ||
|
||
return 0; | ||
} | ||
@@ -2163,7 +2163,7 @@ static int geth_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int geth_remove(struct platform_device *pdev) | ||
+static void geth_remove(struct platform_device *pdev) | ||
{ | ||
struct net_device *ndev = platform_get_drvdata(pdev); | ||
struct geth_priv *priv = netdev_priv(ndev); | ||
@@ -2177,8 +2177,6 @@ static int geth_remove(struct platform_device *pdev) | ||
geth_hw_release(pdev); | ||
platform_set_drvdata(pdev, NULL); | ||
free_netdev(ndev); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id geth_of_match[] = { | ||
@@ -2188,16 +2186,16 @@ static const struct of_device_id geth_of_match[] = { | ||
MODULE_DEVICE_TABLE(of, geth_of_match); | ||
|
||
static struct platform_driver geth_driver = { | ||
- .probe = geth_probe, | ||
- .remove = geth_remove, | ||
- .suspend = ucc_geth_suspend, | ||
- .resume = ucc_geth_resume, | ||
- .driver = { | ||
- .name = "sunxi-gmac", | ||
- .owner = THIS_MODULE, | ||
- .pm = &geth_pm_ops, | ||
- .of_match_table = geth_of_match, | ||
- }, | ||
+ .probe = geth_probe, | ||
+ .remove = geth_remove, | ||
+ .suspend = ucc_geth_suspend, | ||
+ .resume = ucc_geth_resume, | ||
+ .driver = { | ||
+ .name = "sunxi-gmac", | ||
+ .owner = THIS_MODULE, | ||
+ .pm = &geth_pm_ops, | ||
+ .of_match_table = geth_of_match, | ||
+ }, | ||
}; | ||
module_platform_driver(geth_driver); | ||
|
||
-- | ||
2.35.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
From 056774a1427aec3f6b9d5aa796619c7105f97502 Mon Sep 17 00:00:00 2001 | ||
From 9c0c8ad12f25b4cebf8d1ce0383e08c913f20741 Mon Sep 17 00:00:00 2001 | ||
From: The-going <[email protected]> | ||
Date: Sat, 21 Sep 2024 16:37:09 +0300 | ||
Subject: [PATCH] sunxi-sysinfo: fix error incompatible pointer type | ||
|
@@ -7,7 +7,15 @@ Subject: [PATCH] sunxi-sysinfo: fix error incompatible pointer type | |
drivers/char/dump_reg/dump_reg.c | 3 +-- | ||
drivers/char/sunxi-sysinfo/sunxi-sysinfo.c | 4 +--- | ||
drivers/misc/sunxi-addr/sunxi-addr.c | 3 +-- | ||
3 files changed, 3 insertions(+), 7 deletions(-) | ||
drivers/net/phy/sunxi-ephy.c | 4 +--- | ||
drivers/phy/allwinner/ac200-ephy-ctl.c | 4 +--- | ||
drivers/pwm/pwm-sunxi-enhance.c | 6 ++---- | ||
sound/soc/codecs/ac200.c | 4 +--- | ||
sound/soc/sunxi/sun50iw9-codec.c | 4 +--- | ||
sound/soc/sunxi_v2/snd_sunxi_ahub.c | 4 +--- | ||
sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | 4 +--- | ||
sound/soc/sunxi_v2/snd_sunxi_mach.c | 4 ++-- | ||
11 files changed, 13 insertions(+), 31 deletions(-) | ||
|
||
diff --git a/drivers/char/dump_reg/dump_reg.c b/drivers/char/dump_reg/dump_reg.c | ||
index a839666c50a5..f5d64c4af036 100644 | ||
|
@@ -64,6 +72,177 @@ index f4f2dcecbb48..c8a50c8dbac6 100644 | |
} | ||
|
||
static struct platform_driver addr_mgt_driver = { | ||
diff --git a/drivers/net/phy/sunxi-ephy.c b/drivers/net/phy/sunxi-ephy.c | ||
index 92f5ba101ced..44eb2790ea62 100644 | ||
--- a/drivers/net/phy/sunxi-ephy.c | ||
+++ b/drivers/net/phy/sunxi-ephy.c | ||
@@ -431,11 +431,9 @@ static int ac200_ephy_probe(struct platform_device *pdev) | ||
return 0; | ||
} | ||
|
||
-static int ac200_ephy_remove(struct platform_device *pdev) | ||
+static void ac200_ephy_remove(struct platform_device *pdev) | ||
{ | ||
ac200_ephy_disable(&ac200_ephy); | ||
- | ||
- return 0; | ||
} | ||
|
||
static int ac200_ephy_suspend(struct device *dev) | ||
diff --git a/drivers/phy/allwinner/ac200-ephy-ctl.c b/drivers/phy/allwinner/ac200-ephy-ctl.c | ||
index 8efeaf18e42c..f721ea72223c 100644 | ||
--- a/drivers/phy/allwinner/ac200-ephy-ctl.c | ||
+++ b/drivers/phy/allwinner/ac200-ephy-ctl.c | ||
@@ -271,13 +271,11 @@ static int ac200_ephy_ctl_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int ac200_ephy_ctl_remove(struct platform_device *pdev) | ||
+static void ac200_ephy_ctl_remove(struct platform_device *pdev) | ||
{ | ||
struct ac200_ephy_ctl_dev *priv = platform_get_drvdata(pdev); | ||
|
||
ac200_ephy_ctl_disable(priv); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id ac200_ephy_ctl_match[] = { | ||
diff --git a/drivers/pwm/pwm-sunxi-enhance.c b/drivers/pwm/pwm-sunxi-enhance.c | ||
index 1216cae54856..6604c447b3b0 100644 | ||
--- a/drivers/pwm/pwm-sunxi-enhance.c | ||
+++ b/drivers/pwm/pwm-sunxi-enhance.c | ||
@@ -1000,7 +1000,7 @@ static int sunxi_pwm_probe(struct platform_device *pdev) | ||
/* force to one pwm if read property fail */ | ||
npwm = 1; | ||
} | ||
- | ||
+ | ||
chip = devm_pwmchip_alloc(&pdev->dev, npwm, sizeof(*pwm)); | ||
if (IS_ERR(chip)) { | ||
return PTR_ERR(chip); | ||
@@ -1114,7 +1114,7 @@ static int sunxi_pwm_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int sunxi_pwm_remove(struct platform_device *pdev) | ||
+static void sunxi_pwm_remove(struct platform_device *pdev) | ||
{ | ||
struct pwm_chip *chip = platform_get_drvdata(pdev); | ||
struct sunxi_pwm_chip *pwm = to_sunxi_pwm_chip(chip); | ||
@@ -1122,8 +1122,6 @@ static int sunxi_pwm_remove(struct platform_device *pdev) | ||
clk_disable(pwm->bus_clk); | ||
reset_control_assert(pwm->pwm_rst_clk); | ||
pwmchip_remove(chip); | ||
- | ||
- return 0; | ||
} | ||
|
||
static int sunxi_pwm_suspend(struct platform_device *pdev, pm_message_t state) | ||
diff --git a/sound/soc/codecs/ac200.c b/sound/soc/codecs/ac200.c | ||
index 113a45408116..662de230dc83 100644 | ||
--- a/sound/soc/codecs/ac200.c | ||
+++ b/sound/soc/codecs/ac200.c | ||
@@ -743,14 +743,12 @@ static int ac200_codec_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int ac200_codec_remove(struct platform_device *pdev) | ||
+static void ac200_codec_remove(struct platform_device *pdev) | ||
{ | ||
struct ac200_codec *priv = dev_get_drvdata(&pdev->dev); | ||
|
||
regmap_write(priv->regmap, AC200_SYS_AUDIO_CTL0, 0); | ||
regmap_write(priv->regmap, AC200_SYS_AUDIO_CTL1, 0); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id ac200_codec_match[] = { | ||
diff --git a/sound/soc/sunxi/sun50iw9-codec.c b/sound/soc/sunxi/sun50iw9-codec.c | ||
index 38b1d3824c20..a9dfc1a031e4 100644 | ||
--- a/sound/soc/sunxi/sun50iw9-codec.c | ||
+++ b/sound/soc/sunxi/sun50iw9-codec.c | ||
@@ -1061,7 +1061,7 @@ static int sun50i_h616_codec_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int sun50i_h616_codec_remove(struct platform_device *pdev) | ||
+static void sun50i_h616_codec_remove(struct platform_device *pdev) | ||
{ | ||
struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
struct sun50i_h616_codec *scodec = snd_soc_card_get_drvdata(card); | ||
@@ -1070,8 +1070,6 @@ static int sun50i_h616_codec_remove(struct platform_device *pdev) | ||
if (scodec->rst) | ||
reset_control_assert(scodec->rst); | ||
clk_disable_unprepare(scodec->clk_apb); | ||
- | ||
- return 0; | ||
} | ||
|
||
static struct platform_driver sun50i_h616_codec_driver = { | ||
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub.c b/sound/soc/sunxi_v2/snd_sunxi_ahub.c | ||
index 8a1065e9183e..6d4a847a928f 100644 | ||
--- a/sound/soc/sunxi_v2/snd_sunxi_ahub.c | ||
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub.c | ||
@@ -1408,7 +1408,7 @@ static int sunxi_ahub_dev_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int sunxi_ahub_dev_remove(struct platform_device *pdev) | ||
+static void sunxi_ahub_dev_remove(struct platform_device *pdev) | ||
{ | ||
struct sunxi_ahub_info *ahub_info = dev_get_drvdata(&pdev->dev); | ||
struct sunxi_ahub_pinctl_info *pin_info = &ahub_info->pin_info; | ||
@@ -1431,8 +1431,6 @@ static int sunxi_ahub_dev_remove(struct platform_device *pdev) | ||
devm_kfree(&pdev->dev, ahub_info); | ||
|
||
SND_LOG_DEBUG(HLOG, "unregister ahub platform success\n"); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id sunxi_ahub_of_match[] = { | ||
diff --git a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | ||
index 1fcc8aefd50c..f3c7bb3c7cd2 100644 | ||
--- a/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | ||
+++ b/sound/soc/sunxi_v2/snd_sunxi_ahub_dam.c | ||
@@ -464,7 +464,7 @@ static int sunxi_ahub_dam_dev_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int sunxi_ahub_dam_dev_remove(struct platform_device *pdev) | ||
+static void sunxi_ahub_dam_dev_remove(struct platform_device *pdev) | ||
{ | ||
struct sunxi_ahub_mem_info *mem_info = &g_mem_info; | ||
struct sunxi_ahub_clk_info *clk_info = &g_clk_info; | ||
@@ -488,8 +488,6 @@ static int sunxi_ahub_dam_dev_remove(struct platform_device *pdev) | ||
reset_control_assert(clk_info->clk_rst); | ||
|
||
SND_LOG_DEBUG(HLOG, "unregister ahub_dam platform success\n"); | ||
- | ||
- return 0; | ||
} | ||
|
||
static const struct of_device_id sunxi_ahub_dam_of_match[] = { | ||
diff --git a/sound/soc/sunxi_v2/snd_sunxi_mach.c b/sound/soc/sunxi_v2/snd_sunxi_mach.c | ||
index 27449ad6b843..ea73eced251e 100644 | ||
--- a/sound/soc/sunxi_v2/snd_sunxi_mach.c | ||
+++ b/sound/soc/sunxi_v2/snd_sunxi_mach.c | ||
@@ -430,11 +430,11 @@ static int asoc_simple_probe(struct platform_device *pdev) | ||
return ret; | ||
} | ||
|
||
-static int asoc_simple_remove(struct platform_device *pdev) | ||
+static void asoc_simple_remove(struct platform_device *pdev) | ||
{ | ||
struct snd_soc_card *card = platform_get_drvdata(pdev); | ||
|
||
- return asoc_simple_clean_reference(card); | ||
+ asoc_simple_clean_reference(card); | ||
} | ||
|
||
static const struct of_device_id snd_soc_sunxi_of_match[] = { | ||
-- | ||
2.35.3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters