Skip to contentSkip to conversation

net/pch_gbe: updates for MIPS Boston board

PATCH RESEND Superseded Daniel Schwierzeck 4 participants 22 messages Apr 30, 2017 – Jun 2, 2017 Network drivers

lore
Share & tools
lore
#0 lore raw

v2 cover net/pch_gbe: updates for MIPS Boston board

This series is a resend of selected net/pch_gbe patches from the original patch series [1] which was blocked by other patch series. This series only contains the net/pch_gbe patches required for MIPS Boston board, but whose can be separately applied.

[1] https://lists.denx.de/pipermail/u-boot/2016-September/268137.html

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

Paul Burton (5):
net: pch_gbe: Reset during probe
net: pch_gbe: Fix rx descriptor buffer addresses
net: pch_gbe: CPU accessible addresses are virtual
net: pch_gbe: Add cache maintenance
net: pch_gbe: Support PHY reset GPIOs

 drivers/net/pch_gbe.c | 71 +++++++++++++++++++++++++++++++++++++++++----------
 drivers/net/pch_gbe.h |  1 +
 2 files changed, 58 insertions(+), 14 deletions(-)
Signature · 1 line
2.11.0
#1 lore raw

PATCH RESEND v2 1/5 net: pch_gbe: Reset during probe

From: Paul Burton <[email protected]>

Using the EG20T gigabit ethernet controller on the MIPS Boston board, we find that we have to reset the controller in order for the RGMII link to the PHY to become functional. Without doing so we constantly time out in pch_gbe_mdio_ready.

---

Changes in v2: None

 drivers/net/pch_gbe.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/net/pch_gbe.c +5 -0
index d40fff0e48..4aac0f67a0 100644
@@ -422,6 +422,7 @@ int pch_gbe_probe(struct udevice *dev)
 	struct pch_gbe_priv *priv;
 	struct eth_pdata *plat = dev_get_platdata(dev);
 	void *iobase;
+	int err;
 
 	/*
 	 * The priv structure contains the descriptors and frame buffers which
@@ -444,6 +445,10 @@ int pch_gbe_probe(struct udevice *dev)
 	pch_gbe_mdio_init(dev->name, priv->mac_regs);
 	priv->bus = miiphy_get_dev_by_name(dev->name);
 
+	err = pch_gbe_reset(dev);
+	if (err)
+		return err;
+
 	return pch_gbe_phy_init(dev);
 }
 
Signature · 1 line
2.11.0
#2 lore raw

PATCH RESEND v2 1/5 net: pch_gbe: Reset during probe

Quoted 12 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

Using the EG20T gigabit ethernet controller on the MIPS Boston board, we find that we have to reset the controller in order for the RGMII link to the PHY to become functional. Without doing so we constantly time out in pch_gbe_mdio_ready.

Quoted 6 lines

---

Changes in v2: None

 drivers/net/pch_gbe.c | 5 +++++
 1 file changed, 5 insertions(+)
#3 lore raw

PATCH RESEND v2 1/5 net: pch_gbe: Reset during probe

In reply to Daniel Schwierzeck
Quoted 11 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

Using the EG20T gigabit ethernet controller on the MIPS Boston board, we find that we have to reset the controller in order for the RGMII link to the PHY to become functional. Without doing so we constantly time out in pch_gbe_mdio_ready.

#5 lore raw

PATCH RESEND v2 2/5 net: pch_gbe: Fix rx descriptor buffer addresses

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

The loop to set up buffer addresses in rx descriptors always operated on descriptor 0, rather than on each descriptor sequentially. Fix this in order to setup correct buffer addresses for each descriptor.

---

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng

 drivers/net/pch_gbe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/pch_gbe.c +2 -2
index 4aac0f67a0..7d15616356 100644
@@ -117,8 +117,8 @@ static void pch_gbe_rx_descs_init(struct udevice *dev)
 
 	memset(rx_desc, 0, sizeof(struct pch_gbe_rx_desc) * PCH_GBE_DESC_NUM);
 	for (i = 0; i < PCH_GBE_DESC_NUM; i++)
-		rx_desc->buffer_addr = dm_pci_phys_to_mem(priv->dev,
-			(ulong)(priv->rx_buff[i]));
+		rx_desc[i].buffer_addr = dm_pci_phys_to_mem(priv->dev,
+			priv->rx_buff[i]);
 
 	writel(dm_pci_phys_to_mem(priv->dev, (ulong)rx_desc),
 	       &mac_regs->rx_dsc_base);
Signature · 1 line
2.11.0
#6 lore raw

PATCH RESEND v2 2/5 net: pch_gbe: Fix rx descriptor buffer addresses

Quoted 11 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

The loop to set up buffer addresses in rx descriptors always operated on descriptor 0, rather than on each descriptor sequentially. Fix this in order to setup correct buffer addresses for each descriptor.

Quoted 8 lines

---

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng

 drivers/net/pch_gbe.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Eek!

#7 lore raw

PATCH RESEND v2 2/5 net: pch_gbe: Fix rx descriptor buffer addresses

In reply to Daniel Schwierzeck
Quoted 10 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

The loop to set up buffer addresses in rx descriptors always operated on descriptor 0, rather than on each descriptor sequentially. Fix this in order to setup correct buffer addresses for each descriptor.

#9 lore raw

PATCH RESEND v2 3/5 net: pch_gbe: CPU accessible addresses are virtual

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

Use the virt_to_bus & bus_to_virt functions rather than phys_to_bus & bus_to_phys, since the addresses accessed by the CPU will be virtual rather than physical. On MIPS physical & virtual addresses differ as we use virtual addresses in kseg0, and attempting to use physical addresses directly caused problems as they're in the user segment which would be mapped via the uninitialised TLB.

---

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

 drivers/net/pch_gbe.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)
drivers/net/pch_gbe.c +13 -12
index 7d15616356..14323512b0 100644
@@ -117,15 +117,15 @@ static void pch_gbe_rx_descs_init(struct udevice *dev)
 
 	memset(rx_desc, 0, sizeof(struct pch_gbe_rx_desc) * PCH_GBE_DESC_NUM);
 	for (i = 0; i < PCH_GBE_DESC_NUM; i++)
-		rx_desc[i].buffer_addr = dm_pci_phys_to_mem(priv->dev,
+		rx_desc[i].buffer_addr = dm_pci_virt_to_mem(priv->dev,
 			priv->rx_buff[i]);
 
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)rx_desc),
+	writel(dm_pci_virt_to_mem(priv->dev, rx_desc),
 	       &mac_regs->rx_dsc_base);
 	writel(sizeof(struct pch_gbe_rx_desc) * (PCH_GBE_DESC_NUM - 1),
 	       &mac_regs->rx_dsc_size);
 
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)(rx_desc + 1)),
+	writel(dm_pci_virt_to_mem(priv->dev, rx_desc + 1),
 	       &mac_regs->rx_dsc_sw_p);
 }
 
@@ -137,11 +137,11 @@ static void pch_gbe_tx_descs_init(struct udevice *dev)
 
 	memset(tx_desc, 0, sizeof(struct pch_gbe_tx_desc) * PCH_GBE_DESC_NUM);
 
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)tx_desc),
+	writel(dm_pci_virt_to_mem(priv->dev, tx_desc),
 	       &mac_regs->tx_dsc_base);
 	writel(sizeof(struct pch_gbe_tx_desc) * (PCH_GBE_DESC_NUM - 1),
 	       &mac_regs->tx_dsc_size);
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)(tx_desc + 1)),
+	writel(dm_pci_virt_to_mem(priv->dev, tx_desc + 1),
 	       &mac_regs->tx_dsc_sw_p);
 }
 
@@ -251,7 +251,7 @@ static int pch_gbe_send(struct udevice *dev, void *packet, int length)
 	if (length < 64)
 		frame_ctrl |= PCH_GBE_TXD_CTRL_APAD;
 
-	tx_desc->buffer_addr = dm_pci_phys_to_mem(priv->dev, (ulong)packet);
+	tx_desc->buffer_addr = dm_pci_virt_to_mem(priv->dev, packet);
 	tx_desc->length = length;
 	tx_desc->tx_words_eob = length + 3;
 	tx_desc->tx_frame_ctrl = frame_ctrl;
@@ -262,7 +262,7 @@ static int pch_gbe_send(struct udevice *dev, void *packet, int length)
 	if (++priv->tx_idx >= PCH_GBE_DESC_NUM)
 		priv->tx_idx = 0;
 
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)(tx_head + priv->tx_idx)),
+	writel(dm_pci_virt_to_mem(priv->dev, tx_head + priv->tx_idx),
 	       &mac_regs->tx_dsc_sw_p);
 
 	start = get_timer(0);
@@ -283,7 +283,8 @@ static int pch_gbe_recv(struct udevice *dev, int flags, uchar **packetp)
 	struct pch_gbe_priv *priv = dev_get_priv(dev);
 	struct pch_gbe_regs *mac_regs = priv->mac_regs;
 	struct pch_gbe_rx_desc *rx_desc;
-	ulong hw_desc, buffer_addr, length;
+	ulong hw_desc, length;
+	void *buffer;
 
 	rx_desc = &priv->rx_desc[priv->rx_idx];
 
@@ -291,12 +292,12 @@ static int pch_gbe_recv(struct udevice *dev, int flags, uchar **packetp)
 	hw_desc = readl(&mac_regs->rx_dsc_hw_p_hld);
 
 	/* Just return if not receiving any packet */
