diff options
Diffstat (limited to 'sys/mips/atheros/ar91xx_chip.c')
-rw-r--r-- | sys/mips/atheros/ar91xx_chip.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/sys/mips/atheros/ar91xx_chip.c b/sys/mips/atheros/ar91xx_chip.c index d2fec2f..fa0e235 100644 --- a/sys/mips/atheros/ar91xx_chip.c +++ b/sys/mips/atheros/ar91xx_chip.c @@ -112,25 +112,9 @@ ar91xx_chip_device_stopped(uint32_t mask) } static void -ar91xx_chip_set_pll_ge(int unit, int speed) +ar91xx_chip_set_pll_ge(int unit, int speed, uint32_t pll) { - uint32_t pll; - switch(speed) { - case 10: - pll = AR91XX_PLL_VAL_10; - break; - case 100: - pll = AR91XX_PLL_VAL_100; - break; - case 1000: - pll = AR91XX_PLL_VAL_1000; - break; - default: - printf("%s%d: invalid speed %d\n", - __func__, unit, speed); - return; - } switch (unit) { case 0: ar71xx_write_pll(AR91XX_PLL_REG_ETH_CONFIG, @@ -147,7 +131,6 @@ ar91xx_chip_set_pll_ge(int unit, int speed) __func__, unit); return; } - ar71xx_chip_set_mii_speed(unit, speed); } static void @@ -179,8 +162,24 @@ ar91xx_chip_ddr_flush_ip2(void) static uint32_t ar91xx_chip_get_eth_pll(unsigned int mac, int speed) { + uint32_t pll; + + switch(speed) { + case 10: + pll = AR91XX_PLL_VAL_10; + break; + case 100: + pll = AR91XX_PLL_VAL_100; + break; + case 1000: + pll = AR91XX_PLL_VAL_1000; + break; + default: + printf("%s%d: invalid speed %d\n", __func__, mac, speed); + pll = 0; + } - return 0; + return (pll); } static void |