1
0
Fork 0
alistair23-linux/include/linux/fsl
Claudiu Manoil 39c38d3a7b enetc: Make MDIO accessors more generic and export to include/linux/fsl
Within the LS1028A SoC, the register map for the ENETC MDIO controller
is instantiated a few times: for the central (external) MDIO controller,
for the internal bus of each standalone ENETC port, and for the internal
bus of the Felix switch.

Refactoring is needed to support multiple MDIO buses from multiple
drivers. The enetc_hw structure is made an opaque type and a smaller
enetc_mdio_priv is created.

'mdio_base' - MDIO registers base address - is being parameterized, to
be able to work with different MDIO register bases.

The ENETC MDIO bus operations are exported from the fsl-enetc-mdio
kernel object, the same that registers the central MDIO controller (the
dedicated PF). The ENETC main driver has been changed to select it, and
use its exported helpers to further register its private MDIO bus. The
DSA Felix driver will do the same.

Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Conflicts:
	drivers/net/ethernet/freescale/enetc/enetc_mdio.c
	drivers/net/ethernet/freescale/enetc/enetc_mdio.h
	drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c
	drivers/net/ethernet/freescale/enetc/enetc_pf.c
	drivers/net/ethernet/freescale/enetc/enetc_pf.h

mostly with the previous (downstream version of this commit) patch
572ee5d842 ("enetc: Make mdio accessors more generic"), which couldn't
be reverted cleanly due to the existing downstream workaround for the
MDIO erratum.

(cherry picked from commit 344355a498cca71105a1de23b2b519ed2f5f914f)
2020-02-26 04:17:36 +08:00
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
edac.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
enetc_mdio.h enetc: Make MDIO accessors more generic and export to include/linux/fsl 2020-02-26 04:17:36 +08:00
ftm.h include/fsl: add common FlexTimer #defines in a separate header. 2019-04-25 21:33:41 +02:00
guts.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mc.h bus: fsl-mc: add autorescan sysfs 2019-12-02 18:04:17 +08:00
ptp_qoriq.h ptp_qoriq: don't pass a large struct by value but instead pass it by reference 2019-02-19 14:15:40 -08:00
svr.h fmd: SDK DPAA 1.x FMan driver 2019-12-02 18:02:42 +08:00