-	if ((ulong)rx_desc == hw_desc)
+	if (virt_to_phys(rx_desc) == hw_desc)
 		return -EAGAIN;
 
-	buffer_addr = dm_pci_mem_to_phys(priv->dev, rx_desc->buffer_addr);
-	*packetp = (uchar *)buffer_addr;
 	length = rx_desc->rx_words_eob - 3 - ETH_FCS_LEN;
+	buffer = dm_pci_mem_to_virt(priv->dev, rx_desc->buffer_addr, length, 0);
+	*packetp = (uchar *)buffer;
 
 	return length;
 }
@@ -315,7 +316,7 @@ static int pch_gbe_free_pkt(struct udevice *dev, uchar *packet, int length)
 	if (++rx_swp >= PCH_GBE_DESC_NUM)
 		rx_swp = 0;
 
-	writel(dm_pci_phys_to_mem(priv->dev, (ulong)(rx_head + rx_swp)),
+	writel(dm_pci_virt_to_mem(priv->dev, rx_head + rx_swp),
 	       &mac_regs->rx_dsc_sw_p);
 
 	return 0;
Signature · 1 line
2.11.0
#10 lore raw

PATCH RESEND v2 3/5 net: pch_gbe: CPU accessible addresses are virtual

Quoted 14 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

Use the virt_to_bus & bus_to_virt functions rather than phys_to_bus & bus_to_phys, since the addresses accessed by the CPU will be virtual rather than physical. On MIPS physical & virtual addresses differ as we use virtual addresses in kseg0, and attempting to use physical addresses directly caused problems as they're in the user segment which would be mapped via the uninitialised TLB.

Quoted 9 lines

---

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

 drivers/net/pch_gbe.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)
#11 lore raw

PATCH RESEND v2 3/5 net: pch_gbe: CPU accessible addresses are virtual

In reply to Daniel Schwierzeck
Quoted 9 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

Use the virt_to_bus & bus_to_virt functions rather than phys_to_bus & bus_to_phys, since the addresses accessed by the CPU will be virtual rather than physical. On MIPS physical & virtual addresses differ as we use virtual addresses in kseg0, and attempting to use physical addresses directly caused problems as they're in the user segment which would be mapped via the uninitialised TLB.

Quoted 4 lines
#13 lore raw

