aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 20:33:30 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commite7bfda2c243e66a75ff966ba04c28b1590b5d24c (patch)
tree069959b7e6a8cf31b0feb2857a63c7c4c0e3dcbf /target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch
parent8fe5ad5d3373cebed4fbc55a7b779721971ce427 (diff)
downloadupstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.gz
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.tar.bz2
upstream-e7bfda2c243e66a75ff966ba04c28b1590b5d24c.zip
brcm63xx: rename target to bcm63xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
Diffstat (limited to 'target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch')
-rw-r--r--target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch b/target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch
new file mode 100644
index 0000000000..cab9e5a37a
--- /dev/null
+++ b/target/linux/bcm63xx/patches-4.14/001-4.16-04-bcm63xx_enet-use-platform-device-id-directly-for-mii.patch
@@ -0,0 +1,46 @@
+From faea89cd893a1a7af81185f026a64dad603ef72f Mon Sep 17 00:00:00 2001
+From: Jonas Gorski <jonas.gorski@gmail.com>
+Date: Sun, 17 Dec 2017 12:58:12 +0100
+Subject: [PATCH 4/4] bcm63xx_enet: use platform device id directly for miibus
+ name
+
+Directly use the platform device for generating the miibus name. This removes
+the last user of bcm_enet_priv::mac_id and we can remove the field.
+
+Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
+---
+ drivers/net/ethernet/broadcom/bcm63xx_enet.c | 3 +--
+ drivers/net/ethernet/broadcom/bcm63xx_enet.h | 3 ---
+ 2 files changed, 1 insertion(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+@@ -1754,7 +1754,6 @@ static int bcm_enet_probe(struct platfor
+ dev->irq = priv->irq = res_irq->start;
+ priv->irq_rx = res_irq_rx->start;
+ priv->irq_tx = res_irq_tx->start;
+- priv->mac_id = pdev->id;
+
+ priv->mac_clk = devm_clk_get(&pdev->dev, "enet");
+ if (IS_ERR(priv->mac_clk)) {
+@@ -1822,7 +1821,7 @@ static int bcm_enet_probe(struct platfor
+ bus->priv = priv;
+ bus->read = bcm_enet_mdio_read_phylib;
+ bus->write = bcm_enet_mdio_write_phylib;
+- sprintf(bus->id, "%s-%d", pdev->name, priv->mac_id);
++ sprintf(bus->id, "%s-%d", pdev->name, pdev->id);
+
+ /* only probe bus where we think the PHY is, because
+ * the mdio read operation return 0 instead of 0xffff
+--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.h
++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.h
+@@ -193,9 +193,6 @@ struct bcm_enet_mib_counters {
+
+ struct bcm_enet_priv {
+
+- /* mac id (from platform device id) */
+- int mac_id;
+-
+ /* base remapped address of device */
+ void __iomem *base;
+