[U-Boot] [PATCH v2 07/12] net: gmac_rk3288: Add RK3288 GMAC driver

Sjoerd Simons sjoerd.simons at collabora.co.uk
Fri Mar 11 22:56:46 CET 2016


On Mon, 2016-02-29 at 19:03 -0700, Simon Glass wrote:
> Hi Sjoerd,
> 
> On 28 February 2016 at 14:25, Sjoerd Simons
> <sjoerd.simons at collabora.co.uk> wrote:
> > 
>> > diff --git a/drivers/net/gmac_rk3288.c b/drivers/net/gmac_rk3288.c
> > new file mode 100644
> > index 0000000..5400b2c
> > --- /dev/null
> > +++ b/drivers/net/gmac_rk3288.c
> > @@ -0,0 +1,125 @@
>> > +       priv->fix_mac_speed = gmac_rk3288_fix_mac_speed;
> > +
> > +       return designware_eth_probe(dev);
> This presumably called gmac_rk3288_fix_mac_speed(). Is it possible to
> split the init so that you can call gmac_rk3288_fix_mac_speed()
> directly here?

No it gets called down the line from dw eth_ops start function once the
ethernet driver is started and the phy speed is known so the mac can be
adjust to match.

So to do it in the driver, it would need to override the eth start op
from its parent. Possible by exporting more of the designwares
implementation so specific ops can be overridden. 

Seems less elegant then having a hook in the semantically right spot
(e.g. after the link speed is determined)?

Ooi what's your worry with function pointers in DM ?



-- 
Sjoerd Simons
Collabora Ltd.


More information about the U-Boot mailing list