netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net, fixed phy: make BUSID configurable
@ 2011-12-04  9:37 Heiko Schocher
  2011-12-04 18:23 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Heiko Schocher @ 2011-12-04  9:37 UTC (permalink / raw)
  Cc: Heiko Schocher, netdev, Vitaly Bordug, Andrew Morton, Jeff Garzik,
	Wolfgang Denk

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: netdev@vger.kernel.org
Cc: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Wolfgang Denk <wd@denx.de>
---
 drivers/net/phy/Kconfig |    5 +++++
 drivers/net/phy/fixed.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig
index bb88e12..bed4bdd 100644
--- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig
@@ -101,6 +101,11 @@ config FIXED_PHY
 
 	  Currently tested with mpc866ads and mpc8349e-mitx.
 
+config FIXED_PHY_ID
+	int "BUS ID for fixed Bus/PHY emulation"
+	depends on FIXED_PHY
+	default "0"
+
 config MDIO_BITBANG
 	tristate "Support for bitbanged MDIO buses"
 	help
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 1fa4d73..5c77478 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -220,7 +220,7 @@ static int __init fixed_mdio_bus_init(void)
 		goto err_mdiobus_reg;
 	}
 
-	snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "0");
+	snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "%d", CONFIG_FIXED_PHY_ID);
 	fmb->mii_bus->name = "Fixed MDIO Bus";
 	fmb->mii_bus->priv = fmb;
 	fmb->mii_bus->parent = &pdev->dev;
-- 
1.7.6.4

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

end of thread, other threads:[~2011-12-05 10:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-04  9:37 [PATCH] net, fixed phy: make BUSID configurable Heiko Schocher
2011-12-04 18:23 ` David Miller
2011-12-05 10:21   ` Heiko Schocher

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).