PATCH RESEND v2 4/5 net: pch_gbe: Add cache maintenance

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

On MIPS systems DMA isn't coherent with the CPU caches unless an IOCU is present. When there is no IOCU we need to writeback or invalidate the data caches at appropriate points. Perform this cache maintenance in the pch_gbe driver which is used on the MIPS Boston development board.

---

Changes in v2: None

 drivers/net/pch_gbe.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
drivers/net/pch_gbe.c +12 -0
index 14323512b0..8866f6632f 100644
@@ -120,6 +120,8 @@ static void pch_gbe_rx_descs_init(struct udevice *dev)
 		rx_desc[i].buffer_addr = dm_pci_virt_to_mem(priv->dev,
 			priv->rx_buff[i]);
 
+	flush_dcache_range((ulong)rx_desc, (ulong)&rx_desc[PCH_GBE_DESC_NUM]);
+
 	writel(dm_pci_virt_to_mem(priv->dev, rx_desc),
 	       &mac_regs->rx_dsc_base);
 	writel(sizeof(struct pch_gbe_rx_desc) * (PCH_GBE_DESC_NUM - 1),
@@ -137,6 +139,8 @@ static void pch_gbe_tx_descs_init(struct udevice *dev)
 
 	memset(tx_desc, 0, sizeof(struct pch_gbe_tx_desc) * PCH_GBE_DESC_NUM);
 
+	flush_dcache_range((ulong)tx_desc, (ulong)&tx_desc[PCH_GBE_DESC_NUM]);
+
 	writel(dm_pci_virt_to_mem(priv->dev, tx_desc),
 	       &mac_regs->tx_dsc_base);
 	writel(sizeof(struct pch_gbe_tx_desc) * (PCH_GBE_DESC_NUM - 1),
@@ -245,6 +249,8 @@ static int pch_gbe_send(struct udevice *dev, void *packet, int length)
 	u32 int_st;
 	ulong start;
 
+	flush_dcache_range((ulong)packet, (ulong)packet + length);
+
 	tx_head = &priv->tx_desc[0];
 	tx_desc = &priv->tx_desc[priv->tx_idx];
 
@@ -258,6 +264,8 @@ static int pch_gbe_send(struct udevice *dev, void *packet, int length)
 	tx_desc->dma_status = 0;
 	tx_desc->gbec_status = 0;
 
+	flush_dcache_range((ulong)tx_desc, (ulong)&tx_desc[1]);
+
 	/* Test the wrap-around condition */
 	if (++priv->tx_idx >= PCH_GBE_DESC_NUM)
 		priv->tx_idx = 0;
@@ -295,8 +303,12 @@ static int pch_gbe_recv(struct udevice *dev, int flags, uchar **packetp)
 	if (virt_to_phys(rx_desc) == hw_desc)
 		return -EAGAIN;
 
+	/* Invalidate the descriptor */
+	invalidate_dcache_range((ulong)rx_desc, (ulong)&rx_desc[1]);
+
 	length = rx_desc->rx_words_eob - 3 - ETH_FCS_LEN;
 	buffer = dm_pci_mem_to_virt(priv->dev, rx_desc->buffer_addr, length, 0);
+	invalidate_dcache_range((ulong)buffer, (ulong)buffer + length);
 	*packetp = (uchar *)buffer;
 
 	return length;
Signature · 1 line
2.11.0
#14 lore raw

PATCH RESEND v2 4/5 net: pch_gbe: Add cache maintenance

Quoted 11 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

On MIPS systems DMA isn't coherent with the CPU caches unless an IOCU is present. When there is no IOCU we need to writeback or invalidate the data caches at appropriate points. Perform this cache maintenance in the pch_gbe driver which is used on the MIPS Boston development board.

Quoted 6 lines

---

Changes in v2: None

 drivers/net/pch_gbe.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
#15 lore raw

PATCH RESEND v2 4/5 net: pch_gbe: Add cache maintenance

In reply to Daniel Schwierzeck
Quoted 11 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

On MIPS systems DMA isn't coherent with the CPU caches unless an IOCU is present. When there is no IOCU we need to writeback or invalidate the data caches at appropriate points. Perform this cache maintenance in the pch_gbe driver which is used on the MIPS Boston development board.

#17 lore raw

PATCH RESEND v2 5/5 net: pch_gbe: Support PHY reset GPIOs

In reply to Daniel Schwierzeck

From: Paul Burton <[email protected]>

Add support to the pch_gbe driver for resetting the PHY using a GPIO specified in the device tree. This matches the support already in Linux.

---

Changes in v2: None

 drivers/net/pch_gbe.c | 29 +++++++++++++++++++++++++++--
 drivers/net/pch_gbe.h |  1 +
 2 files changed, 28 insertions(+), 2 deletions(-)
drivers/net/pch_gbe.c +27 -2
index 8866f6632f..cc3ca8b3da 100644
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <asm/gpio.h>
 #include "pch_gbe.h"
 
 #if !defined(CONFIG_PHYLIB)
@@ -72,6 +73,14 @@ static int pch_gbe_reset(struct udevice *dev)
 	priv->rx_idx = 0;
 	priv->tx_idx = 0;
 
+	if (dm_gpio_is_valid(&priv->gpio_phy_reset)) {
+		/* Reset the PHY */
+		dm_gpio_set_value(&priv->gpio_phy_reset, 1);
+		udelay(15000);
+		dm_gpio_set_value(&priv->gpio_phy_reset, 0);
+		udelay(5000);
+	}
+
 	writel(PCH_GBE_ALL_RST, &mac_regs->reset);
 
 	/*
@@ -451,6 +460,11 @@ int pch_gbe_probe(struct udevice *dev)
 	plat->iobase = (ulong)iobase;
 	priv->mac_regs = (struct pch_gbe_regs *)iobase;
 
+	err = gpio_request_by_name(dev, "phy-reset-gpios", 0,
+				   &priv->gpio_phy_reset, GPIOD_IS_OUT);
+	if (err && (err != -ENOENT))
+		return err;
+
 	/* Read MAC address from SROM and initialize dev->enetaddr with it */
 	pch_gbe_mac_read(priv->mac_regs, plat->enetaddr);
 
@@ -460,9 +474,17 @@ int pch_gbe_probe(struct udevice *dev)
 
 	err = pch_gbe_reset(dev);
 	if (err)
-		return err;
+		goto out_err;
 
-	return pch_gbe_phy_init(dev);
+	err = pch_gbe_phy_init(dev);
+	if (err)
+		goto out_err;
+
+	return 0;
+out_err:
+	if (dm_gpio_is_valid(&priv->gpio_phy_reset))
+		dm_gpio_free(dev, &priv->gpio_phy_reset);
+	return err;
 }
 
 int pch_gbe_remove(struct udevice *dev)
@@ -473,6 +495,9 @@ int pch_gbe_remove(struct udevice *dev)
 	mdio_unregister(priv->bus);
 	mdio_free(priv->bus);
 
+	if (dm_gpio_is_valid(&priv->gpio_phy_reset))
+		dm_gpio_free(dev, &priv->gpio_phy_reset);
+
 	return 0;
 }
 
drivers/net/pch_gbe.h +1 -0
index 0ea0c73a4f..1d13380837 100644
@@ -293,6 +293,7 @@ struct pch_gbe_priv {
 	struct udevice *dev;
 	int rx_idx;
 	int tx_idx;
+	struct gpio_desc gpio_phy_reset;
 };
 
 #endif /* _PCH_GBE_H_ */
Signature · 1 line
2.11.0
#18 lore raw

PATCH RESEND v2 5/5 net: pch_gbe: Support PHY reset GPIOs

Quoted 32 lines · Daniel Schwierzeck

From: Paul Burton <[email protected]>

Add support to the pch_gbe driver for resetting the PHY using a GPIO specified in the device tree. This matches the support already in Linux.

---

Changes in v2: None

 drivers/net/pch_gbe.c | 29 +++++++++++++++++++++++++++--
 drivers/net/pch_gbe.h |  1 +
 2 files changed, 28 insertions(+), 2 deletions(-)
drivers/net/pch_gbe.c +1 -0
index 8866f6632f..cc3ca8b3da 100644
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <pci.h>
 #include <miiphy.h>
+#include <asm/gpio.h>
 #include "pch_gbe.h"
 
 #if !defined(CONFIG_PHYLIB)

drivers/net/pch_gbe.c static int pch_gbe_reset(struct udevice *dev) · line 79

