From: Kalle Pokki <kalle.pokki@iki.fi>
To: linuxppc-embedded@ozlabs.org, Paul Mackerras <paulus@samba.org>,
Vitaly Bordug <vbordug@ru.mvista.com>
Subject: [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA
Date: Wed, 1 Nov 2006 13:22:17 +0200 (EET) [thread overview]
Message-ID: <Pine.LNX.4.64.0611011317280.848@host32.eke.fi> (raw)
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
next reply other threads:[~2006-11-01 11:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-01 11:22 Kalle Pokki [this message]
2006-11-01 11:37 ` [PATCH/RFC] FS_ENET: Removed MII bitbang check for TA Vitaly Bordug
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0611011317280.848@host32.eke.fi \
--to=kalle.pokki@iki.fi \
--cc=linuxppc-embedded@ozlabs.org \
--cc=paulus@samba.org \
--cc=vbordug@ru.mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).