Skip to contentSkip to conversation

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

PATCH New Michal Simek 3 participants 3 messages Mar 26, 2020 – Mar 31, 2020 Network drivers

lore
Share & tools
lore
#0 lore raw

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

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")

---

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(-)
drivers/net/macb.c +1 -1
index 631b53b0930a..bd588cab06b3 100644
@@ -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);
Signature · 1 line
2.26.0
#1 lore raw

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

Quoted 6 lines · Michal Simek

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)

Quoted 6 lines
                                 ^~~~~

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

Fixes 6c636514d499 ("net: macb: sync header definitions as taken from Linux")
#2 lore raw

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

In reply to Michal Simek
Quoted 5 lines · Michal Simek

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)

Quoted 7 lines
                                 ^~~~~

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

Fixes 6c636514d499 ("net: macb: sync header definitions as taken from Linux")

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200331/f4642a8f/attachment.sig>