mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-18 06:58:54 +00:00
ppc4xx: Fix Ethernet PHY LED configuration on PMC440 boards
Signed-off-by: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
This commit is contained in:
parent
1951f847f0
commit
5b67a1439a
1 changed files with 18 additions and 4 deletions
|
@ -755,17 +755,31 @@ int post_hotkeys_pressed(void)
|
|||
#ifdef CONFIG_RESET_PHY_R
|
||||
void reset_phy(void)
|
||||
{
|
||||
char *s;
|
||||
unsigned short val_method, val_behavior;
|
||||
|
||||
/* special LED setup for NGCC/CANDES */
|
||||
if ((s = getenv("bd_type")) &&
|
||||
((!strcmp(s, "ngcc")) || (!strcmp(s, "candes")))) {
|
||||
val_method = 0x0e0a;
|
||||
val_behavior = 0x0cf2;
|
||||
} else {
|
||||
/* PMC440 standard type */
|
||||
val_method = 0x0e10;
|
||||
val_behavior = 0x0cf0;
|
||||
}
|
||||
|
||||
if (miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x1f, 0x0001) == 0) {
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x11, 0x0010);
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x11, 0x0df0);
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x10, 0x0e10);
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x11, val_behavior);
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x10, val_method);
|
||||
miiphy_write("ppc_4xx_eth0", CONFIG_PHY_ADDR, 0x1f, 0x0000);
|
||||
}
|
||||
|
||||
if (miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x1f, 0x0001) == 0) {
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x11, 0x0010);
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x11, 0x0df0);
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x10, 0x0e10);
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x11, val_behavior);
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x10, val_method);
|
||||
miiphy_write("ppc_4xx_eth1", CONFIG_PHY1_ADDR, 0x1f, 0x0000);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue