diff mbox

[U-Boot,05/12] net: emaclite: Use indirect register access for tx_ping/pong

Message ID 57df7abb2e251164a4b7012e3613f4f2bda41286.1449835419.git.michal.simek@xilinx.com
State Accepted
Commit 3af709092c6d92cf7e4e19a45fbb96e2e4d1c8f5
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek Dec. 11, 2015, 12:03 p.m. UTC
Do initialization via indirect register access.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 drivers/net/xilinx_emaclite.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Joe Hershberger Dec. 15, 2015, 9:36 p.m. UTC | #1
On Fri, Dec 11, 2015 at 6:03 AM, Michal Simek <michal.simek@xilinx.com> wrote:
> Do initialization via indirect register access.

I think you need to change the subject of this patch. It is identical
the the previous one.

>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  drivers/net/xilinx_emaclite.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
> index 654ad58cea3c..724b61e0b7e1 100644
> --- a/drivers/net/xilinx_emaclite.c
> +++ b/drivers/net/xilinx_emaclite.c
> @@ -364,11 +364,10 @@ static int emaclite_init(struct eth_device *dev, bd_t *bis)
>   * RX - RX_PING & RX_PONG initialization
>   */
>         /* Write out the value to flush the RX buffer */
> -       out_be32 (dev->iobase + XEL_RSR_OFFSET, XEL_RSR_RECV_IE_MASK);
> +       out_be32(&regs->rx_ping_rsr, XEL_RSR_RECV_IE_MASK);
>
>         if (emaclite->rxpp)
> -               out_be32 (dev->iobase + XEL_RSR_OFFSET + XEL_BUFFER_OFFSET,
> -                       XEL_RSR_RECV_IE_MASK);
> +               out_be32(&regs->rx_pong_rsr, XEL_RSR_RECV_IE_MASK);
>
>  #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
>         out_be32(&regs->mdioctrl, XEL_MDIOCTRL_MDIOEN_MASK);
> --
> 1.9.1
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Michal Simek Dec. 16, 2015, 10:08 a.m. UTC | #2
On 15.12.2015 22:36, Joe Hershberger wrote:
> On Fri, Dec 11, 2015 at 6:03 AM, Michal Simek <michal.simek@xilinx.com> wrote:
>> Do initialization via indirect register access.
> 
> I think you need to change the subject of this patch. It is identical
> the the previous one.

ops. It should be rx_ping/pong

Will be in v2.

Thanks,
Michal
diff mbox

Patch

diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index 654ad58cea3c..724b61e0b7e1 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -364,11 +364,10 @@  static int emaclite_init(struct eth_device *dev, bd_t *bis)
  * RX - RX_PING & RX_PONG initialization
  */
 	/* Write out the value to flush the RX buffer */
-	out_be32 (dev->iobase + XEL_RSR_OFFSET, XEL_RSR_RECV_IE_MASK);
+	out_be32(&regs->rx_ping_rsr, XEL_RSR_RECV_IE_MASK);
 
 	if (emaclite->rxpp)
-		out_be32 (dev->iobase + XEL_RSR_OFFSET + XEL_BUFFER_OFFSET,
-			XEL_RSR_RECV_IE_MASK);
+		out_be32(&regs->rx_pong_rsr, XEL_RSR_RECV_IE_MASK);
 
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) || defined(CONFIG_PHYLIB)
 	out_be32(&regs->mdioctrl, XEL_MDIOCTRL_MDIOEN_MASK);