All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] bitbang phy driver
@ 2009-08-04 20:42 Darius Augulis
  2009-08-04 21:12 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Darius Augulis @ 2009-08-04 20:42 UTC (permalink / raw)
  To: u-boot

Hi all,

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 
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 
please suggest other solution to make optimize this driver.

Regards,
Darius A.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch-bbmii-gpio
Url: http://lists.denx.de/pipermail/u-boot/attachments/20090804/609f6daf/attachment.txt 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] bitbang phy driver
  2009-08-04 20:42 [U-Boot] bitbang phy driver Darius Augulis
@ 2009-08-04 21:12 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2009-08-04 21:12 UTC (permalink / raw)
  To: u-boot

Dear Darius Augulis,

In message <4A789D2F.1050405@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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-04 21:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-04 20:42 [U-Boot] bitbang phy driver Darius Augulis
2009-08-04 21:12 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.