net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy
authorSascha Hauer <s.hauer@pengutronix.de>
Tue, 16 Jun 2020 08:31:39 +0000 (10:31 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Jun 2020 02:59:49 +0000 (19:59 -0700)
commitb4748553f53f2971e07d2619f13d461daac0f3bb
tree0bcc2a84e87a32eba33e7f11ab7b932b722d8e2b
parentef7232da6bcd4294cbb2d424bc35885721570f01
net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy

The MVNETA_SERDES_CFG register is only available on older SoCs like the
Armada XP. On newer SoCs like the Armada 38x the fields are moved to
comphy. This patch moves the writes to this register next to the comphy
initialization, so that depending on the SoC either comphy or
MVNETA_SERDES_CFG is configured.
With this we no longer write to the MVNETA_SERDES_CFG on SoCs where it
doesn't exist.

Suggested-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c