]> git.sur5r.net Git - u-boot/commitdiff
net: emaclite: Use indirect register access for rx_ping/pong
authorMichal Simek <michal.simek@xilinx.com>
Thu, 10 Dec 2015 14:24:23 +0000 (15:24 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 27 Jan 2016 14:55:51 +0000 (15:55 +0100)
Do initialization via indirect register access.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/net/xilinx_emaclite.c

index 654ad58cea3cadec16d2267aa17d40e544a074c5..724b61e0b7e118aedf6c183567dd5e9e2ed7c735 100644 (file)
@@ -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);