
On Mon, Jul 29, 2019 at 2:01 PM Anatolij Gustschin agust@denx.de wrote:
Extend the driver to init switch register offsets from variables instead of compile time macros and enable 88E6071 detection. Ethernet transfer (e.g. tftp) does not work yet, so enable the registration of the 'indirect mii' bus for easier PHY register access by 'mii' command.
Signed-off-by: Anatolij Gustschin agust@denx.de Reviewed-by: Chris Packham judge.packham@gmail.com Tested-by: Chris Packham judge.packham@gmail.com
Acked-by: Joe Hershberger joe.hershberger@ni.com
Nit below.
drivers/net/phy/mv88e61xx.c | 113 +++++++++++++++++++++++++++++------- 1 file changed, 92 insertions(+), 21 deletions(-)
diff --git a/drivers/net/phy/mv88e61xx.c b/drivers/net/phy/mv88e61xx.c index c1e2860329..240f52da31 100644 --- a/drivers/net/phy/mv88e61xx.c +++ b/drivers/net/phy/mv88e61xx.c
[ ... ]
@@ -1068,6 +1131,14 @@ int get_phy_id(struct mii_dev *bus, int smi_addr, int devad, u32 *phy_id) temp_phy.priv = &temp_priv; temp_mii.priv = &temp_phy;
/*
* get_phy_id() can be called by framework before mv88e61xx driver
* probing, in this case the global register offsets are not
* initialised yet. Do this initialisation here before indirect
initialised -> initialized initialisation -> initialization
* PHY register access.
*/
mv88e61xx_priv_reg_offs_pre_init(&temp_priv);
val = mv88e61xx_phy_read_indirect(&temp_mii, 0, devad, MII_PHYSID1); if (val < 0) return -EIO;
-- 2.17.1
U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot