-static void adm8668_restart(char *cmd)
-{
- int i;
-
- /* stop eth0 and eth1 */
- ADM8668_LAN_REG(NETCSR6) = BIT_1|BIT_13;
- ADM8668_LAN_REG(NETCSR7) = 0;
- ADM8668_WAN_REG(NETCSR6) = BIT_1|BIT_13;
- ADM8668_WAN_REG(NETCSR7) = 0;
-
- /* reset PHY */
- ADM8668_WAN_REG(NETCSR37) = 0x20;
- for (i = 0; i < 10000; i++)
- ;
- ADM8668_WAN_REG(NETCSR37) = 0;
- for (i = 0; i < 10000; i++)
- ;
-
- *(volatile unsigned int *)0xB1600000 = 1; /* reset eth0 mac */
- *(volatile unsigned int *)0xB1A00000 = 1; /* reset eth1 mac */
- *(volatile unsigned int *)0xB1800000 = 1; /* reset wlan0 mac */
-
- /* the real deal */
- for (i = 0; i < 1000; i++)
- ;
- ADM8668_CONFIG_REG(ADM8668_CR1) = BIT_0;
-}