phy: mdio-octeon: Refactor into two files/modules
A follow-on patch uses PCI probing to find the Thunder MDIO hardware. In preparation for this, split out the common code into a new file mdio-cavium.c, which will be used by both the existing OCTEON driver, and the new Thunder PCI based driver. As part of the refactoring simplify the struct cavium_mdiobus by removing fields that are only ever used in the probe function and can just as well be local variables. Use readq/writeq in preference to readq_relaxed/writeq_relaxed as the relaxed form was an optimization for an early chip revision, and the MDIO drivers are not performance bottlenecks that need optimization in the first place. Signed-off-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
5fc7cf1794
commit
1eefee901f
@@ -183,15 +183,18 @@ config MDIO_GPIO
|
||||
To compile this driver as a module, choose M here: the module
|
||||
will be called mdio-gpio.
|
||||
|
||||
config MDIO_CAVIUM
|
||||
tristate
|
||||
|
||||
config MDIO_OCTEON
|
||||
tristate "Support for MDIO buses on Octeon and ThunderX SOCs"
|
||||
tristate "Support for MDIO buses on Octeon and some ThunderX SOCs"
|
||||
depends on 64BIT
|
||||
depends on HAS_IOMEM
|
||||
select MDIO_CAVIUM
|
||||
help
|
||||
|
||||
This module provides a driver for the Octeon and ThunderX MDIO
|
||||
busses. It is required by the Octeon and ThunderX ethernet device
|
||||
drivers.
|
||||
buses. It is required by the Octeon and ThunderX ethernet device
|
||||
drivers on some systems.
|
||||
|
||||
config MDIO_SUN4I
|
||||
tristate "Allwinner sun4i MDIO interface support"
|
||||
|
Reference in New Issue
Block a user