public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS
@ 2016-07-27 11:25 Zubair Lutfullah Kakakhel
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-07-27 11:25 UTC (permalink / raw)
  To: u-boot

Hi,

This patch series changes the emaclite driver to be slightly more generic
and then enables it for the MIPS arch.

Regards,
ZubairLK

Zubair Lutfullah Kakakhel (3):
  net: emaclite: Use ioremap_nocache
  net: emaclite: use __raw_readl/writel instead of weird define
  net: emaclite: Enable driver for MIPS

 drivers/net/Kconfig           |  2 +-
 drivers/net/xilinx_emaclite.c | 90 +++++++++++++++++++++++--------------------
 2 files changed, 49 insertions(+), 43 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
  2016-07-27 11:25 [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS Zubair Lutfullah Kakakhel
@ 2016-07-27 11:25 ` Zubair Lutfullah Kakakhel
  2016-07-27 11:50   ` Daniel Schwierzeck
                     ` (2 more replies)
  2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
  2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
  2 siblings, 3 replies; 12+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-07-27 11:25 UTC (permalink / raw)
  To: u-boot

Virtual to physical mapping isn't necessarily 1:1 for all architectures

Using ioremap_nocache allows for the arch code to translate the
physical address to a virtual address.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
---
 drivers/net/xilinx_emaclite.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 7b85aa0..6df222b 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -19,6 +19,7 @@
 #include <fdtdec.h>
 #include <asm-generic/errno.h>
 #include <linux/kernel.h>
+#include <asm/io.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -595,7 +596,8 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
 	int offset = 0;
 
 	pdata->iobase = (phys_addr_t)dev_get_addr(dev);
-	emaclite->regs = (struct emaclite_regs *)pdata->iobase;
+	emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
+								 0x10000);
 
 	emaclite->phyaddr = -1;
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define
  2016-07-27 11:25 [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS Zubair Lutfullah Kakakhel
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
@ 2016-07-27 11:25 ` Zubair Lutfullah Kakakhel
  2016-07-29 14:20   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
  2 siblings, 2 replies; 12+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-07-27 11:25 UTC (permalink / raw)
  To: u-boot

out_be32 and in_be32 are actually #defined to little endian
writel/readl in arch/microblaze.

Just use __raw_writel/readl instead. That is also what is used
in the Linux kernel driver for this IP block

Tested on MIPSfpga. Can tftp a kernel.

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
---
 drivers/net/xilinx_emaclite.c | 86 ++++++++++++++++++++++---------------------
 1 file changed, 45 insertions(+), 41 deletions(-)

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 6df222b..d86e7a3 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -155,7 +155,7 @@ static int wait_for_bit(const char *func, u32 *reg, const u32 mask,
 	unsigned long start = get_timer(0);
 
 	while (1) {
-		val = readl(reg);
+		val = __raw_readl(reg);
 
 		if (!set)
 			val = ~val;
@@ -194,16 +194,17 @@ static u32 phyread(struct xemaclite *emaclite, u32 phyaddress, u32 registernum,
 	if (mdio_wait(regs))
 		return 1;
 
-	u32 ctrl_reg = in_be32(&regs->mdioctrl);
-	out_be32(&regs->mdioaddr, XEL_MDIOADDR_OP_MASK |
-		 ((phyaddress << XEL_MDIOADDR_PHYADR_SHIFT) | registernum));
-	out_be32(&regs->mdioctrl, ctrl_reg | XEL_MDIOCTRL_MDIOSTS_MASK);
+	u32 ctrl_reg = __raw_readl(&regs->mdioctrl);
+	__raw_writel(XEL_MDIOADDR_OP_MASK
+		| ((phyaddress << XEL_MDIOADDR_PHYADR_SHIFT)
+		| registernum), &regs->mdioaddr);
+	__raw_writel(ctrl_reg | XEL_MDIOCTRL_MDIOSTS_MASK, &regs->mdioctrl);
 
 	if (mdio_wait(regs))
 		return 1;
 
 	/* Read data */
-	*data = in_be32(&regs->mdiord);
+	*data = __raw_readl(&regs->mdiord);
 	return 0;
 }
 
@@ -221,11 +222,12 @@ static u32 phywrite(struct xemaclite *emaclite, u32 phyaddress, u32 registernum,
 	 * Data register. Finally, set the Status bit in the MDIO Control
 	 * register to start a MDIO write transaction.
 	 */
-	u32 ctrl_reg = in_be32(&regs->mdioctrl);
-	out_be32(&regs->mdioaddr, ~XEL_MDIOADDR_OP_MASK &
-		 ((phyaddress << XEL_MDIOADDR_PHYADR_SHIFT) | registernum));
-	out_be32(&regs->mdiowr, data);
-	out_be32(&regs->mdioctrl, ctrl_reg | XEL_MDIOCTRL_MDIOSTS_MASK);
+	u32 ctrl_reg = __raw_readl(&regs->mdioctrl);
+	__raw_writel(~XEL_MDIOADDR_OP_MASK
+		& ((phyaddress << XEL_MDIOADDR_PHYADR_SHIFT)
+		| registernum), &regs->mdioaddr);
+	__raw_writel(data, &regs->mdiowr);
+	__raw_writel(ctrl_reg | XEL_MDIOCTRL_MDIOSTS_MASK, &regs->mdioctrl);
 
 	if (mdio_wait(regs))
 		return 1;
@@ -328,27 +330,27 @@ static int emaclite_start(struct udevice *dev)
  * TX - TX_PING & TX_PONG initialization
  */
 	/* Restart PING TX */
-	out_be32(&regs->tx_ping_tsr, 0);
+	__raw_writel(0, &regs->tx_ping_tsr);
 	/* Copy MAC address */
 	xemaclite_alignedwrite(pdata->enetaddr, &regs->tx_ping,
 			       ENET_ADDR_LENGTH);
 	/* Set the length */
-	out_be32(&regs->tx_ping_tplr, ENET_ADDR_LENGTH);
+	__raw_writel(ENET_ADDR_LENGTH, &regs->tx_ping_tplr);
 	/* Update the MAC address in the EMAC Lite */
-	out_be32(&regs->tx_ping_tsr, XEL_TSR_PROG_MAC_ADDR);
+	__raw_writel(XEL_TSR_PROG_MAC_ADDR, &regs->tx_ping_tsr);
 	/* Wait for EMAC Lite to finish with the MAC address update */
-	while ((in_be32 (&regs->tx_ping_tsr) &
+	while ((__raw_readl(&regs->tx_ping_tsr) &
 		XEL_TSR_PROG_MAC_ADDR) != 0)
 		;
 
 	if (emaclite->txpp) {
 		/* The same operation with PONG TX */
-		out_be32(&regs->tx_pong_tsr, 0);
+		__raw_writel(0, &regs->tx_pong_tsr);
 		xemaclite_alignedwrite(pdata->enetaddr, &regs->tx_pong,
 				       ENET_ADDR_LENGTH);
-		out_be32(&regs->tx_pong_tplr, ENET_ADDR_LENGTH);
-		out_be32(&regs->tx_pong_tsr, XEL_TSR_PROG_MAC_ADDR);
-		while ((in_be32(&regs->tx_pong_tsr) &
+		__raw_writel(ENET_ADDR_LENGTH, &regs->tx_pong_tplr);
+		__raw_writel(XEL_TSR_PROG_MAC_ADDR, &regs->tx_pong_tsr);
+		while ((__raw_readl(&regs->tx_pong_tsr) &
 		       XEL_TSR_PROG_MAC_ADDR) != 0)
 			;
 	}
@@ -357,13 +359,13 @@ static int emaclite_start(struct udevice *dev)
  * RX - RX_PING & RX_PONG initialization
  */
 	/* Write out the value to flush the RX buffer */
-	out_be32(&regs->rx_ping_rsr, XEL_RSR_RECV_IE_MASK);
+	__raw_writel(XEL_RSR_RECV_IE_MASK, &regs->rx_ping_rsr);
 
 	if (emaclite->rxpp)
-		out_be32(&regs->rx_pong_rsr, XEL_RSR_RECV_IE_MASK);
+		__raw_writel(XEL_RSR_RECV_IE_MASK, &regs->rx_pong_rsr);
 
-	out_be32(&regs->mdioctrl, XEL_MDIOCTRL_MDIOEN_MASK);
-	if (in_be32(&regs->mdioctrl) & XEL_MDIOCTRL_MDIOEN_MASK)
+	__raw_writel(XEL_MDIOCTRL_MDIOEN_MASK, &regs->mdioctrl);
+	if (__raw_readl(&regs->mdioctrl) & XEL_MDIOCTRL_MDIOEN_MASK)
 		if (!setup_phy(dev))
 			return -1;
 
@@ -380,9 +382,9 @@ static int xemaclite_txbufferavailable(struct xemaclite *emaclite)
 	 * Read the other buffer register
 	 * and determine if the other buffer is available
 	 */
-	tmp = ~in_be32(&regs->tx_ping_tsr);
+	tmp = ~__raw_readl(&regs->tx_ping_tsr);
 	if (emaclite->txpp)
-		tmp |= ~in_be32(&regs->tx_pong_tsr);
+		tmp |= ~__raw_readl(&regs->tx_pong_tsr);
 
 	return !(tmp & XEL_TSR_XMIT_BUSY_MASK);
 }
@@ -406,40 +408,42 @@ static int emaclite_send(struct udevice *dev, void *ptr, int len)
 	if (!maxtry) {
 		printf("Error: Timeout waiting for ethernet TX buffer\n");
 		/* Restart PING TX */
-		out_be32(&regs->tx_ping_tsr, 0);
+		__raw_writel(0, &regs->tx_ping_tsr);
 		if (emaclite->txpp) {
-			out_be32(&regs->tx_pong_tsr, 0);
+			__raw_writel(0, &regs->tx_pong_tsr);
 		}
 		return -1;
 	}
 
 	/* Determine if the expected buffer address is empty */
-	reg = in_be32(&regs->tx_ping_tsr);
+	reg = __raw_readl(&regs->tx_ping_tsr);
 	if ((reg & XEL_TSR_XMIT_BUSY_MASK) == 0) {
 		debug("Send packet from tx_ping buffer\n");
 		/* Write the frame to the buffer */
 		xemaclite_alignedwrite(ptr, &regs->tx_ping, len);
-		out_be32(&regs->tx_ping_tplr, len &
-			(XEL_TPLR_LENGTH_MASK_HI | XEL_TPLR_LENGTH_MASK_LO));
-		reg = in_be32(&regs->tx_ping_tsr);
+		__raw_writel(len
+			& (XEL_TPLR_LENGTH_MASK_HI | XEL_TPLR_LENGTH_MASK_LO),
+		       &regs->tx_ping_tplr);
+		reg = __raw_readl(&regs->tx_ping_tsr);
 		reg |= XEL_TSR_XMIT_BUSY_MASK;
-		out_be32(&regs->tx_ping_tsr, reg);
+		__raw_writel(reg, &regs->tx_ping_tsr);
 		return 0;
 	}
 
 	if (emaclite->txpp) {
 		/* Determine if the expected buffer address is empty */
-		reg = in_be32(&regs->tx_pong_tsr);
+		reg = __raw_readl(&regs->tx_pong_tsr);
 		if ((reg & XEL_TSR_XMIT_BUSY_MASK) == 0) {
 			debug("Send packet from tx_pong buffer\n");
 			/* Write the frame to the buffer */
 			xemaclite_alignedwrite(ptr, &regs->tx_pong, len);
-			out_be32(&regs->tx_pong_tplr, len &
+			__raw_writel(len &
 				 (XEL_TPLR_LENGTH_MASK_HI |
-				  XEL_TPLR_LENGTH_MASK_LO));
-			reg = in_be32(&regs->tx_pong_tsr);
+				  XEL_TPLR_LENGTH_MASK_LO),
+				  &regs->tx_pong_tplr);
+			reg = __raw_readl(&regs->tx_pong_tsr);
 			reg |= XEL_TSR_XMIT_BUSY_MASK;
-			out_be32(&regs->tx_pong_tsr, reg);
+			__raw_writel(reg, &regs->tx_pong_tsr);
 			return 0;
 		}
 	}
@@ -459,7 +463,7 @@ static int emaclite_recv(struct udevice *dev, int flags, uchar **packetp)
 
 try_again:
 	if (!emaclite->use_rx_pong_buffer_next) {
-		reg = in_be32(&regs->rx_ping_rsr);
+		reg = __raw_readl(&regs->rx_ping_rsr);
 		debug("Testing data at rx_ping\n");
 		if ((reg & XEL_RSR_RECV_DONE_MASK) == XEL_RSR_RECV_DONE_MASK) {
 			debug("Data found in rx_ping buffer\n");
@@ -479,7 +483,7 @@ try_again:
 			goto try_again;
 		}
 	} else {
-		reg = in_be32(&regs->rx_pong_rsr);
+		reg = __raw_readl(&regs->rx_pong_rsr);
 		debug("Testing data at rx_pong\n");
 		if ((reg & XEL_RSR_RECV_DONE_MASK) == XEL_RSR_RECV_DONE_MASK) {
 			debug("Data found in rx_pong buffer\n");
@@ -526,9 +530,9 @@ try_again:
 				      length - first_read);
 
 	/* Acknowledge the frame */
-	reg = in_be32(ack);
+	reg = __raw_readl(ack);
 	reg &= ~XEL_RSR_RECV_DONE_MASK;
-	out_be32(ack, reg);
+	__raw_writel(reg, ack);
 
 	debug("Packet receive from 0x%p, length %dB\n", addr, length);
 	*packetp = etherrxbuff;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS
  2016-07-27 11:25 [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS Zubair Lutfullah Kakakhel
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
  2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
@ 2016-07-27 11:25 ` Zubair Lutfullah Kakakhel
  2016-07-29 14:20   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  2 siblings, 2 replies; 12+ messages in thread
From: Zubair Lutfullah Kakakhel @ 2016-07-27 11:25 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Reviewed-by: Paul Burton <paul.burton@imgtec.com>
---
 drivers/net/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 88d8e83..4efb5d6 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -170,7 +170,7 @@ config XILINX_AXIEMAC
 	  This MAC is present in Xilinx Microblaze, Zynq and ZynqMP SoCs.
 
 config XILINX_EMACLITE
-	depends on DM_ETH && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
+	depends on DM_ETH && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || MIPS)
 	select PHYLIB
 	select MII
 	bool "Xilinx Ethernetlite"
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
@ 2016-07-27 11:50   ` Daniel Schwierzeck
  2016-08-01  7:10     ` Michal Simek
  2016-07-29 14:18   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  2 siblings, 1 reply; 12+ messages in thread
From: Daniel Schwierzeck @ 2016-07-27 11:50 UTC (permalink / raw)
  To: u-boot



Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
> Virtual to physical mapping isn't necessarily 1:1 for all architectures
> 
> Using ioremap_nocache allows for the arch code to translate the
> physical address to a virtual address.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>

looks okay because this driver is only used by Microblaze which has
ioremap_nocache() defined.

Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

> ---
>  drivers/net/xilinx_emaclite.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 7b85aa0..6df222b 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -19,6 +19,7 @@
>  #include <fdtdec.h>
>  #include <asm-generic/errno.h>
>  #include <linux/kernel.h>
> +#include <asm/io.h>
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> @@ -595,7 +596,8 @@ static int emaclite_ofdata_to_platdata(struct udevice *dev)
>  	int offset = 0;
>  
>  	pdata->iobase = (phys_addr_t)dev_get_addr(dev);
> -	emaclite->regs = (struct emaclite_regs *)pdata->iobase;
> +	emaclite->regs = (struct emaclite_regs *)ioremap_nocache(pdata->iobase,
> +								 0x10000);
>  
>  	emaclite->phyaddr = -1;
>  
> 

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160727/c9a86e77/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
  2016-07-27 11:50   ` Daniel Schwierzeck
@ 2016-07-29 14:18   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  2 siblings, 0 replies; 12+ messages in thread
From: Joe Hershberger @ 2016-07-29 14:18 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 27, 2016 at 6:25 AM, Zubair Lutfullah Kakakhel
<Zubair.Kakakhel@imgtec.com> wrote:
> Virtual to physical mapping isn't necessarily 1:1 for all architectures
>
> Using ioremap_nocache allows for the arch code to translate the
> physical address to a virtual address.
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define
  2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
@ 2016-07-29 14:20   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  1 sibling, 0 replies; 12+ messages in thread
From: Joe Hershberger @ 2016-07-29 14:20 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 27, 2016 at 6:25 AM, Zubair Lutfullah Kakakhel
<Zubair.Kakakhel@imgtec.com> wrote:
> out_be32 and in_be32 are actually #defined to little endian
> writel/readl in arch/microblaze.
>
> Just use __raw_writel/readl instead. That is also what is used
> in the Linux kernel driver for this IP block
>
> Tested on MIPSfpga. Can tftp a kernel.
>
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS
  2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
@ 2016-07-29 14:20   ` Joe Hershberger
  2016-07-31 12:27   ` Daniel Schwierzeck
  1 sibling, 0 replies; 12+ messages in thread
From: Joe Hershberger @ 2016-07-29 14:20 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 27, 2016 at 6:25 AM, Zubair Lutfullah Kakakhel
<Zubair.Kakakhel@imgtec.com> wrote:
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
  2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
  2016-07-27 11:50   ` Daniel Schwierzeck
  2016-07-29 14:18   ` Joe Hershberger
@ 2016-07-31 12:27   ` Daniel Schwierzeck
  2 siblings, 0 replies; 12+ messages in thread
From: Daniel Schwierzeck @ 2016-07-31 12:27 UTC (permalink / raw)
  To: u-boot



Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
> Virtual to physical mapping isn't necessarily 1:1 for all architectures
> 
> Using ioremap_nocache allows for the arch code to translate the
> physical address to a virtual address.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>
> ---
>  drivers/net/xilinx_emaclite.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 

applied to u-boot-mips/next, thanks

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160731/ce8cf3ba/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define
  2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
  2016-07-29 14:20   ` Joe Hershberger
@ 2016-07-31 12:27   ` Daniel Schwierzeck
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Schwierzeck @ 2016-07-31 12:27 UTC (permalink / raw)
  To: u-boot



Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
> out_be32 and in_be32 are actually #defined to little endian
> writel/readl in arch/microblaze.
> 
> Just use __raw_writel/readl instead. That is also what is used
> in the Linux kernel driver for this IP block
> 
> Tested on MIPSfpga. Can tftp a kernel.
> 
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>
> ---
>  drivers/net/xilinx_emaclite.c | 86 ++++++++++++++++++++++---------------------
>  1 file changed, 45 insertions(+), 41 deletions(-)
> 

applied to u-boot-mips/next, thanks

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160731/2934e927/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS
  2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
  2016-07-29 14:20   ` Joe Hershberger
@ 2016-07-31 12:27   ` Daniel Schwierzeck
  1 sibling, 0 replies; 12+ messages in thread
From: Daniel Schwierzeck @ 2016-07-31 12:27 UTC (permalink / raw)
  To: u-boot



Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
> Reviewed-by: Paul Burton <paul.burton@imgtec.com>
> ---
>  drivers/net/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

applied to u-boot-mips/next, thanks

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160731/98459c88/attachment.sig>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache
  2016-07-27 11:50   ` Daniel Schwierzeck
@ 2016-08-01  7:10     ` Michal Simek
  0 siblings, 0 replies; 12+ messages in thread
From: Michal Simek @ 2016-08-01  7:10 UTC (permalink / raw)
  To: u-boot

On 27.7.2016 13:50, Daniel Schwierzeck wrote:
> 
> 
> Am 27.07.2016 um 13:25 schrieb Zubair Lutfullah Kakakhel:
>> Virtual to physical mapping isn't necessarily 1:1 for all architectures
>>
>> Using ioremap_nocache allows for the arch code to translate the
>> physical address to a virtual address.
>>
>> Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
>> Reviewed-by: Paul Burton <paul.burton@imgtec.com>
> 
> looks okay because this driver is only used by Microblaze which has
> ioremap_nocache() defined.
> 
> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>

First of all please keep me in CC for all these xilinx drivers changes.

This driver is enabled only for Microblaze but can be also used for ARM
and ARM64.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2016-08-01  7:10 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27 11:25 [U-Boot] [PATCH 0/3] net: emaclite: fixes and enable for MIPS Zubair Lutfullah Kakakhel
2016-07-27 11:25 ` [U-Boot] [PATCH 1/3] net: emaclite: Use ioremap_nocache Zubair Lutfullah Kakakhel
2016-07-27 11:50   ` Daniel Schwierzeck
2016-08-01  7:10     ` Michal Simek
2016-07-29 14:18   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck
2016-07-27 11:25 ` [U-Boot] [PATCH 2/3] net: emaclite: use __raw_readl/writel instead of weird define Zubair Lutfullah Kakakhel
2016-07-29 14:20   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck
2016-07-27 11:25 ` [U-Boot] [PATCH 3/3] net: emaclite: Enable driver for MIPS Zubair Lutfullah Kakakhel
2016-07-29 14:20   ` Joe Hershberger
2016-07-31 12:27   ` Daniel Schwierzeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox