1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (c) 2021 Nuvoton Technology Corp.
17 #include <linux/err.h>
18 #include <linux/iopoll.h>
20 #define MAC_ADDR_SIZE 6
21 #define CONFIG_TX_DESCR_NUM 32
22 #define CONFIG_RX_DESCR_NUM 32
24 #define TX_TOTAL_BUFSIZE \
25 ((CONFIG_TX_DESCR_NUM + 1) * PKTSIZE_ALIGN + PKTALIGN)
26 #define RX_TOTAL_BUFSIZE \
27 ((CONFIG_RX_DESCR_NUM + 1) * PKTSIZE_ALIGN + PKTALIGN)
29 #define CONFIG_MDIO_TIMEOUT (3 * CONFIG_SYS_HZ)
34 unsigned int reserved;
36 } __aligned(ARCH_DMA_MINALIGN);
43 } __aligned(ARCH_DMA_MINALIGN);
46 u32 camcmr; /* 0x00 */
68 u32 cam10m; /* 0x58 */
69 u32 cam10l; /* 0x5c */
70 u32 cam11m; /* 0x60 */
71 u32 cam11l; /* 0x64 */
72 u32 cam12m; /* 0x68 */
73 u32 cam12l; /* 0x6c */
74 u32 cam13m; /* 0x70 */
75 u32 cam13l; /* 0x74 */
76 u32 cam14m; /* 0x78 */
77 u32 cam14l; /* 0x7c */
78 u32 cam15m; /* 0x80 */
79 u32 cam15l; /* 0x84 */
80 u32 txdlsa; /* 0x88 */
81 u32 rxdlsa; /* 0x8c */
88 u32 dmarfc; /* 0xa8 */
96 u32 dmarfs; /* 0xc8 */
97 u32 ctxdsa; /* 0xcc */
98 u32 ctxbsa; /* 0xd0 */
99 u32 crxdsa; /* 0xd4 */
100 u32 crxbsa; /* 0xd8 */
103 struct npcm750_eth_dev {
104 struct npcm750_txbd tdesc[CONFIG_TX_DESCR_NUM] __aligned(ARCH_DMA_MINALIGN);
105 struct npcm750_rxbd rdesc[CONFIG_RX_DESCR_NUM] __aligned(ARCH_DMA_MINALIGN);
106 u8 txbuffs[TX_TOTAL_BUFSIZE] __aligned(ARCH_DMA_MINALIGN);
107 u8 rxbuffs[RX_TOTAL_BUFSIZE] __aligned(ARCH_DMA_MINALIGN);
108 struct emc_regs *emc_regs_p;
109 struct phy_device *phydev;
111 struct npcm750_txbd *curr_txd;
112 struct npcm750_rxbd *curr_rxd;
116 struct regmap *gcr_regmap;
119 struct npcm750_eth_pdata {
120 struct eth_pdata eth_pdata;
123 /* mac controller bit */
124 #define MCMDR_RXON BIT(0)
125 #define MCMDR_ACP BIT(3)
126 #define MCMDR_SPCRC BIT(5)
127 #define MCMDR_TXON BIT(8)
128 #define MCMDR_NDEF BIT(9)
129 #define MCMDR_FDUP BIT(18)
130 #define MCMDR_ENMDC BIT(19)
131 #define MCMDR_OPMOD BIT(20)
132 #define MCMDR_SWR BIT(24)
134 /* cam command regiser */
135 #define CAMCMR_AUP 0x01
136 #define CAMCMR_AMP BIT(1)
137 #define CAMCMR_ABP BIT(2)
138 #define CAMCMR_CCAM BIT(3)
139 #define CAMCMR_ECMP BIT(4)
142 /* mac mii controller bit */
143 #define MDCON BIT(19)
145 #define PHYWR BIT(16)
146 #define PHYBUSY BIT(17)
147 #define PHYPRESP BIT(18)
148 #define CAM_ENTRY_SIZE 0x08
150 /* rx and tx status */
151 #define TXDS_TXCP BIT(19)
152 #define RXDS_CRCE BIT(17)
153 #define RXDS_PTLE BIT(19)
154 #define RXDS_RXGD BIT(20)
155 #define RXDS_ALIE BIT(21)
156 #define RXDS_RP BIT(22)
158 /* mac interrupt status*/
159 #define MISTA_RXINTR BIT(0)
160 #define MISTA_CRCE BIT(1)
161 #define MISTA_RXOV BIT(2)
162 #define MISTA_PTLE BIT(3)
163 #define MISTA_RXGD BIT(4)
164 #define MISTA_ALIE BIT(5)
165 #define MISTA_RP BIT(6)
166 #define MISTA_MMP BIT(7)
167 #define MISTA_DFOI BIT(8)
168 #define MISTA_DENI BIT(9)
169 #define MISTA_RDU BIT(10)
170 #define MISTA_RXBERR BIT(11)
171 #define MISTA_CFR BIT(14)
172 #define MISTA_TXINTR BIT(16)
173 #define MISTA_TXEMP BIT(17)
174 #define MISTA_TXCP BIT(18)
175 #define MISTA_EXDEF BIT(19)
176 #define MISTA_NCS BIT(20)
177 #define MISTA_TXABT BIT(21)
178 #define MISTA_LC BIT(22)
179 #define MISTA_TDU BIT(23)
180 #define MISTA_TXBERR BIT(24)
183 #define ENRXINTR BIT(0)
184 #define ENCRCE BIT(1)
185 #define EMRXOV BIT(2)
186 #define ENPTLE BIT(3)
187 #define ENRXGD BIT(4)
188 #define ENALIE BIT(5)
192 #define ENDENI BIT(9)
193 #define ENRDU BIT(10)
194 #define ENRXBERR BIT(11)
195 #define ENCFR BIT(14)
196 #define ENTXINTR BIT(16)
197 #define ENTXEMP BIT(17)
198 #define ENTXCP BIT(18)
199 #define ENTXDEF BIT(19)
200 #define ENNCS BIT(20)
201 #define ENTXABT BIT(21)
203 #define ENTDU BIT(23)
204 #define ENTXBERR BIT(24)
206 #define RX_STAT_RBC 0xffff
207 #define RX_STAT_RXINTR BIT(16)
208 #define RX_STAT_CRCE BIT(17)
209 #define RX_STAT_PTLE BIT(19)
210 #define RX_STAT_RXGD BIT(20)
211 #define RX_STAT_ALIE BIT(21)
212 #define RX_STAT_RP BIT(22)
213 #define RX_STAT_OWNER (BIT(30) | BIT(31))
215 #define TX_STAT_TBC 0xffff
216 #define TX_STAT_TXINTR BIT(16)
217 #define TX_STAT_DEF BIT(17)
218 #define TX_STAT_TXCP BIT(19)
219 #define TX_STAT_EXDEF BIT(20)
220 #define TX_STAT_NCS BIT(21)
221 #define TX_STAT_TXBT BIT(22)
222 #define TX_STAT_LC BIT(23)
223 #define TX_STAT_TXHA BIT(24)
224 #define TX_STAT_PAU BIT(25)
225 #define TX_STAT_SQE BIT(26)
227 /* rx and tx owner bit */
228 #define RX_OWEN_DMA BIT(31)
229 #define RX_OWEN_CPU 0x00 //bit 30 & bit 31
230 #define TX_OWEN_DMA BIT(31)
231 #define TX_OWEN_CPU (~(BIT(31)))
233 /* tx frame desc controller bit */
234 #define MACTXINTEN 0x04
236 #define PADDINGMODE 0x01
238 /* fftcr controller bit */
240 #define TXTHD (BIT(8) | BIT(9))
241 #define BLENGTH BIT(21)
243 /* global setting for driver */
244 #define RX_DESC_SIZE 128
245 #define TX_DESC_SIZE 64
246 #define MAX_RBUFF_SZ 0x600
247 #define MAX_TBUFF_SZ 0x600
248 #define TX_TIMEOUT 50
251 #define RX_POLL_SIZE (RX_DESC_SIZE / 2)
252 #define MII_TIMEOUT 100
253 #define GCR_INTCR 0x3c
254 #define INTCR_R1EN BIT(5)
257 MIIDA_MDCCR_4 = 0x00,
258 MIIDA_MDCCR_6 = 0x01,
259 MIIDA_MDCCR_8 = 0x02,
260 MIIDA_MDCCR_12 = 0x03,
261 MIIDA_MDCCR_16 = 0x04,
262 MIIDA_MDCCR_20 = 0x05,
263 MIIDA_MDCCR_24 = 0x06,
264 MIIDA_MDCCR_28 = 0x07,
265 MIIDA_MDCCR_30 = 0x08,
266 MIIDA_MDCCR_32 = 0x09,
267 MIIDA_MDCCR_36 = 0x0A,
268 MIIDA_MDCCR_40 = 0x0B,
269 MIIDA_MDCCR_44 = 0x0C,
270 MIIDA_MDCCR_48 = 0x0D,
271 MIIDA_MDCCR_54 = 0x0E,
272 MIIDA_MDCCR_60 = 0x0F,
275 DECLARE_GLOBAL_DATA_PTR;
277 static int npcm750_mdio_read(struct mii_dev *bus, int addr, int devad, int regs)
279 struct npcm750_eth_dev *priv = (struct npcm750_eth_dev *)bus->priv;
280 struct emc_regs *reg = priv->emc_regs_p;
282 int timeout = CONFIG_MDIO_TIMEOUT;
284 val = (addr << 0x08) | regs | PHYBUSY | (MIIDA_MDCCR_60 << 20);
285 writel(val, ®->miida);
287 start = get_timer(0);
288 while (get_timer(start) < timeout) {
289 if (!(readl(®->miida) & PHYBUSY)) {
290 val = readl(®->miid);
298 static int npcm750_mdio_write(struct mii_dev *bus, int addr, int devad, int regs,
301 struct npcm750_eth_dev *priv = (struct npcm750_eth_dev *)bus->priv;
302 struct emc_regs *reg = priv->emc_regs_p;
304 int ret = -ETIMEDOUT, timeout = CONFIG_MDIO_TIMEOUT;
306 writel(val, ®->miid);
307 writel((addr << 0x08) | regs | PHYBUSY | PHYWR | (MIIDA_MDCCR_60 << 20), ®->miida);
309 start = get_timer(0);
310 while (get_timer(start) < timeout) {
311 if (!(readl(®->miida) & PHYBUSY)) {
320 static int npcm750_mdio_reset(struct mii_dev *bus)
325 static int npcm750_mdio_init(const char *name, struct npcm750_eth_dev *priv)
327 struct emc_regs *reg = priv->emc_regs_p;
328 struct mii_dev *bus = mdio_alloc();
331 printf("Failed to allocate MDIO bus\n");
335 bus->read = npcm750_mdio_read;
336 bus->write = npcm750_mdio_write;
337 snprintf(bus->name, sizeof(bus->name), "%s", name);
338 bus->reset = npcm750_mdio_reset;
340 bus->priv = (void *)priv;
342 writel(readl(®->mcmdr) | MCMDR_ENMDC, ®->mcmdr);
343 return mdio_register(bus);
346 static void npcm750_tx_descs_init(struct npcm750_eth_dev *priv)
348 struct emc_regs *reg = priv->emc_regs_p;
349 struct npcm750_txbd *desc_table_p = &priv->tdesc[0];
350 struct npcm750_txbd *desc_p;
351 u8 *txbuffs = &priv->txbuffs[0];
354 writel((u32)desc_table_p, ®->txdlsa);
355 priv->curr_txd = desc_table_p;
357 for (idx = 0; idx < CONFIG_TX_DESCR_NUM; idx++) {
358 desc_p = &desc_table_p[idx];
359 desc_p->buffer = (u32)&txbuffs[idx * PKTSIZE_ALIGN];
362 desc_p->mode = TX_OWEN_CPU | PADDINGMODE | CRCMODE | MACTXINTEN;
363 if (idx < (CONFIG_TX_DESCR_NUM - 1))
364 desc_p->next = (u32)&desc_table_p[idx + 1];
366 desc_p->next = (u32)&priv->tdesc[0];
368 flush_dcache_range((ulong)&desc_table_p[0],
369 (ulong)&desc_table_p[CONFIG_TX_DESCR_NUM]);
372 static void npcm750_rx_descs_init(struct npcm750_eth_dev *priv)
374 struct emc_regs *reg = priv->emc_regs_p;
375 struct npcm750_rxbd *desc_table_p = &priv->rdesc[0];
376 struct npcm750_rxbd *desc_p;
377 u8 *rxbuffs = &priv->rxbuffs[0];
380 flush_dcache_range((ulong)priv->rxbuffs[0],
381 (ulong)priv->rxbuffs[CONFIG_RX_DESCR_NUM]);
383 writel((u32)desc_table_p, ®->rxdlsa);
384 priv->curr_rxd = desc_table_p;
386 for (idx = 0; idx < CONFIG_RX_DESCR_NUM; idx++) {
387 desc_p = &desc_table_p[idx];
388 desc_p->sl = RX_OWEN_DMA;
389 desc_p->buffer = (u32)&rxbuffs[idx * PKTSIZE_ALIGN];
390 if (idx < (CONFIG_RX_DESCR_NUM - 1))
391 desc_p->next = (u32)&desc_table_p[idx + 1];
393 desc_p->next = (u32)&priv->rdesc[0];
395 flush_dcache_range((ulong)&desc_table_p[0],
396 (ulong)&desc_table_p[CONFIG_RX_DESCR_NUM]);
399 static void npcm750_set_fifo_threshold(struct npcm750_eth_dev *priv)
401 struct emc_regs *reg = priv->emc_regs_p;
404 val = RXTHD | TXTHD | BLENGTH;
405 writel(val, ®->fftcr);
408 static void npcm750_set_global_maccmd(struct npcm750_eth_dev *priv)
410 struct emc_regs *reg = priv->emc_regs_p;
413 val = readl(®->mcmdr);
414 val |= MCMDR_SPCRC | MCMDR_ENMDC | MCMDR_ACP | MCMDR_NDEF;
415 writel(val, ®->mcmdr);
418 static void npcm750_set_cam(struct npcm750_eth_dev *priv,
419 unsigned int x, unsigned char *pval)
421 struct emc_regs *reg = priv->emc_regs_p;
422 unsigned int msw, lsw;
424 msw = (pval[0] << 24) | (pval[1] << 16) | (pval[2] << 8) | pval[3];
425 lsw = (pval[4] << 24) | (pval[5] << 16);
427 writel(lsw, ®->cam0l + x * CAM_ENTRY_SIZE);
428 writel(msw, ®->cam0m + x * CAM_ENTRY_SIZE);
429 writel(readl(®->camen) | CAM0EN, ®->camen);
430 writel(CAMCMR_ECMP | CAMCMR_ABP | CAMCMR_AUP, ®->camcmr);
433 static void npcm750_adjust_link(struct emc_regs *reg,
434 struct phy_device *phydev)
436 u32 val = readl(®->mcmdr);
439 printf("%s: No link.\n", phydev->dev->name);
443 if (phydev->speed == 100)
453 writel(val, ®->mcmdr);
455 debug("Speed: %d, %s duplex%s\n", phydev->speed,
456 (phydev->duplex) ? "full" : "half",
457 (phydev->port == PORT_FIBRE) ? ", fiber mode" : "");
460 static int npcm750_phy_init(struct npcm750_eth_dev *priv, void *dev)
462 struct phy_device *phydev;
466 phydev = phy_connect(priv->bus, address, dev, priv->interface);
470 if (priv->max_speed) {
471 ret = phy_set_supported(phydev, priv->max_speed);
475 phydev->advertising = phydev->supported;
477 priv->phydev = phydev;
482 static int npcm750_eth_start(struct udevice *dev)
484 struct eth_pdata *pdata = dev_get_plat(dev);
485 struct npcm750_eth_dev *priv = dev_get_priv(dev);
486 struct emc_regs *reg = priv->emc_regs_p;
487 u8 *enetaddr = pdata->enetaddr;
490 writel(readl(®->mcmdr) & ~MCMDR_TXON & ~MCMDR_RXON, ®->mcmdr);
492 writel(readl(®->mcmdr) | MCMDR_SWR, ®->mcmdr);
494 ret = readl(®->mcmdr);
495 } while (ret & MCMDR_SWR);
497 npcm750_rx_descs_init(priv);
498 npcm750_tx_descs_init(priv);
500 npcm750_set_cam(priv, priv->idx, enetaddr);
501 npcm750_set_global_maccmd(priv);
502 npcm750_set_fifo_threshold(priv);
504 /* Start up the PHY */
505 ret = phy_startup(priv->phydev);
507 printf("Could not initialize PHY\n");
511 npcm750_adjust_link(reg, priv->phydev);
512 writel(readl(®->mcmdr) | MCMDR_TXON | MCMDR_RXON, ®->mcmdr);
517 static int npcm750_eth_send(struct udevice *dev, void *packet, int length)
519 struct npcm750_eth_dev *priv = dev_get_priv(dev);
520 struct emc_regs *reg = priv->emc_regs_p;
521 struct npcm750_txbd *desc_p;
522 struct npcm750_txbd *next_desc_p;
524 desc_p = priv->curr_txd;
526 invalidate_dcache_range((ulong)desc_p, (ulong)(desc_p + 1));
527 /* Check if the descriptor is owned by CPU */
528 if (desc_p->mode & TX_OWEN_DMA) {
529 next_desc_p = (struct npcm750_txbd *)desc_p->next;
531 while ((next_desc_p != desc_p) && (next_desc_p->mode & TX_OWEN_DMA))
532 next_desc_p = (struct npcm750_txbd *)next_desc_p->next;
534 if (next_desc_p == desc_p) {
535 struct emc_regs *reg = priv->emc_regs_p;
537 writel(0, ®->tsdr);
538 serial_printf("TX: overflow and exit\n");
542 desc_p = next_desc_p;
545 memcpy((void *)desc_p->buffer, packet, length);
546 flush_dcache_range((ulong)desc_p->buffer,
547 (ulong)desc_p->buffer + roundup(length, ARCH_DMA_MINALIGN));
549 desc_p->sl = length & TX_STAT_TBC;
550 desc_p->mode = TX_OWEN_DMA | PADDINGMODE | CRCMODE;
551 flush_dcache_range((ulong)desc_p, (ulong)(desc_p + 1));
553 if (!(readl(®->mcmdr) & MCMDR_TXON))
554 writel(readl(®->mcmdr) | MCMDR_TXON, ®->mcmdr);
555 priv->curr_txd = (struct npcm750_txbd *)priv->curr_txd->next;
557 writel(0, ®->tsdr);
561 static int npcm750_eth_recv(struct udevice *dev, int flags, uchar **packetp)
563 struct npcm750_eth_dev *priv = dev_get_priv(dev);
564 struct npcm750_rxbd *desc_p;
565 struct npcm750_rxbd *next_desc_p;
568 desc_p = priv->curr_rxd;
569 invalidate_dcache_range((ulong)desc_p, (ulong)(desc_p + 1));
571 if ((desc_p->sl & RX_STAT_OWNER) == RX_OWEN_DMA) {
572 next_desc_p = (struct npcm750_rxbd *)desc_p->next;
573 while ((next_desc_p != desc_p) &&
574 ((next_desc_p->sl & RX_STAT_OWNER) == RX_OWEN_CPU)) {
575 next_desc_p = (struct npcm750_rxbd *)next_desc_p->next;
578 if (next_desc_p == desc_p) {
579 struct emc_regs *reg = priv->emc_regs_p;
581 writel(0, ®->rsdr);
582 serial_printf("RX: overflow and exit\n");
585 desc_p = next_desc_p;
588 /* Check if the descriptor is owned by CPU */
589 if ((desc_p->sl & RX_STAT_OWNER) == RX_OWEN_CPU) {
590 if (desc_p->sl & RX_STAT_RXGD) {
591 length = desc_p->sl & RX_STAT_RBC;
592 invalidate_dcache_range((ulong)desc_p->buffer,
593 (ulong)(desc_p->buffer + roundup(length,
594 ARCH_DMA_MINALIGN)));
595 *packetp = (u8 *)(u32)desc_p->buffer;
596 priv->curr_rxd = desc_p;
602 static int npcm750_eth_free_pkt(struct udevice *dev, uchar *packet, int length)
604 struct npcm750_eth_dev *priv = dev_get_priv(dev);
605 struct emc_regs *reg = priv->emc_regs_p;
606 struct npcm750_rxbd *desc_p = priv->curr_rxd;
609 * Make the current descriptor valid again and go to
612 desc_p->sl |= RX_OWEN_DMA;
613 flush_dcache_range((ulong)desc_p, (ulong)(desc_p + 1));
614 priv->curr_rxd = (struct npcm750_rxbd *)priv->curr_rxd->next;
615 writel(0, ®->rsdr);
620 static void npcm750_eth_stop(struct udevice *dev)
622 struct npcm750_eth_dev *priv = dev_get_priv(dev);
623 struct emc_regs *reg = priv->emc_regs_p;
625 writel(readl(®->mcmdr) & ~MCMDR_TXON, ®->mcmdr);
626 writel(readl(®->mcmdr) & ~MCMDR_RXON, ®->mcmdr);
627 priv->curr_txd = (struct npcm750_txbd *)readl(®->txdlsa);
628 priv->curr_rxd = (struct npcm750_rxbd *)readl(®->rxdlsa);
629 phy_shutdown(priv->phydev);
632 static int npcm750_eth_write_hwaddr(struct udevice *dev)
634 struct eth_pdata *pdata = dev_get_plat(dev);
635 struct npcm750_eth_dev *priv = dev_get_priv(dev);
637 npcm750_set_cam(priv, CAM0, pdata->enetaddr);
641 static int npcm750_eth_bind(struct udevice *dev)
646 static int npcm750_eth_probe(struct udevice *dev)
648 struct eth_pdata *pdata = dev_get_plat(dev);
649 struct npcm750_eth_dev *priv = dev_get_priv(dev);
650 u32 iobase = pdata->iobase;
653 memset(priv, 0, sizeof(struct npcm750_eth_dev));
654 ret = dev_read_u32(dev, "id", &priv->idx);
656 printf("failed to get id\n");
660 priv->gcr_regmap = syscon_regmap_lookup_by_phandle(dev, "syscon-gcr");
661 if (IS_ERR(priv->gcr_regmap))
664 priv->emc_regs_p = (struct emc_regs *)iobase;
665 priv->interface = pdata->phy_interface;
666 priv->max_speed = pdata->max_speed;
668 if (priv->idx == 0) {
669 /* Enable RMII for EMC1 module */
670 regmap_update_bits(priv->gcr_regmap, GCR_INTCR, INTCR_R1EN, INTCR_R1EN);
673 npcm750_mdio_init(dev->name, priv);
674 priv->bus = miiphy_get_dev_by_name(dev->name);
676 ret = npcm750_phy_init(priv, dev);
681 static int npcm750_eth_remove(struct udevice *dev)
683 struct npcm750_eth_dev *priv = dev_get_priv(dev);
686 mdio_unregister(priv->bus);
687 mdio_free(priv->bus);
692 static const struct eth_ops npcm750_eth_ops = {
693 .start = npcm750_eth_start,
694 .send = npcm750_eth_send,
695 .recv = npcm750_eth_recv,
696 .free_pkt = npcm750_eth_free_pkt,
697 .stop = npcm750_eth_stop,
698 .write_hwaddr = npcm750_eth_write_hwaddr,
701 static int npcm750_eth_ofdata_to_platdata(struct udevice *dev)
703 struct npcm750_eth_pdata *npcm750_pdata = dev_get_plat(dev);
704 struct eth_pdata *pdata = &npcm750_pdata->eth_pdata;
705 const char *phy_mode;
709 pdata->iobase = (phys_addr_t)dev_read_addr_ptr(dev);
711 pdata->phy_interface = -1;
712 phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode", NULL);
714 pdata->phy_interface = phy_get_interface_by_name(phy_mode);
715 if (pdata->phy_interface == -1) {
716 printf("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
720 pdata->max_speed = 0;
721 cell = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "max-speed", NULL);
723 pdata->max_speed = fdt32_to_cpu(*cell);
728 static const struct udevice_id npcm750_eth_ids[] = {
729 { .compatible = "nuvoton,npcm750-emc" },
733 U_BOOT_DRIVER(eth_npcm750) = {
734 .name = "eth_npcm750",
736 .of_match = npcm750_eth_ids,
737 .of_to_plat = npcm750_eth_ofdata_to_platdata,
738 .bind = npcm750_eth_bind,
739 .probe = npcm750_eth_probe,
740 .remove = npcm750_eth_remove,
741 .ops = &npcm750_eth_ops,
742 .priv_auto = sizeof(struct npcm750_eth_dev),
743 .plat_auto = sizeof(struct npcm750_eth_pdata),
744 .flags = DM_FLAG_ALLOC_PRIV_DMA,