[PATCH 06/10] net: orion-gbe: use transparent-to-driver of mdio functions

Sascha Hauer s.hauer at pengutronix.de
Mon Aug 4 11:42:53 PDT 2014


On Sat, Aug 02, 2014 at 02:44:15PM -0300, Ezequiel Garcia wrote:
> Hello Sascha,
> 
> On 21 May 02:18 PM, Sascha Hauer wrote:
> [..]
> >  
> > +	sprintf(dev->name, "orion-gbe-port");
> > +	dev->id = port->portno;
> > +	dev->parent = parent;
> > +	dev->device_node = port->np;
> > +	ret = register_device(dev);
> > +	if (ret)
> > +		return ret;
> > +
> 
> Can you clarify why you added this device register? I didn't find the need
> to do so in the mvneta driver, but maybe I overlooked something.

This is only needed because the orion-gbe has multiple ports which have
individual subnodes in the device tree. Without registering a device on
these subnodes barebox won't find the phys for the ports.

This is not needed when you only have a single node for your ethernet
device.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list