[U-Boot] 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.

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);
MIIDELAY;mii_mdc_set(0);
MDC (1);
MIIDELAY;mii_mdc_set(1);
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
participants (2)
-
Darius Augulis
-
Wolfgang Denk