bitbang phy driver
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
Dear Darius Augulis,
Quoted 5 lines · In message <[email protected]> you wrote:
I see that
miiphybb.cdriver 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.
Quoted 3 lines
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.
...
Review
Quoted 11 lines
(quoted diff) +4
-4- 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
Signature · 5 lines
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.