diff mbox series

net: macb: Fix incorrect write function name when MACB_ZYNQ is enabled.

Message ID 96d87b35bafab5ac49b3475a2d22ad67ee9afaef.1585231286.git.michal.simek@xilinx.com
State Accepted
Commit 7f6b0f3357bd25c7ed23f8f5a76a99ab9a0fd398
Headers show
Series net: macb: Fix incorrect write function name when MACB_ZYNQ is enabled. | expand

Commit Message

Michal Simek March 26, 2020, 2:01 p.m. UTC
When MACB_ZYNQ is enabled there is compilation warnings
drivers/net/macb.c: In function ?_macb_init?:
drivers/net/macb.h:675:33: error: ?MACB_DMACFG? undeclared (first use in this function);
 did you mean ?MACB_MCF??
  writel((value), (port)->regs + MACB_##reg)
                                 ^~~~~

It has been caused by changing macros name by commit below.

Fixes: 6c636514d499 ("net: macb: sync header definitions as taken from Linux")
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

Xilinx is not using this driver. We are using zynq_gem one but I found it
when I was comparing one setting.

Tom: I would consider this as FIX and would be good if you can take it to
the current release but up2you.

---
 drivers/net/macb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joe Hershberger March 30, 2020, 8:09 p.m. UTC | #1
On Thu, Mar 26, 2020 at 9:01 AM Michal Simek <michal.simek at xilinx.com> wrote:
>
> When MACB_ZYNQ is enabled there is compilation warnings
> drivers/net/macb.c: In function ?_macb_init?:
> drivers/net/macb.h:675:33: error: ?MACB_DMACFG? undeclared (first use in this function);
>  did you mean ?MACB_MCF??
>   writel((value), (port)->regs + MACB_##reg)
>                                  ^~~~~
>
> It has been caused by changing macros name by commit below.
>
> Fixes: 6c636514d499 ("net: macb: sync header definitions as taken from Linux")
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>

Acked-by: Joe Hershberger <joe.hershberger at ni.com>
Tom Rini March 31, 2020, 7:10 p.m. UTC | #2
On Thu, Mar 26, 2020 at 03:01:29PM +0100, Michal Simek wrote:

> When MACB_ZYNQ is enabled there is compilation warnings
> drivers/net/macb.c: In function ?_macb_init?:
> drivers/net/macb.h:675:33: error: ?MACB_DMACFG? undeclared (first use in this function);
>  did you mean ?MACB_MCF??
>   writel((value), (port)->regs + MACB_##reg)
>                                  ^~~~~
> 
> It has been caused by changing macros name by commit below.
> 
> Fixes: 6c636514d499 ("net: macb: sync header definitions as taken from Linux")
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> Acked-by: Joe Hershberger <joe.hershberger at ni.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 631b53b0930a..bd588cab06b3 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -807,7 +807,7 @@  static int _macb_init(struct macb_device *macb, const char *name)
 	macb->next_rx_tail = 0;
 
 #ifdef CONFIG_MACB_ZYNQ
-	macb_writel(macb, DMACFG, MACB_ZYNQ_GEM_DMACR_INIT);
+	gem_writel(macb, DMACFG, MACB_ZYNQ_GEM_DMACR_INIT);
 #endif
 
 	macb_writel(macb, RBQP, macb->rx_ring_dma);