1 From 9d61d138ab30bbfe4a8609853c81e881c4054a0b Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Thu, 11 Feb 2021 13:12:34 +0100
4 Subject: [PATCH] net: broadcom: rename BCM4908 driver & update DT binding
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 compatible string was updated to match normal naming convention so
12 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
13 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
17 drivers/net/ethernet/broadcom/Kconfig | 2 +-
18 drivers/net/ethernet/broadcom/Makefile | 2 +-
19 .../{bcm4908enet.c => bcm4908_enet.c} | 215 +++++++++---------
20 .../{bcm4908enet.h => bcm4908_enet.h} | 4 +-
21 5 files changed, 113 insertions(+), 112 deletions(-)
22 rename drivers/net/ethernet/broadcom/{bcm4908enet.c => bcm4908_enet.c} (68%)
23 rename drivers/net/ethernet/broadcom/{bcm4908enet.h => bcm4908_enet.h} (98%)
25 diff --git a/MAINTAINERS b/MAINTAINERS
26 index 68fcd0a6416b..99335fd22c0a 100644
29 @@ -3451,7 +3451,7 @@ M: bcm-kernel-feedback-list@broadcom.com
30 L: netdev@vger.kernel.org
32 F: Documentation/devicetree/bindings/net/brcm,bcm4908-enet.yaml
33 -F: drivers/net/ethernet/broadcom/bcm4908enet.*
34 +F: drivers/net/ethernet/broadcom/bcm4908_enet.*
35 F: drivers/net/ethernet/broadcom/unimac.h
37 BROADCOM BCM5301X ARM ARCHITECTURE
38 diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
39 index bcf9e0a410fd..f8a168b73307 100644
40 --- a/drivers/net/ethernet/broadcom/Kconfig
41 +++ b/drivers/net/ethernet/broadcom/Kconfig
42 @@ -51,7 +51,7 @@ config B44_PCI
43 depends on B44_PCI_AUTOSELECT && B44_PCICORE_AUTOSELECT
48 tristate "Broadcom BCM4908 internal mac support"
49 depends on ARCH_BCM4908 || COMPILE_TEST
51 diff --git a/drivers/net/ethernet/broadcom/Makefile b/drivers/net/ethernet/broadcom/Makefile
52 index 379012de3569..0ddfb5b5d53c 100644
53 --- a/drivers/net/ethernet/broadcom/Makefile
54 +++ b/drivers/net/ethernet/broadcom/Makefile
58 obj-$(CONFIG_B44) += b44.o
59 -obj-$(CONFIG_BCM4908ENET) += bcm4908enet.o
60 +obj-$(CONFIG_BCM4908_ENET) += bcm4908_enet.o
61 obj-$(CONFIG_BCM63XX_ENET) += bcm63xx_enet.o
62 obj-$(CONFIG_BCMGENET) += genet/
63 obj-$(CONFIG_BNX2) += bnx2.o
64 diff --git a/drivers/net/ethernet/broadcom/bcm4908enet.c b/drivers/net/ethernet/broadcom/bcm4908_enet.c
66 rename from drivers/net/ethernet/broadcom/bcm4908enet.c
67 rename to drivers/net/ethernet/broadcom/bcm4908_enet.c
68 index d68b328e7596..e56348eb188f 100644
69 --- a/drivers/net/ethernet/broadcom/bcm4908enet.c
70 +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
72 #include <linux/slab.h>
73 #include <linux/string.h>
75 -#include "bcm4908enet.h"
76 +#include "bcm4908_enet.h"
79 #define ENET_DMA_CH_RX_CFG ENET_DMA_CH0_CFG
81 #define ENET_MTU_MAX 1500 /* Is it possible to support 2044? */
82 #define ENET_MTU_MAX_EXTRA_SIZE 32 /* L2 */
84 -struct bcm4908enet_dma_ring_bd {
85 +struct bcm4908_enet_dma_ring_bd {
90 -struct bcm4908enet_dma_ring_slot {
91 +struct bcm4908_enet_dma_ring_slot {
97 -struct bcm4908enet_dma_ring {
98 +struct bcm4908_enet_dma_ring {
102 @@ -54,38 +54,38 @@ struct bcm4908enet_dma_ring {
106 - struct bcm4908enet_dma_ring_bd *buf_desc;
107 + struct bcm4908_enet_dma_ring_bd *buf_desc;
111 - struct bcm4908enet_dma_ring_slot *slots;
112 + struct bcm4908_enet_dma_ring_slot *slots;
115 -struct bcm4908enet {
116 +struct bcm4908_enet {
118 struct net_device *netdev;
119 struct napi_struct napi;
122 - struct bcm4908enet_dma_ring tx_ring;
123 - struct bcm4908enet_dma_ring rx_ring;
124 + struct bcm4908_enet_dma_ring tx_ring;
125 + struct bcm4908_enet_dma_ring rx_ring;
132 -static inline u32 enet_read(struct bcm4908enet *enet, u16 offset)
133 +static inline u32 enet_read(struct bcm4908_enet *enet, u16 offset)
135 return readl(enet->base + offset);
138 -static inline void enet_write(struct bcm4908enet *enet, u16 offset, u32 value)
139 +static inline void enet_write(struct bcm4908_enet *enet, u16 offset, u32 value)
141 writel(value, enet->base + offset);
144 -static inline void enet_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set)
145 +static inline void enet_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set)
149 @@ -96,27 +96,27 @@ static inline void enet_maskset(struct bcm4908enet *enet, u16 offset, u32 mask,
150 enet_write(enet, offset, val);
153 -static inline void enet_set(struct bcm4908enet *enet, u16 offset, u32 set)
154 +static inline void enet_set(struct bcm4908_enet *enet, u16 offset, u32 set)
156 enet_maskset(enet, offset, set, set);
159 -static inline u32 enet_umac_read(struct bcm4908enet *enet, u16 offset)
160 +static inline u32 enet_umac_read(struct bcm4908_enet *enet, u16 offset)
162 return enet_read(enet, ENET_UNIMAC + offset);
165 -static inline void enet_umac_write(struct bcm4908enet *enet, u16 offset, u32 value)
166 +static inline void enet_umac_write(struct bcm4908_enet *enet, u16 offset, u32 value)
168 enet_write(enet, ENET_UNIMAC + offset, value);
171 -static inline void enet_umac_maskset(struct bcm4908enet *enet, u16 offset, u32 mask, u32 set)
172 +static inline void enet_umac_maskset(struct bcm4908_enet *enet, u16 offset, u32 mask, u32 set)
174 enet_maskset(enet, ENET_UNIMAC + offset, mask, set);
177 -static inline void enet_umac_set(struct bcm4908enet *enet, u16 offset, u32 set)
178 +static inline void enet_umac_set(struct bcm4908_enet *enet, u16 offset, u32 set)
180 enet_set(enet, ENET_UNIMAC + offset, set);
182 @@ -125,17 +125,17 @@ static inline void enet_umac_set(struct bcm4908enet *enet, u16 offset, u32 set)
186 -static void bcm4908enet_intrs_on(struct bcm4908enet *enet)
187 +static void bcm4908_enet_intrs_on(struct bcm4908_enet *enet)
189 enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, ENET_DMA_INT_DEFAULTS);
192 -static void bcm4908enet_intrs_off(struct bcm4908enet *enet)
193 +static void bcm4908_enet_intrs_off(struct bcm4908_enet *enet)
195 enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_MASK, 0);
198 -static void bcm4908enet_intrs_ack(struct bcm4908enet *enet)
199 +static void bcm4908_enet_intrs_ack(struct bcm4908_enet *enet)
201 enet_write(enet, ENET_DMA_CH_RX_CFG + ENET_DMA_CH_CFG_INT_STAT, ENET_DMA_INT_DEFAULTS);
203 @@ -144,9 +144,10 @@ static void bcm4908enet_intrs_ack(struct bcm4908enet *enet)
207 -static int bcm4908_dma_alloc_buf_descs(struct bcm4908enet *enet, struct bcm4908enet_dma_ring *ring)
208 +static int bcm4908_dma_alloc_buf_descs(struct bcm4908_enet *enet,
209 + struct bcm4908_enet_dma_ring *ring)
211 - int size = ring->length * sizeof(struct bcm4908enet_dma_ring_bd);
212 + int size = ring->length * sizeof(struct bcm4908_enet_dma_ring_bd);
213 struct device *dev = enet->dev;
215 ring->cpu_addr = dma_alloc_coherent(dev, size, &ring->dma_addr, GFP_KERNEL);
216 @@ -174,28 +175,28 @@ static int bcm4908_dma_alloc_buf_descs(struct bcm4908enet *enet, struct bcm4908e
220 -static void bcm4908enet_dma_free(struct bcm4908enet *enet)
221 +static void bcm4908_enet_dma_free(struct bcm4908_enet *enet)
223 - struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring;
224 - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring;
225 + struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring;
226 + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring;
227 struct device *dev = enet->dev;
230 - size = rx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd);
231 + size = rx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd);
232 if (rx_ring->cpu_addr)
233 dma_free_coherent(dev, size, rx_ring->cpu_addr, rx_ring->dma_addr);
234 kfree(rx_ring->slots);
236 - size = tx_ring->length * sizeof(struct bcm4908enet_dma_ring_bd);
237 + size = tx_ring->length * sizeof(struct bcm4908_enet_dma_ring_bd);
238 if (tx_ring->cpu_addr)
239 dma_free_coherent(dev, size, tx_ring->cpu_addr, tx_ring->dma_addr);
240 kfree(tx_ring->slots);
243 -static int bcm4908enet_dma_alloc(struct bcm4908enet *enet)
244 +static int bcm4908_enet_dma_alloc(struct bcm4908_enet *enet)
246 - struct bcm4908enet_dma_ring *tx_ring = &enet->tx_ring;
247 - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring;
248 + struct bcm4908_enet_dma_ring *tx_ring = &enet->tx_ring;
249 + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring;
250 struct device *dev = enet->dev;
253 @@ -216,16 +217,16 @@ static int bcm4908enet_dma_alloc(struct bcm4908enet *enet)
254 err = bcm4908_dma_alloc_buf_descs(enet, rx_ring);
256 dev_err(dev, "Failed to alloc RX buf descriptors: %d\n", err);
257 - bcm4908enet_dma_free(enet);
258 + bcm4908_enet_dma_free(enet);
265 -static void bcm4908enet_dma_reset(struct bcm4908enet *enet)
266 +static void bcm4908_enet_dma_reset(struct bcm4908_enet *enet)
268 - struct bcm4908enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring };
269 + struct bcm4908_enet_dma_ring *rings[] = { &enet->rx_ring, &enet->tx_ring };
272 /* Disable the DMA controller and channel */
273 @@ -235,7 +236,7 @@ static void bcm4908enet_dma_reset(struct bcm4908enet *enet)
275 /* Reset channels state */
276 for (i = 0; i < ARRAY_SIZE(rings); i++) {
277 - struct bcm4908enet_dma_ring *ring = rings[i];
278 + struct bcm4908_enet_dma_ring *ring = rings[i];
280 enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_BASE_DESC_PTR, 0);
281 enet_write(enet, ring->st_ram_block + ENET_DMA_CH_STATE_RAM_STATE_DATA, 0);
282 @@ -244,10 +245,10 @@ static void bcm4908enet_dma_reset(struct bcm4908enet *enet)
286 -static int bcm4908enet_dma_alloc_rx_buf(struct bcm4908enet *enet, unsigned int idx)
287 +static int bcm4908_enet_dma_alloc_rx_buf(struct bcm4908_enet *enet, unsigned int idx)
289 - struct bcm4908enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx];
290 - struct bcm4908enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx];
291 + struct bcm4908_enet_dma_ring_bd *buf_desc = &enet->rx_ring.buf_desc[idx];
292 + struct bcm4908_enet_dma_ring_slot *slot = &enet->rx_ring.slots[idx];
293 struct device *dev = enet->dev;
296 @@ -277,8 +278,8 @@ static int bcm4908enet_dma_alloc_rx_buf(struct bcm4908enet *enet, unsigned int i
300 -static void bcm4908enet_dma_ring_init(struct bcm4908enet *enet,
301 - struct bcm4908enet_dma_ring *ring)
302 +static void bcm4908_enet_dma_ring_init(struct bcm4908_enet *enet,
303 + struct bcm4908_enet_dma_ring *ring)
305 int reset_channel = 0; /* We support only 1 main channel (with TX and RX) */
306 int reset_subch = ring->is_tx ? 1 : 0;
307 @@ -295,10 +296,10 @@ static void bcm4908enet_dma_ring_init(struct bcm4908enet *enet,
308 (uint32_t)ring->dma_addr);
311 -static void bcm4908enet_dma_uninit(struct bcm4908enet *enet)
312 +static void bcm4908_enet_dma_uninit(struct bcm4908_enet *enet)
314 - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring;
315 - struct bcm4908enet_dma_ring_slot *slot;
316 + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring;
317 + struct bcm4908_enet_dma_ring_slot *slot;
318 struct device *dev = enet->dev;
321 @@ -312,48 +313,48 @@ static void bcm4908enet_dma_uninit(struct bcm4908enet *enet)
325 -static int bcm4908enet_dma_init(struct bcm4908enet *enet)
326 +static int bcm4908_enet_dma_init(struct bcm4908_enet *enet)
328 - struct bcm4908enet_dma_ring *rx_ring = &enet->rx_ring;
329 + struct bcm4908_enet_dma_ring *rx_ring = &enet->rx_ring;
330 struct device *dev = enet->dev;
334 for (i = 0; i < rx_ring->length; i++) {
335 - err = bcm4908enet_dma_alloc_rx_buf(enet, i);
336 + err = bcm4908_enet_dma_alloc_rx_buf(enet, i);
338 dev_err(dev, "Failed to alloc RX buffer: %d\n", err);
339 - bcm4908enet_dma_uninit(enet);
340 + bcm4908_enet_dma_uninit(enet);
345 - bcm4908enet_dma_ring_init(enet, &enet->tx_ring);
346 - bcm4908enet_dma_ring_init(enet, &enet->rx_ring);
347 + bcm4908_enet_dma_ring_init(enet, &enet->tx_ring);
348 + bcm4908_enet_dma_ring_init(enet, &enet->rx_ring);
353 -static void bcm4908enet_dma_tx_ring_ensable(struct bcm4908enet *enet,
354 - struct bcm4908enet_dma_ring *ring)
355 +static void bcm4908_enet_dma_tx_ring_ensable(struct bcm4908_enet *enet,
356 + struct bcm4908_enet_dma_ring *ring)
358 enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE);
361 -static void bcm4908enet_dma_tx_ring_disable(struct bcm4908enet *enet,
362 - struct bcm4908enet_dma_ring *ring)
363 +static void bcm4908_enet_dma_tx_ring_disable(struct bcm4908_enet *enet,
364 + struct bcm4908_enet_dma_ring *ring)
366 enet_write(enet, ring->cfg_block + ENET_DMA_CH_CFG, 0);
369 -static void bcm4908enet_dma_rx_ring_enable(struct bcm4908enet *enet,
370 - struct bcm4908enet_dma_ring *ring)
371 +static void bcm4908_enet_dma_rx_ring_enable(struct bcm4908_enet *enet,
372 + struct bcm4908_enet_dma_ring *ring)
374 enet_set(enet, ring->cfg_block + ENET_DMA_CH_CFG, ENET_DMA_CH_CFG_ENABLE);
377 -static void bcm4908enet_dma_rx_ring_disable(struct bcm4908enet *enet,
378 - struct bcm4908enet_dma_ring *ring)
379 +static void bcm4908_enet_dma_rx_ring_disable(struct bcm4908_enet *enet,
380 + struct bcm4908_enet_dma_ring *ring)
382 unsigned long deadline;
384 @@ -376,7 +377,7 @@ static void bcm4908enet_dma_rx_ring_disable(struct bcm4908enet *enet,
388 -static void bcm4908enet_gmac_init(struct bcm4908enet *enet)
389 +static void bcm4908_enet_gmac_init(struct bcm4908_enet *enet)
393 @@ -407,75 +408,75 @@ static void bcm4908enet_gmac_init(struct bcm4908enet *enet)
394 ENET_GMAC_STATUS_LINK_UP);
397 -static irqreturn_t bcm4908enet_irq_handler(int irq, void *dev_id)
398 +static irqreturn_t bcm4908_enet_irq_handler(int irq, void *dev_id)
400 - struct bcm4908enet *enet = dev_id;
401 + struct bcm4908_enet *enet = dev_id;
403 - bcm4908enet_intrs_off(enet);
404 - bcm4908enet_intrs_ack(enet);
405 + bcm4908_enet_intrs_off(enet);
406 + bcm4908_enet_intrs_ack(enet);
408 napi_schedule(&enet->napi);
413 -static int bcm4908enet_open(struct net_device *netdev)
414 +static int bcm4908_enet_open(struct net_device *netdev)
416 - struct bcm4908enet *enet = netdev_priv(netdev);
417 + struct bcm4908_enet *enet = netdev_priv(netdev);
418 struct device *dev = enet->dev;
421 - err = request_irq(netdev->irq, bcm4908enet_irq_handler, 0, "enet", enet);
422 + err = request_irq(netdev->irq, bcm4908_enet_irq_handler, 0, "enet", enet);
424 dev_err(dev, "Failed to request IRQ %d: %d\n", netdev->irq, err);
428 - bcm4908enet_gmac_init(enet);
429 - bcm4908enet_dma_reset(enet);
430 - bcm4908enet_dma_init(enet);
431 + bcm4908_enet_gmac_init(enet);
432 + bcm4908_enet_dma_reset(enet);
433 + bcm4908_enet_dma_init(enet);
435 enet_umac_set(enet, UMAC_CMD, CMD_TX_EN | CMD_RX_EN);
437 enet_set(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_MASTER_EN);
438 enet_maskset(enet, ENET_DMA_CONTROLLER_CFG, ENET_DMA_CTRL_CFG_FLOWC_CH1_EN, 0);
439 - bcm4908enet_dma_rx_ring_enable(enet, &enet->rx_ring);
440 + bcm4908_enet_dma_rx_ring_enable(enet, &enet->rx_ring);
442 napi_enable(&enet->napi);
443 netif_carrier_on(netdev);
444 netif_start_queue(netdev);
446 - bcm4908enet_intrs_ack(enet);
447 - bcm4908enet_intrs_on(enet);
448 + bcm4908_enet_intrs_ack(enet);
449 + bcm4908_enet_intrs_on(enet);
454 -static int bcm4908enet_stop(struct net_device *netdev)
455 +static int bcm4908_enet_stop(struct net_device *netdev)
457 - struct bcm4908enet *enet = netdev_priv(netdev);
458 + struct bcm4908_enet *enet = netdev_priv(netdev);
460 netif_stop_queue(netdev);
461 netif_carrier_off(netdev);
462 napi_disable(&enet->napi);
464 - bcm4908enet_dma_rx_ring_disable(enet, &enet->rx_ring);
465 - bcm4908enet_dma_tx_ring_disable(enet, &enet->tx_ring);
466 + bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring);
467 + bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring);
469 - bcm4908enet_dma_uninit(enet);
470 + bcm4908_enet_dma_uninit(enet);
472 free_irq(enet->netdev->irq, enet);
477 -static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
478 +static int bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_device *netdev)
480 - struct bcm4908enet *enet = netdev_priv(netdev);
481 - struct bcm4908enet_dma_ring *ring = &enet->tx_ring;
482 - struct bcm4908enet_dma_ring_slot *slot;
483 + struct bcm4908_enet *enet = netdev_priv(netdev);
484 + struct bcm4908_enet_dma_ring *ring = &enet->tx_ring;
485 + struct bcm4908_enet_dma_ring_slot *slot;
486 struct device *dev = enet->dev;
487 - struct bcm4908enet_dma_ring_bd *buf_desc;
488 + struct bcm4908_enet_dma_ring_bd *buf_desc;
492 @@ -525,7 +526,7 @@ static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev
493 buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr);
494 buf_desc->ctl = cpu_to_le32(tmp);
496 - bcm4908enet_dma_tx_ring_ensable(enet, &enet->tx_ring);
497 + bcm4908_enet_dma_tx_ring_ensable(enet, &enet->tx_ring);
499 if (++ring->write_idx == ring->length - 1)
501 @@ -535,15 +536,15 @@ static int bcm4908enet_start_xmit(struct sk_buff *skb, struct net_device *netdev
505 -static int bcm4908enet_poll(struct napi_struct *napi, int weight)
506 +static int bcm4908_enet_poll(struct napi_struct *napi, int weight)
508 - struct bcm4908enet *enet = container_of(napi, struct bcm4908enet, napi);
509 + struct bcm4908_enet *enet = container_of(napi, struct bcm4908_enet, napi);
510 struct device *dev = enet->dev;
513 while (handled < weight) {
514 - struct bcm4908enet_dma_ring_bd *buf_desc;
515 - struct bcm4908enet_dma_ring_slot slot;
516 + struct bcm4908_enet_dma_ring_bd *buf_desc;
517 + struct bcm4908_enet_dma_ring_slot slot;
521 @@ -556,7 +557,7 @@ static int bcm4908enet_poll(struct napi_struct *napi, int weight)
522 slot = enet->rx_ring.slots[enet->rx_ring.read_idx];
524 /* Provide new buffer before unpinning the old one */
525 - err = bcm4908enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx);
526 + err = bcm4908_enet_dma_alloc_rx_buf(enet, enet->rx_ring.read_idx);
530 @@ -583,24 +584,24 @@ static int bcm4908enet_poll(struct napi_struct *napi, int weight)
532 if (handled < weight) {
533 napi_complete_done(napi, handled);
534 - bcm4908enet_intrs_on(enet);
535 + bcm4908_enet_intrs_on(enet);
541 static const struct net_device_ops bcm96xx_netdev_ops = {
542 - .ndo_open = bcm4908enet_open,
543 - .ndo_stop = bcm4908enet_stop,
544 - .ndo_start_xmit = bcm4908enet_start_xmit,
545 + .ndo_open = bcm4908_enet_open,
546 + .ndo_stop = bcm4908_enet_stop,
547 + .ndo_start_xmit = bcm4908_enet_start_xmit,
548 .ndo_set_mac_address = eth_mac_addr,
551 -static int bcm4908enet_probe(struct platform_device *pdev)
552 +static int bcm4908_enet_probe(struct platform_device *pdev)
554 struct device *dev = &pdev->dev;
555 struct net_device *netdev;
556 - struct bcm4908enet *enet;
557 + struct bcm4908_enet *enet;
560 netdev = devm_alloc_etherdev(dev, sizeof(*enet));
561 @@ -623,7 +624,7 @@ static int bcm4908enet_probe(struct platform_device *pdev)
563 dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
565 - err = bcm4908enet_dma_alloc(enet);
566 + err = bcm4908_enet_dma_alloc(enet);
570 @@ -633,11 +634,11 @@ static int bcm4908enet_probe(struct platform_device *pdev)
571 netdev->min_mtu = ETH_ZLEN;
572 netdev->mtu = ENET_MTU_MAX;
573 netdev->max_mtu = ENET_MTU_MAX;
574 - netif_napi_add(netdev, &enet->napi, bcm4908enet_poll, 64);
575 + netif_napi_add(netdev, &enet->napi, bcm4908_enet_poll, 64);
577 err = register_netdev(netdev);
579 - bcm4908enet_dma_free(enet);
580 + bcm4908_enet_dma_free(enet);
584 @@ -646,31 +647,31 @@ static int bcm4908enet_probe(struct platform_device *pdev)
588 -static int bcm4908enet_remove(struct platform_device *pdev)
589 +static int bcm4908_enet_remove(struct platform_device *pdev)
591 - struct bcm4908enet *enet = platform_get_drvdata(pdev);
592 + struct bcm4908_enet *enet = platform_get_drvdata(pdev);
594 unregister_netdev(enet->netdev);
595 netif_napi_del(&enet->napi);
596 - bcm4908enet_dma_free(enet);
597 + bcm4908_enet_dma_free(enet);
602 -static const struct of_device_id bcm4908enet_of_match[] = {
603 - { .compatible = "brcm,bcm4908enet"},
604 +static const struct of_device_id bcm4908_enet_of_match[] = {
605 + { .compatible = "brcm,bcm4908-enet"},
609 -static struct platform_driver bcm4908enet_driver = {
610 +static struct platform_driver bcm4908_enet_driver = {
612 - .name = "bcm4908enet",
613 - .of_match_table = bcm4908enet_of_match,
614 + .name = "bcm4908_enet",
615 + .of_match_table = bcm4908_enet_of_match,
617 - .probe = bcm4908enet_probe,
618 - .remove = bcm4908enet_remove,
619 + .probe = bcm4908_enet_probe,
620 + .remove = bcm4908_enet_remove,
622 -module_platform_driver(bcm4908enet_driver);
623 +module_platform_driver(bcm4908_enet_driver);
625 MODULE_LICENSE("GPL v2");
626 -MODULE_DEVICE_TABLE(of, bcm4908enet_of_match);
627 +MODULE_DEVICE_TABLE(of, bcm4908_enet_of_match);
628 diff --git a/drivers/net/ethernet/broadcom/bcm4908enet.h b/drivers/net/ethernet/broadcom/bcm4908_enet.h
630 rename from drivers/net/ethernet/broadcom/bcm4908enet.h
631 rename to drivers/net/ethernet/broadcom/bcm4908_enet.h
632 index 11aadf0715d3..8a3ede2da537 100644
633 --- a/drivers/net/ethernet/broadcom/bcm4908enet.h
634 +++ b/drivers/net/ethernet/broadcom/bcm4908_enet.h
636 /* SPDX-License-Identifier: GPL-2.0-only */
637 -#ifndef __BCM4908ENET_H
638 -#define __BCM4908ENET_H
639 +#ifndef __BCM4908_ENET_H
640 +#define __BCM4908_ENET_H
642 #define ENET_CONTROL 0x000
643 #define ENET_MIB_CTRL 0x004