Skip to content

Commit

Permalink
phy/fixed.c: rework to not duplicate PHY layer functionality
Browse files Browse the repository at this point in the history
With that patch fixed.c now fully emulates MDIO bus, thus no need
to duplicate PHY layer functionality. That, in turn, drastically
simplifies the code, and drops down line count.

As an additional bonus, now there is no need to register MDIO bus
for each PHY, all emulated PHYs placed on the platform fixed MDIO bus.
There is also no more need to pre-allocate PHYs via .config option,
this is all now handled dynamically.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Vitaly Bordug <vitb@kernel.crashing.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
  • Loading branch information
Vitaly Bordug authored and Kumar Gala committed Jan 24, 2008
1 parent 9b6d19d commit a79d8e9
Show file tree
Hide file tree
Showing 3 changed files with 195 additions and 333 deletions.
32 changes: 5 additions & 27 deletions drivers/net/phy/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,12 @@ config ICPLUS_PHY
Currently supports the IP175C PHY.

config FIXED_PHY
tristate "Drivers for PHY emulation on fixed speed/link"
bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs"
---help---
Adds the driver to PHY layer to cover the boards that do not have any PHY bound,
but with the ability to manipulate the speed/link in software. The relevant MII
speed/duplex parameters could be effectively handled in a user-specified function.
Currently tested with mpc866ads.

config FIXED_MII_10_FDX
bool "Emulation for 10M Fdx fixed PHY behavior"
depends on FIXED_PHY

config FIXED_MII_100_FDX
bool "Emulation for 100M Fdx fixed PHY behavior"
depends on FIXED_PHY

config FIXED_MII_1000_FDX
bool "Emulation for 1000M Fdx fixed PHY behavior"
depends on FIXED_PHY

config FIXED_MII_AMNT
int "Number of emulated PHYs to allocate "
depends on FIXED_PHY
default "1"
---help---
Sometimes it is required to have several independent emulated
PHYs on the bus (in case of multi-eth but phy-less HW for instance).
This control will have specified number allocated for each fixed
PHY type enabled.
Adds the platform "fixed" MDIO Bus to cover the boards that use
PHYs that are not connected to the real MDIO bus.

Currently tested with mpc866ads and mpc8349e-mitx.

config MDIO_BITBANG
tristate "Support for bitbanged MDIO buses"
Expand Down
Loading

0 comments on commit a79d8e9

Please sign in to comment.