[U-Boot] net: gpio PHY driver

Darius Augulis augulis.darius at gmail.com
Wed Jul 1 20:54:45 CEST 2009


On 07/01/2009 09:43 PM, Richard Retanubun wrote:
> Darius Augulis wrote:
> [snip]
>> No, my system is not MPC based. I'm working on new board and CPU
>> (Gemini) support in u-boot. My SoC has two GMAC controllers.
>> btw, what is the right way to add new Ethernet driver?
>> Should I define CONFIG_CMD_NET and CONFIG_NET_MULTI in my board config?
>  > Or should I define eth_* funtions right in the driver code?
>
> I'm not an expert on the network code, but here's what I know
>
> *I think* CONFIG_CMD_NET just turns on network commands,
> CONFIG_NET_MULTI says you have more than one MAC?

I found #if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI)
statement in net/eth.c
Under this ifdef, are eth_* functions, which are needed by net.c
If my driver does not have these plain eth functions and I don't define 
these two labels, u-boot build fails when linking, because no eth_* 
functions there.
So, it's strange. If I don't need NET commands but have such a multi-eth 
driver, it would not work?...

> I recall some conversations about it being discussed recently in the
> mailing list, try grep-ing it for that
> and check the README.
>
> (If you haven't already)
> look at u-boot/include/net.h, I think this is the functions that and
> ethernet driver needs to have defined.
> look at u-boot/drivers/net/Makefile to see how to make u-boot build your
> driver by defining a new
> #define CONFIG_MY_DRIVER_NAME and adding and entry there.
>
> my exposure to the code have been mostly for powerpc and coldfire, for
> coldfire their ethernet driver
> code is drivers/net/mcffec.c and /drivers/net/mcfmii.c, obviously this
> would not be what you need
> but it is an example.

yes, I saw this driver allready. May be I will use this as example.

>
> As always, check with the git tree on kernel.org, someone might have
> already done it for linux, in which case
> you can try porting it into u-boot.

Unfortunately there isn't ethernet driver for Gemini in Linux.
We are working on this now (both for u-boot and for Linux).


regards,
Darius

>
> cheers,
>
> - Richard
>
>
>
>
>
>
>
>



More information about the U-Boot mailing list