nrhw20: cleanup Ethernet phy, switch driver

This commit is contained in:
Rene Straub 2018-02-19 12:08:56 +01:00
parent 09dd80b40d
commit 6613d7ce9c
2 changed files with 6 additions and 7 deletions

View File

@ -792,7 +792,7 @@ static int mv88e60xx_phy_config_port(struct phy_device *phydev, u8 phy)
{ {
int val; int val;
printf("mv88e60xx_phy_config_port\n"); /* printf("mv88e60xx_phy_config_port\n"); */
val = mv88e60xx_port_enable(phydev, phy); val = mv88e60xx_port_enable(phydev, phy);
if (val < 0) if (val < 0)
@ -814,7 +814,7 @@ static int mv88e60xx_probe(struct phy_device *phydev)
struct mv88e60xx_phy_priv *priv; struct mv88e60xx_phy_priv *priv;
int res; int res;
printf("mv88e60xx_probe %p\n", phydev); /* printf("mv88e60xx_probe %p\n", phydev); */
g_phydev = phydev; g_phydev = phydev;
res = mv88e60xx_hw_reset(phydev); res = mv88e60xx_hw_reset(phydev);
@ -880,7 +880,7 @@ static int mv88e60xx_phy_config(struct phy_device *phydev)
int i; int i;
int ret = -1; int ret = -1;
printf("mv88e60xx_phy_config\n"); /* printf("mv88e60xx_phy_config\n"); */
res = mv88e60xx_switch_init(phydev); res = mv88e60xx_switch_init(phydev);
if (res < 0) if (res < 0)
@ -1079,14 +1079,15 @@ static int xmdio_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
(void)mv88e60xx_phy_write(g_phydev, phy, reg, (u16)val); (void)mv88e60xx_phy_write(g_phydev, phy, reg, (u16)val);
} }
#endif #endif
#if 0
/* TODO: Does not work as expected */ /* TODO: Does not work as expected */
for (int i=0; i<5; i++) { for (i=0; i<5; i++) {
/* Issue Re-Start Autoneg here directly */ /* Issue Re-Start Autoneg here directly */
printf("Hack: Manually set PHY %d to auto-net\n", i); printf("Hack: Manually set PHY %d to auto-net\n", i);
(void)mv88e60xx_phy_write(g_phydev, i, 0, 0x9000); (void)mv88e60xx_phy_write(g_phydev, i, 0, 0x9000);
mdelay(50); mdelay(50);
} }
#endif
return 0; return 0;
} }

View File

@ -465,8 +465,6 @@ static LIST_HEAD(phy_drivers);
int phy_init(void) int phy_init(void)
{ {
puts("PHY init\n");
#ifdef CONFIG_MV88E60XX_SWITCH #ifdef CONFIG_MV88E60XX_SWITCH
phy_mv88e60xx_init(); phy_mv88e60xx_init();
#endif #endif