diff options
author | Marius Strobl <marius@FreeBSD.org> | 2011-11-01 16:13:59 +0000 |
---|---|---|
committer | Marius Strobl <marius@FreeBSD.org> | 2011-11-01 16:13:59 +0000 |
commit | 8c1093fc50ab084b2ddd4750290a23d62616e0b6 (patch) | |
tree | ad9ba266ea9f21e3bb8157cdc1c2c7c8b1a6b9a3 /sys/conf | |
parent | 948fa27d49f863b6b1a006993ef1822ed2f7c020 (diff) | |
download | src-8c1093fc50ab084b2ddd4750290a23d62616e0b6.tar.gz src-8c1093fc50ab084b2ddd4750290a23d62616e0b6.zip |
- Import the common MII bitbang'ing code from NetBSD and convert drivers to
take advantage of it instead of duplicating it. This reduces the size of
the i386 GENERIC kernel by about 4k. The only potential in-tree user left
unconverted is xe(4), which generally should be changed to use miibus(4)
instead of implementing PHY handling on its own, as otherwise it makes not
much sense to add a dependency on miibus(4)/mii_bitbang(4) to xe(4) just
for the MII bitbang'ing code. The common MII bitbang'ing code also is
useful in the embedded space for using GPIO pins to implement MII access.
- Based on lessons learnt with dc(4) (see r185750), add bus barriers to the
MII bitbang read and write functions of the other drivers converted in
order to ensure the intended ordering. Given that register access via an
index register as well as register bank/window switching is subject to the
same problem, also add bus barriers to the respective functions of smc(4),
tl(4) and xl(4).
- Sprinkle some const.
Thanks to the following testers:
Andrew Bliznak (nge(4)), nwhitehorn@ (bm(4)), yongari@ (sis(4) and ste(4))
Thanks to Hans-Joerg Sirtl for supplying hardware to test stge(4).
Reviewed by: yongari (subset of drivers)
Obtained from: NetBSD (partially)
Notes
Notes:
svn path=/head/; revision=226995
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/NOTES | 14 | ||||
-rw-r--r-- | sys/conf/files | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES index ed944942551d..b80df3581fb1 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -1846,13 +1846,15 @@ device puc # MII bus support is required for many PCI Ethernet NICs, # namely those which use MII-compliant transceivers or implement # transceiver control interfaces that operate like an MII. Adding -# "device miibus" to the kernel config pulls in support for -# the generic miibus API and all of the PHY drivers, including a -# generic one for PHYs that aren't specifically handled by an -# individual driver. Support for specific PHYs may be built by adding -# "device mii" then adding the appropriate PHY driver. -device miibus # MII support including all PHYs +# "device miibus" to the kernel config pulls in support for the generic +# miibus API, the common support for for bit-bang'ing the MII and all +# of the PHY drivers, including a generic one for PHYs that aren't +# specifically handled by an individual driver. Support for specific +# PHYs may be built by adding "device mii", "device mii_bitbang" if +# needed by the NIC driver and then adding the appropriate PHY driver. device mii # Minimal MII support +device mii_bitbang # Common module for bit-bang'ing the MII +device miibus # MII support w/ bit-bang'ing and all PHYs device acphy # Altima Communications AC101 device amphy # AMD AM79c873 / Davicom DM910{1,2} diff --git a/sys/conf/files b/sys/conf/files index 90e7b76eed33..e6dfe63f0b1a 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1425,6 +1425,7 @@ dev/mii/ip1000phy.c optional miibus | ip1000phy dev/mii/jmphy.c optional miibus | jmphy dev/mii/lxtphy.c optional miibus | lxtphy dev/mii/mii.c optional miibus | mii +dev/mii/mii_bitbang.c optional miibus | mii_bitbang dev/mii/mii_physubr.c optional miibus | mii dev/mii/miibus_if.m optional miibus | mii dev/mii/mlphy.c optional miibus | mlphy |