Quoted 7 lines
drivers/net/pch_gbe.c +4 -0
@@ -72,6 +73,14 @@ static int pch_gbe_reset(struct udevice *dev)
        priv->rx_idx = 0;
        priv->tx_idx = 0;
 
+       if (dm_gpio_is_valid(&priv->gpio_phy_reset)) {
+               /* Reset the PHY */
+               dm_gpio_set_value(&priv->gpio_phy_reset, 1);
+               udelay(15000);

It seems these delays should come from the device tree as well.

Same as: http://www.mail-archive.com/u-boot at lists.denx.de/msg250563.html or here: https://patchwork.ozlabs.org/patch/731278/

Quoted 68 lines
drivers/net/pch_gbe.c +22 -2
+               dm_gpio_set_value(&priv->gpio_phy_reset, 0);
+               udelay(5000);
+       }
+
        writel(PCH_GBE_ALL_RST, &mac_regs->reset);
 
        /*
@@ -451,6 +460,11 @@ int pch_gbe_probe(struct udevice *dev)
        plat->iobase = (ulong)iobase;
        priv->mac_regs = (struct pch_gbe_regs *)iobase;
 
+       err = gpio_request_by_name(dev, "phy-reset-gpios", 0,
+                                  &priv->gpio_phy_reset, GPIOD_IS_OUT);
+       if (err && (err != -ENOENT))
+               return err;
+
        /* Read MAC address from SROM and initialize dev->enetaddr with it */
        pch_gbe_mac_read(priv->mac_regs, plat->enetaddr);
 
@@ -460,9 +474,17 @@ int pch_gbe_probe(struct udevice *dev)
 
        err = pch_gbe_reset(dev);
        if (err)
-               return err;
+               goto out_err;
 
-       return pch_gbe_phy_init(dev);
+       err = pch_gbe_phy_init(dev);
+       if (err)
+               goto out_err;
+
+       return 0;
+out_err:
+       if (dm_gpio_is_valid(&priv->gpio_phy_reset))
+               dm_gpio_free(dev, &priv->gpio_phy_reset);
+       return err;
 }
 
 int pch_gbe_remove(struct udevice *dev)
@@ -473,6 +495,9 @@ int pch_gbe_remove(struct udevice *dev)
        mdio_unregister(priv->bus);
        mdio_free(priv->bus);
 
+       if (dm_gpio_is_valid(&priv->gpio_phy_reset))
+               dm_gpio_free(dev, &priv->gpio_phy_reset);
+
        return 0;
 }
 
drivers/net/pch_gbe.h +1 -1
index 0ea0c73a4f..1d13380837 100644
@@ -293,6 +293,7 @@ struct pch_gbe_priv {
        struct udevice *dev;
        int rx_idx;
        int tx_idx;
+       struct gpio_desc gpio_phy_reset;
 };
 
 #endif /* _PCH_GBE_H_ */
--

2.11.0

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#19 lore raw

v2 cover net/pch_gbe: updates for MIPS Boston board

In reply to Daniel Schwierzeck

Hi Daniel,

Quoted 13 lines · Daniel Schwierzeck

This series is a resend of selected net/pch_gbe patches from the original patch series [1] which was blocked by other patch series. This series only contains the net/pch_gbe patches required for MIPS Boston board, but whose can be separately applied.

