Hi Joe, > -----Original Message----- > From: Joe Hershberger [mailto:joe.hershber...@ni.com] > Sent: Wednesday, December 06, 2017 1:44 AM > To: Calvin Johnson <calvin.john...@nxp.com> > Cc: u-boot <u-boot@lists.denx.de>; Joe Hershberger > <joe.hershber...@ni.com>; Anji Jagarlmudi <anji.jagarlm...@nxp.com> > Subject: Re: [U-Boot] [PATCH 1/9] drivers: net: pfe_eth: LS1012A PFE driver > introduction > > On Mon, Oct 9, 2017 at 4:11 AM, Calvin Johnson <calvin.john...@nxp.com> > wrote: > > This patch adds PFE driver into U-Boot.
[snip] > > + if (dev_id > 1) { > > + printf("Invalid port\n"); > > + return -1; > > + } > > + > > + dev = (struct eth_device *)malloc(sizeof(struct eth_device)); > > Please don't add a new driver that uses the legacy API. Make this a > driver model driver. PFE IP has two MACs. In the legacy driver model, we were registering two ethernet devices/interfaces, pfe_eth0 and pfe_eth1. With the new driver model, I'm wondering whether we can do the same. IIUC, U_BOOT_DEVICE corresponds to PFE IP on the LS1012A platform and struct eth_pdata corresponds to each MAC. Is this correct? If yes, how can we register two interfaces, pfe_eth0 and pfe_eth1? Please advice. Thanks Calvin _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot