[U-Boot] bitbang phy driver

Wolfgang Denk wd at denx.de
Tue Aug 4 23:12:03 CEST 2009


Dear Darius Augulis,

In message <4A789D2F.1050405 at gmail.com> you wrote:
> 
> I see that miiphybb.c driver is used only with PPC architecture yet.
> I would like to use it with ARM. Would be it reasonable to make this 
> driver arch independent? I have small patch and it changes defined ports 
> and pins with function calls, which should be provided by each CPU. I 

Hm... I fail to see why such a change is needed.

> attached this patch for RFC. If it is suitable, I may need help with 
> changing all > 20 PPC boards using this driver, because I don't have 
> experience with PPC. Would be there some volunteers willing to help? Or 

Sure. The plan (to make this architecture independent) makes a lot
sense.

...
> -	MDIO_ACTIVE;
> -	MDIO (1);
> +	mii_mdio_active(1);
> +	mii_mdio_set(1);
>  	for (j = 0; j < 32; j++) {
> -		MDC (0);
> +		mii_mdc_set(0);
>  		MIIDELAY;
> -		MDC (1);
> +		mii_mdc_set(1);
>  		MIIDELAY;

Why are these changes necessary?

Why cannot you simple add this to your board config file:

	#define MDIO_ACTIVE	mii_mdio_active(1)
	#define MDIO(x)		mii_mdio_set(x)
	#define MDC(x)		mii_mdc_set(x)
	...

?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A year spent in artificial intelligence is enough to make one believe
in God.


More information about the U-Boot mailing list