[1] https://lists.denx.de/pipermail/u-boot/2016-September/268137.html

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

Quoted 6 lines

Paul Burton (5):
net: pch_gbe: Reset during probe
net: pch_gbe: Fix rx descriptor buffer addresses
net: pch_gbe: CPU accessible addresses are virtual
net: pch_gbe: Add cache maintenance
net: pch_gbe: Support PHY reset GPIOs

This series is assigned to you in patchwork. Does that mean you would like to apply it? If you want me to apply it, please delegate it to me.

Cheers,
-Joe

Quoted 12 lines
 drivers/net/pch_gbe.c | 71 +++++++++++++++++++++++++++++++++++++++++----------
 drivers/net/pch_gbe.h |  1 +
 2 files changed, 58 insertions(+), 14 deletions(-)

--
2.11.0

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#20 lore raw

v2 cover net/pch_gbe: updates for MIPS Boston board

Hi Joe,

Am 30.05.2017 um 22:29 schrieb Joe Hershberger:

Quoted 24 lines

Hi Daniel,

Quoted 13 lines · Daniel Schwierzeck

This series is a resend of selected net/pch_gbe patches from the original patch series [1] which was blocked by other patch series. This series only contains the net/pch_gbe patches required for MIPS Boston board, but whose can be separately applied.

[1] https://lists.denx.de/pipermail/u-boot/2016-September/268137.html

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

Quoted 6 lines

Paul Burton (5):
net: pch_gbe: Reset during probe
net: pch_gbe: Fix rx descriptor buffer addresses
net: pch_gbe: CPU accessible addresses are virtual
net: pch_gbe: Add cache maintenance
net: pch_gbe: Support PHY reset GPIOs

Quoted 4 lines

This series is assigned to you in patchwork. Does that mean you would like to apply it? If you want me to apply it, please delegate it to me.

ok, I've delegated patches 1/5 to 4/5 to you. I'll send another version of patch 5/5 which fetches the PHY reset interval from device-tree. But I need some time, so at least the first four patches could be applied. Thanks!

Signature · 9 lines
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170531/acb2af1c/attachment.sig>
#21 lore raw

v2 cover net/pch_gbe: updates for MIPS Boston board

Quoted 32 lines · Daniel Schwierzeck

Hi Joe,

Am 30.05.2017 um 22:29 schrieb Joe Hershberger:

Quoted 24 lines

Hi Daniel,

Quoted 13 lines · Daniel Schwierzeck

This series is a resend of selected net/pch_gbe patches from the original patch series [1] which was blocked by other patch series. This series only contains the net/pch_gbe patches required for MIPS Boston board, but whose can be separately applied.

[1] https://lists.denx.de/pipermail/u-boot/2016-September/268137.html

Changes in v2:
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() to the next patch as suggested by Bin Meng
- move the switch to dm_pci_virt_to_mem() in pch_gbe_rx_descs_init() from the previous patch to this one as suggested by Bin Meng

Quoted 6 lines

Paul Burton (5):
net: pch_gbe: Reset during probe
net: pch_gbe: Fix rx descriptor buffer addresses
net: pch_gbe: CPU accessible addresses are virtual
net: pch_gbe: Add cache maintenance
net: pch_gbe: Support PHY reset GPIOs

Quoted 4 lines

This series is assigned to you in patchwork. Does that mean you would like to apply it? If you want me to apply it, please delegate it to me.

Quoted 4 lines

ok, I've delegated patches 1/5 to 4/5 to you. I'll send another version of patch 5/5 which fetches the PHY reset interval from device-tree. But I need some time, so at least the first four patches could be applied. Thanks!

OK, I've sent them to travis for build testing.

https://travis-ci.org/jhershbe/u-boot/builds/237978449
https://travis-ci.org/jhershbe/u-boot/builds/237978597
https://travis-ci.org/jhershbe/u-boot/builds/237978697
https://travis-ci.org/jhershbe/u-boot/builds/237979116

Cheers,
-Joe