mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
core/linux-armv7 to 4.6.0-1
This commit is contained in:
parent
4d7b6519a1
commit
e7714f1941
12 changed files with 298 additions and 514 deletions
|
@ -1,7 +1,7 @@
|
|||
From dd57cddf4b28cbccf358e7d6995d262c3e47eecb Mon Sep 17 00:00:00 2001
|
||||
From dccadc9e5eb4dc16815e27c286c16d235e4ff8e8 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@xxxxxx>
|
||||
Date: Sun, 2 Dec 2012 19:59:28 +0100
|
||||
Subject: [PATCH 01/10] ARM: atags: add support for Marvell's u-boot
|
||||
Subject: [PATCH 1/8] ARM: atags: add support for Marvell's u-boot
|
||||
|
||||
Marvell uses a specific atag in its u-boot which includes among other
|
||||
information the MAC addresses for up to 4 network interfaces.
|
||||
|
@ -47,5 +47,5 @@ index 979ff40..d1d0c19 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
From 0f33dd3cbffb1f8cf75c8955ad0ce0ad747d6964 Mon Sep 17 00:00:00 2001
|
||||
From 2fe6588b6ca5cb817c78ee0b44ca9b2a6f6bdeb1 Mon Sep 17 00:00:00 2001
|
||||
From: Willy Tarreau <w@xxxxxx>
|
||||
Date: Sun, 2 Dec 2012 19:56:58 +0100
|
||||
Subject: [PATCH 02/10] ARM: atags/fdt: retrieve MAC addresses from Marvell
|
||||
boot loader
|
||||
Subject: [PATCH 2/8] ARM: atags/fdt: retrieve MAC addresses from Marvell boot
|
||||
loader
|
||||
|
||||
The atags are parsed and if a Marvell atag is found, up to 4 MAC
|
||||
addresses are extracted there and assigned to node aliases eth0..3
|
||||
|
@ -43,5 +43,5 @@ index 9448aa0..ac7b6ae 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 2177f601828cab3482f837a6d34f187629b13743 Mon Sep 17 00:00:00 2001
|
||||
From 66047514f80a831be0461566faffa79113151783 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Fri, 5 Sep 2014 15:41:19 -0600
|
||||
Subject: [PATCH 03/10] SMILE Plug device tree file
|
||||
Subject: [PATCH 3/8] SMILE Plug device tree file
|
||||
|
||||
This adds a dts file for the SMILE Plug, which only differs from the Mirabox
|
||||
dts with the LED definitions.
|
||||
|
@ -14,10 +14,10 @@ Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
|||
create mode 100644 arch/arm/boot/dts/armada-370-smileplug.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index a4a6d70..c710c30 100644
|
||||
index 95c1923..38c06e4 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -767,6 +767,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \
|
||||
@@ -793,6 +793,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \
|
||||
armada-370-db.dtb \
|
||||
armada-370-dlink-dns327l.dtb \
|
||||
armada-370-mirabox.dtb \
|
||||
|
@ -205,5 +205,5 @@ index 0000000..d01308a
|
|||
+ };
|
||||
+};
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From ee60ccbad5446a51d434b39d2e7582a9a88ad8e7 Mon Sep 17 00:00:00 2001
|
||||
From 57abb5f14c98e72b246083465441ce75086304e0 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Fri, 5 Sep 2014 15:43:56 -0600
|
||||
Subject: [PATCH 04/10] fix mvsdio eMMC timing
|
||||
Subject: [PATCH 4/8] fix mvsdio eMMC timing
|
||||
|
||||
These changes from Globalscale change the MMC timing to allow the eMMC versions
|
||||
of the Mirabox and SMILE Plug to work.
|
||||
|
@ -34,5 +34,5 @@ index 42296e5..e5ce6d2 100644
|
|||
host->clock = ios->clock;
|
||||
host->ns_per_clk = 1000000000 / (host->base_clock / (m+1));
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
From 75f7a861ec5a0f19d2724be0327914b658aec00c Mon Sep 17 00:00:00 2001
|
||||
From 573ed812140e4319d2333206679e55a2f03ae632 Mon Sep 17 00:00:00 2001
|
||||
From: popcornmix <popcornmix@gmail.com>
|
||||
Date: Tue, 18 Feb 2014 01:43:50 -0300
|
||||
Subject: [PATCH 05/10] net/smsc95xx: Allow mac address to be set as a
|
||||
parameter
|
||||
Subject: [PATCH 5/8] net/smsc95xx: Allow mac address to be set as a parameter
|
||||
|
||||
---
|
||||
drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 56 insertions(+)
|
||||
|
||||
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
|
||||
index 66b3ab9..3cc50f6 100644
|
||||
index 2edc2bc..2445b56 100644
|
||||
--- a/drivers/net/usb/smsc95xx.c
|
||||
+++ b/drivers/net/usb/smsc95xx.c
|
||||
@@ -59,6 +59,7 @@
|
||||
@@ -60,6 +60,7 @@
|
||||
#define SUSPEND_SUSPEND3 (0x08)
|
||||
#define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \
|
||||
SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3)
|
||||
|
@ -20,7 +19,7 @@ index 66b3ab9..3cc50f6 100644
|
|||
|
||||
struct smsc95xx_priv {
|
||||
u32 mac_cr;
|
||||
@@ -74,6 +75,10 @@ static bool turbo_mode = true;
|
||||
@@ -75,6 +76,10 @@ static bool turbo_mode = true;
|
||||
module_param(turbo_mode, bool, 0644);
|
||||
MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction");
|
||||
|
||||
|
@ -31,7 +30,7 @@ index 66b3ab9..3cc50f6 100644
|
|||
static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index,
|
||||
u32 *data, int in_pm)
|
||||
{
|
||||
@@ -763,8 +768,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
|
||||
@@ -764,8 +769,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd)
|
||||
return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL);
|
||||
}
|
||||
|
||||
|
@ -88,9 +87,9 @@ index 66b3ab9..3cc50f6 100644
|
|||
+ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr))
|
||||
+ return;
|
||||
+
|
||||
/* try reading mac address from EEPROM */
|
||||
if (smsc95xx_read_eeprom(dev, EEPROM_MAC_OFFSET, ETH_ALEN,
|
||||
dev->net->dev_addr) == 0) {
|
||||
const u8 *mac_addr;
|
||||
|
||||
/* maybe the boot loader passed the MAC address in devicetree */
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 35c16823a040eae8f0c1bbb3f3812c11efe898f8 Mon Sep 17 00:00:00 2001
|
||||
From c211758069c908d9d76c31f16cccaf521c42e5f0 Mon Sep 17 00:00:00 2001
|
||||
From: dobatog <dobatog@gmail.com>
|
||||
Date: Thu, 26 Feb 2015 12:32:27 +0100
|
||||
Subject: [PATCH 06/10] ARM: TLV320AIC23 SoC Audio Codec: Fix errors reported
|
||||
Subject: [PATCH 6/8] ARM: TLV320AIC23 SoC Audio Codec: Fix errors reported
|
||||
related to input routing signals.
|
||||
|
||||
The following patch, based on stable v3.19, corrects the errors that are reported in the boot trace in reference to the Input Signals of the audio codec TLV320AIC23:
|
||||
|
@ -45,5 +45,5 @@ index cd8c02b..95e6b11 100644
|
|||
/* input mux */
|
||||
{"Capture Source", "Line", "Line Input"},
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From c10150c254d704496c2a832434069cc47dbbe7cc Mon Sep 17 00:00:00 2001
|
||||
From b5e99f293a21f1d27222c9e262831588e206bfc5 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sat, 14 Feb 2015 12:32:27 +0100
|
||||
Subject: [PATCH 07/10] set default cubietruck led triggers
|
||||
Subject: [PATCH 7/8] set default cubietruck led triggers
|
||||
|
||||
Signed-off-by: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
---
|
||||
|
@ -29,5 +29,5 @@ index 8da939a..9957d5f 100644
|
|||
};
|
||||
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 07ccea6eaa471307f5f7513862b47c040178a40a Mon Sep 17 00:00:00 2001
|
||||
From 4709ed524ab21c1578e96f837c77ce23bb25c108 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Sat, 7 Feb 2015 12:32:27 +0100
|
||||
Subject: [PATCH 08/10] USB armory support
|
||||
Subject: [PATCH 8/8] USB armory support
|
||||
|
||||
---
|
||||
arch/arm/boot/dts/Makefile | 5 +
|
||||
|
@ -20,10 +20,10 @@ Subject: [PATCH 08/10] USB armory support
|
|||
create mode 100644 arch/arm/boot/dts/imx53-usbarmory.dts
|
||||
|
||||
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
|
||||
index c710c30..e9a95ef 100644
|
||||
index 38c06e4..ce5c9de 100644
|
||||
--- a/arch/arm/boot/dts/Makefile
|
||||
+++ b/arch/arm/boot/dts/Makefile
|
||||
@@ -287,6 +287,11 @@ dtb-$(CONFIG_SOC_IMX53) += \
|
||||
@@ -295,6 +295,11 @@ dtb-$(CONFIG_SOC_IMX53) += \
|
||||
imx53-smd.dtb \
|
||||
imx53-tx53-x03x.dtb \
|
||||
imx53-tx53-x13x.dtb \
|
||||
|
@ -452,5 +452,5 @@ index 0000000..902a73b
|
|||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
2.7.3
|
||||
2.8.2
|
||||
|
||||
|
|
|
@ -1,87 +0,0 @@
|
|||
From 026b3cec564af35100ec9c3bdd7ce949768575b8 Mon Sep 17 00:00:00 2001
|
||||
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||
Date: Wed, 16 Mar 2016 07:39:26 -0600
|
||||
Subject: [PATCH 09/10] Revert "stmmac: Fix 'eth0: No PHY found' regression"
|
||||
|
||||
This reverts commit 88f8b1bb41c6208f81b6a480244533ded7b59493.
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 11 ++++++++++-
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 9 +--------
|
||||
include/linux/stmmac.h | 1 -
|
||||
3 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
index efb54f3..0faf163 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
@@ -199,12 +199,21 @@ int stmmac_mdio_register(struct net_device *ndev)
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
|
||||
int addr, found;
|
||||
- struct device_node *mdio_node = priv->plat->mdio_node;
|
||||
+ struct device_node *mdio_node = NULL;
|
||||
+ struct device_node *child_node = NULL;
|
||||
|
||||
if (!mdio_bus_data)
|
||||
return 0;
|
||||
|
||||
if (IS_ENABLED(CONFIG_OF)) {
|
||||
+ for_each_child_of_node(priv->device->of_node, child_node) {
|
||||
+ if (of_device_is_compatible(child_node,
|
||||
+ "snps,dwmac-mdio")) {
|
||||
+ mdio_node = child_node;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (mdio_node) {
|
||||
netdev_dbg(ndev, "FOUND MDIO subnode\n");
|
||||
} else {
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
index 4514ba7..6a52fa1 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
@@ -110,7 +110,6 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
|
||||
struct device_node *np = pdev->dev.of_node;
|
||||
struct plat_stmmacenet_data *plat;
|
||||
struct stmmac_dma_cfg *dma_cfg;
|
||||
- struct device_node *child_node = NULL;
|
||||
|
||||
plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
|
||||
if (!plat)
|
||||
@@ -141,19 +140,13 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
|
||||
plat->phy_node = of_node_get(np);
|
||||
}
|
||||
|
||||
- for_each_child_of_node(np, child_node)
|
||||
- if (of_device_is_compatible(child_node, "snps,dwmac-mdio")) {
|
||||
- plat->mdio_node = child_node;
|
||||
- break;
|
||||
- }
|
||||
-
|
||||
/* "snps,phy-addr" is not a standard property. Mark it as deprecated
|
||||
* and warn of its use. Remove this when phy node support is added.
|
||||
*/
|
||||
if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
|
||||
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
|
||||
|
||||
- if ((plat->phy_node && !of_phy_is_fixed_link(np)) || !plat->mdio_node)
|
||||
+ if ((plat->phy_node && !of_phy_is_fixed_link(np)) || plat->phy_bus_name)
|
||||
plat->mdio_bus_data = NULL;
|
||||
else
|
||||
plat->mdio_bus_data =
|
||||
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
|
||||
index 881a79d..eead8ab 100644
|
||||
--- a/include/linux/stmmac.h
|
||||
+++ b/include/linux/stmmac.h
|
||||
@@ -100,7 +100,6 @@ struct plat_stmmacenet_data {
|
||||
int interface;
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data;
|
||||
struct device_node *phy_node;
|
||||
- struct device_node *mdio_node;
|
||||
struct stmmac_dma_cfg *dma_cfg;
|
||||
int clk_csr;
|
||||
int has_gmac;
|
||||
--
|
||||
2.7.3
|
||||
|
|
@ -1,235 +0,0 @@
|
|||
From be3687ac6bf12bd89059742faac2fb40ec8af419 Mon Sep 17 00:00:00 2001
|
||||
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
|
||||
Date: Wed, 16 Mar 2016 10:38:49 +0100
|
||||
Subject: [PATCH 10/10] stmmac: fix MDIO settings
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Initially the phy_bus_name was added to manipulate the
|
||||
driver name but it was recently just used to manage the
|
||||
fixed-link and then to take some decision at run-time.
|
||||
So the patch uses the is_pseudo_fixed_link and removes
|
||||
the phy_bus_name variable not necessary anymore.
|
||||
|
||||
The driver can manage the mdio registration by using phy-handle,
|
||||
dwmac-mdio and own parameter e.g. snps,phy-addr.
|
||||
This patch takes care about all these possible configurations
|
||||
and fixes the mdio registration in case of there is a real
|
||||
transceiver or a switch (that needs to be managed by using
|
||||
fixed-link).
|
||||
|
||||
Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
|
||||
Reviewed-by: Andreas Färber <afaerber@suse.de>
|
||||
Tested-by: Frank Schäfer <fschaefer.oss@googlemail.com>
|
||||
Cc: Gabriel Fernandez <gabriel.fernandez@linaro.org>
|
||||
Cc: Dinh Nguyen <dinh.linux@gmail.com>
|
||||
Cc: David S. Miller <davem@davemloft.net>
|
||||
Cc: Phil Reid <preid@electromag.com.au>
|
||||
---
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 11 +--
|
||||
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 19 +----
|
||||
.../net/ethernet/stmicro/stmmac/stmmac_platform.c | 84 +++++++++++++++++-----
|
||||
include/linux/stmmac.h | 2 +-
|
||||
4 files changed, 71 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
index c21015b..389d7d0 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
||||
@@ -271,7 +271,6 @@ static void stmmac_eee_ctrl_timer(unsigned long arg)
|
||||
*/
|
||||
bool stmmac_eee_init(struct stmmac_priv *priv)
|
||||
{
|
||||
- char *phy_bus_name = priv->plat->phy_bus_name;
|
||||
unsigned long flags;
|
||||
bool ret = false;
|
||||
|
||||
@@ -283,7 +282,7 @@ bool stmmac_eee_init(struct stmmac_priv *priv)
|
||||
goto out;
|
||||
|
||||
/* Never init EEE in case of a switch is attached */
|
||||
- if (phy_bus_name && (!strcmp(phy_bus_name, "fixed")))
|
||||
+ if (priv->phydev->is_pseudo_fixed_link)
|
||||
goto out;
|
||||
|
||||
/* MAC core supports the EEE feature. */
|
||||
@@ -820,12 +819,8 @@ static int stmmac_init_phy(struct net_device *dev)
|
||||
phydev = of_phy_connect(dev, priv->plat->phy_node,
|
||||
&stmmac_adjust_link, 0, interface);
|
||||
} else {
|
||||
- if (priv->plat->phy_bus_name)
|
||||
- snprintf(bus_id, MII_BUS_ID_SIZE, "%s-%x",
|
||||
- priv->plat->phy_bus_name, priv->plat->bus_id);
|
||||
- else
|
||||
- snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x",
|
||||
- priv->plat->bus_id);
|
||||
+ snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x",
|
||||
+ priv->plat->bus_id);
|
||||
|
||||
snprintf(phy_id_fmt, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id,
|
||||
priv->plat->phy_addr);
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
index 0faf163..3f5512f 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
|
||||
@@ -198,29 +198,12 @@ int stmmac_mdio_register(struct net_device *ndev)
|
||||
struct mii_bus *new_bus;
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data;
|
||||
+ struct device_node *mdio_node = priv->plat->mdio_node;
|
||||
int addr, found;
|
||||
- struct device_node *mdio_node = NULL;
|
||||
- struct device_node *child_node = NULL;
|
||||
|
||||
if (!mdio_bus_data)
|
||||
return 0;
|
||||
|
||||
- if (IS_ENABLED(CONFIG_OF)) {
|
||||
- for_each_child_of_node(priv->device->of_node, child_node) {
|
||||
- if (of_device_is_compatible(child_node,
|
||||
- "snps,dwmac-mdio")) {
|
||||
- mdio_node = child_node;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (mdio_node) {
|
||||
- netdev_dbg(ndev, "FOUND MDIO subnode\n");
|
||||
- } else {
|
||||
- netdev_warn(ndev, "No MDIO subnode found\n");
|
||||
- }
|
||||
- }
|
||||
-
|
||||
new_bus = mdiobus_alloc();
|
||||
if (new_bus == NULL)
|
||||
return -ENOMEM;
|
||||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
index 6a52fa1..190fb6d 100644
|
||||
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
|
||||
@@ -96,6 +96,69 @@ static int dwmac1000_validate_ucast_entries(int ucast_entries)
|
||||
}
|
||||
|
||||
/**
|
||||
+ * stmmac_dt_phy - parse device-tree driver parameters to allocate PHY resources
|
||||
+ * @plat: driver data platform structure
|
||||
+ * @np: device tree node
|
||||
+ * @dev: device pointer
|
||||
+ * Description:
|
||||
+ * The mdio bus will be allocated in case of a phy transceiver is on board;
|
||||
+ * it will be NULL if the fixed-link is configured.
|
||||
+ * If there is the "snps,dwmac-mdio" sub-node the mdio will be allocated
|
||||
+ * in any case (for DSA, mdio must be registered even if fixed-link).
|
||||
+ * The table below sums the supported configurations:
|
||||
+ * -------------------------------
|
||||
+ * snps,phy-addr | Y
|
||||
+ * -------------------------------
|
||||
+ * phy-handle | Y
|
||||
+ * -------------------------------
|
||||
+ * fixed-link | N
|
||||
+ * -------------------------------
|
||||
+ * snps,dwmac-mdio |
|
||||
+ * even if | Y
|
||||
+ * fixed-link |
|
||||
+ * -------------------------------
|
||||
+ *
|
||||
+ * It returns 0 in case of success otherwise -ENODEV.
|
||||
+ */
|
||||
+static int stmmac_dt_phy(struct plat_stmmacenet_data *plat,
|
||||
+ struct device_node *np, struct device *dev)
|
||||
+{
|
||||
+ bool mdio = true;
|
||||
+
|
||||
+ /* If phy-handle property is passed from DT, use it as the PHY */
|
||||
+ plat->phy_node = of_parse_phandle(np, "phy-handle", 0);
|
||||
+ if (plat->phy_node)
|
||||
+ dev_dbg(dev, "Found phy-handle subnode\n");
|
||||
+
|
||||
+ /* If phy-handle is not specified, check if we have a fixed-phy */
|
||||
+ if (!plat->phy_node && of_phy_is_fixed_link(np)) {
|
||||
+ if ((of_phy_register_fixed_link(np) < 0))
|
||||
+ return -ENODEV;
|
||||
+
|
||||
+ dev_dbg(dev, "Found fixed-link subnode\n");
|
||||
+ plat->phy_node = of_node_get(np);
|
||||
+ mdio = false;
|
||||
+ }
|
||||
+
|
||||
+ /* If snps,dwmac-mdio is passed from DT, always register the MDIO */
|
||||
+ for_each_child_of_node(np, plat->mdio_node) {
|
||||
+ if (of_device_is_compatible(plat->mdio_node, "snps,dwmac-mdio"))
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if (plat->mdio_node) {
|
||||
+ dev_dbg(dev, "Found MDIO subnode\n");
|
||||
+ mdio = true;
|
||||
+ }
|
||||
+
|
||||
+ if (mdio)
|
||||
+ plat->mdio_bus_data =
|
||||
+ devm_kzalloc(dev, sizeof(struct stmmac_mdio_bus_data),
|
||||
+ GFP_KERNEL);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* stmmac_probe_config_dt - parse device-tree driver parameters
|
||||
* @pdev: platform_device structure
|
||||
* @plat: driver data platform structure
|
||||
@@ -129,30 +192,15 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
|
||||
/* Default to phy auto-detection */
|
||||
plat->phy_addr = -1;
|
||||
|
||||
- /* If we find a phy-handle property, use it as the PHY */
|
||||
- plat->phy_node = of_parse_phandle(np, "phy-handle", 0);
|
||||
-
|
||||
- /* If phy-handle is not specified, check if we have a fixed-phy */
|
||||
- if (!plat->phy_node && of_phy_is_fixed_link(np)) {
|
||||
- if ((of_phy_register_fixed_link(np) < 0))
|
||||
- return ERR_PTR(-ENODEV);
|
||||
-
|
||||
- plat->phy_node = of_node_get(np);
|
||||
- }
|
||||
-
|
||||
/* "snps,phy-addr" is not a standard property. Mark it as deprecated
|
||||
* and warn of its use. Remove this when phy node support is added.
|
||||
*/
|
||||
if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
|
||||
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
|
||||
|
||||
- if ((plat->phy_node && !of_phy_is_fixed_link(np)) || plat->phy_bus_name)
|
||||
- plat->mdio_bus_data = NULL;
|
||||
- else
|
||||
- plat->mdio_bus_data =
|
||||
- devm_kzalloc(&pdev->dev,
|
||||
- sizeof(struct stmmac_mdio_bus_data),
|
||||
- GFP_KERNEL);
|
||||
+ /* To Configure PHY by using all device-tree supported properties */
|
||||
+ if (stmmac_dt_phy(plat, np, &pdev->dev))
|
||||
+ return ERR_PTR(-ENODEV);
|
||||
|
||||
of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size);
|
||||
|
||||
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
|
||||
index eead8ab..8b1ff2b 100644
|
||||
--- a/include/linux/stmmac.h
|
||||
+++ b/include/linux/stmmac.h
|
||||
@@ -94,12 +94,12 @@ struct stmmac_dma_cfg {
|
||||
};
|
||||
|
||||
struct plat_stmmacenet_data {
|
||||
- char *phy_bus_name;
|
||||
int bus_id;
|
||||
int phy_addr;
|
||||
int interface;
|
||||
struct stmmac_mdio_bus_data *mdio_bus_data;
|
||||
struct device_node *phy_node;
|
||||
+ struct device_node *mdio_node;
|
||||
struct stmmac_dma_cfg *dma_cfg;
|
||||
int clk_csr;
|
||||
int has_gmac;
|
||||
--
|
||||
2.7.3
|
||||
|
|
@ -4,10 +4,10 @@
|
|||
buildarch=4
|
||||
|
||||
pkgbase=linux-armv7
|
||||
_srcname=linux-4.5
|
||||
_srcname=linux-4.6
|
||||
_kernelname=${pkgbase#linux}
|
||||
_desc="ARMv7 multi-platform"
|
||||
pkgver=4.5.4
|
||||
pkgver=4.6.0
|
||||
pkgrel=1
|
||||
rcnrel=armv7-x2
|
||||
arch=('armv7h')
|
||||
|
@ -16,7 +16,7 @@ license=('GPL2')
|
|||
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc' 'git' 'uboot-tools' 'vboot-utils' 'dtc')
|
||||
options=('!strip')
|
||||
source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
||||
"http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||
#"http://www.kernel.org/pub/linux/kernel/v4.x/patch-${pkgver}.xz"
|
||||
"http://rcn-ee.com/deb/sid-armhf/v${pkgver}-${rcnrel}/patch-${pkgver%.0}-${rcnrel}.diff.gz"
|
||||
'0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch'
|
||||
'0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch'
|
||||
|
@ -26,27 +26,22 @@ source=("http://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
|||
'0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch'
|
||||
'0007-set-default-cubietruck-led-triggers.patch'
|
||||
'0008-USB-armory-support.patch'
|
||||
'0009-Revert-stmmac-Fix-eth0-No-PHY-found-regression.patch'
|
||||
'0010-stmmac-fix-MDIO-settings.patch'
|
||||
'config'
|
||||
'cmdline'
|
||||
'kernel.its'
|
||||
'kernel.keyblock'
|
||||
'kernel_data_key.vbprivk')
|
||||
md5sums=('a60d48eee08ec0536d5efb17ca819aef'
|
||||
'137460a1e32335e2eedc61fcfc2643fa'
|
||||
'0018cb724884c720b95339ec13e5d1c6'
|
||||
'2382c661e820edbf4cba5a39e19d0bd5'
|
||||
'b38e6003768a6cf9d46f1a5f9e47925c'
|
||||
'99a159bd9b2ea2dcfd338b29a8551043'
|
||||
'525fb306ab827296e402efc67d8ed435'
|
||||
'79cbb7fc66b1e0da6e28fb41bc596712'
|
||||
'6132290c2ef75d20278299c05f138fa2'
|
||||
'5859ce0b9f17671aabf606e346359377'
|
||||
'ef109fafa606732d8993a3fdb538c3df'
|
||||
'a9b7d60e76b8d8b426c27d15c5b21466'
|
||||
'3a6fd8d0de5d8e396c2a7d68873cd627'
|
||||
'c2164745c065d535f0899bf2ab06ffc2'
|
||||
md5sums=('d2927020e24a76da4ab482a8bc3e9ef3'
|
||||
'a85c24fc75d62d8b81324130dbe9fba9'
|
||||
'1b4bb8c2a33606ede339e5661f0e7fb8'
|
||||
'8e2d392b751e5cf1862f1472d0d7a992'
|
||||
'56ce0f700dcee0584183452d15c96b58'
|
||||
'3a66481fa1aabbff1ed8a947d5aadc99'
|
||||
'4864a3dc1188c51d505034932adadf92'
|
||||
'2f7506cf70805d688a880e19e2f3e20a'
|
||||
'276e39a7d0ff9bac45607ef4d50e0ab9'
|
||||
'1c76d22a3281e9539222ee242da5a7fb'
|
||||
'f48cbc883a82a7b401845caf1eb15a44'
|
||||
'1813b39074d01af6548951764a0f6444'
|
||||
'4f2379ed84258050edb858ee8d281678'
|
||||
'61c5ff73c136ed07a7aadbf58db3d96a'
|
||||
|
@ -56,7 +51,7 @@ prepare() {
|
|||
cd "${srcdir}/${_srcname}"
|
||||
|
||||
# add upstream patch
|
||||
git apply --whitespace=nowarn ../patch-${pkgver}
|
||||
#git apply --whitespace=nowarn ../patch-${pkgver}
|
||||
|
||||
# RCN patch
|
||||
git apply ../patch-${pkgver%.0}-${rcnrel}.diff
|
||||
|
@ -70,8 +65,6 @@ prepare() {
|
|||
git apply ../0006-ARM-TLV320AIC23-SoC-Audio-Codec-Fix-errors-reported-.patch
|
||||
git apply ../0007-set-default-cubietruck-led-triggers.patch
|
||||
git apply ../0008-USB-armory-support.patch
|
||||
git apply ../0009-Revert-stmmac-Fix-eth0-No-PHY-found-regression.patch
|
||||
git apply ../0010-stmmac-fix-MDIO-settings.patch
|
||||
|
||||
cat "${srcdir}/config" > ./.config
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue