* [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA
@ 2006-11-01 11:22 Kalle Pokki
2006-11-01 11:37 ` Vitaly Bordug
0 siblings, 1 reply; 2+ messages in thread
From: Kalle Pokki @ 2006-11-01 11:22 UTC (permalink / raw)
To: linuxppc-embedded, Paul Mackerras, Vitaly Bordug
The PHY abstraction layer expects to receive 0xffff when
reading PHY registers if there is no PHY at that address. The
all-ones condition is guaranteed by the pull-up in the MDIO line, so
there is no need to check for the TA bits.
With this, the PHY layer is able to probe the MDIO bus as it expects.
This also removes one board dependency from the fs_enet driver, as there
is no need to set the phy_mask bits anymore.
Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi>
---
drivers/net/fs_enet/mii-bitbang.c | 17 ++---------------
1 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index 0b9b8b5..af36f3e 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -194,19 +194,6 @@ static int fs_enet_mii_bb_read(struct mi
mdc(bitbang, 1);
mii_delay(bitbang);
- /* check the turnaround bit: the PHY should be driving it to zero */
- if (mdio_read(bitbang) != 0) {
- /* PHY didn't drive TA low */
- for (j = 0; j < 32; j++) {
- mdc(bitbang, 0);
- mii_delay(bitbang);
- mdc(bitbang, 1);
- mii_delay(bitbang);
- }
- ret = -1;
- goto out;
- }
-
mdc(bitbang, 0);
mii_delay(bitbang);
@@ -229,7 +216,7 @@ static int fs_enet_mii_bb_read(struct mi
mii_delay(bitbang);
ret = rdreg;
-out:
+
return ret;
}
@@ -338,7 +325,7 @@ static int __devinit fs_enet_mdio_probe(
new_bus->reset = &fs_enet_mii_bb_reset,
new_bus->id = pdev->id;
- new_bus->phy_mask = ~0x9;
+ new_bus->phy_mask = 0;
pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data;
if (NULL == pdata) {
--
1.4.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA
2006-11-01 11:22 [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA Kalle Pokki
@ 2006-11-01 11:37 ` Vitaly Bordug
0 siblings, 0 replies; 2+ messages in thread
From: Vitaly Bordug @ 2006-11-01 11:37 UTC (permalink / raw)
To: Kalle Pokki; +Cc: Paul Mackerras, linuxppc-embedded
[-- Attachment #1: Type: text/plain, Size: 728 bytes --]
On Wed, 1 Nov 2006 13:22:17 +0200 (EET)
Kalle Pokki wrote:
> The PHY abstraction layer expects to receive 0xffff when
> reading PHY registers if there is no PHY at that address. The
> all-ones condition is guaranteed by the pull-up in the MDIO line, so
> there is no need to check for the TA bits.
>
> With this, the PHY layer is able to probe the MDIO bus as it expects.
> This also removes one board dependency from the fs_enet driver, as
> there is no need to set the phy_mask bits anymore.
>
> Signed-off-by: Kalle Pokki <kalle.pokki@iki.fi>
At the first sight this it OK.
I'll give it a try, prolly add some bits and forward along with the other
fs_enet stuff residing in todo.
Thanks,
-Vitaly
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-01 11:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-01 11:22 [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA Kalle Pokki
2006-11-01 11:37 ` Vitaly Bordug
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).