diff options
author | adrian <adrian@FreeBSD.org> | 2013-09-21 19:42:37 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2013-09-21 19:42:37 +0000 |
commit | 497ee46bc7673130423fc2967f992914bb690cbf (patch) | |
tree | 8668f088bf2e4d473413562c72bce09c89f778ba /sys/mips | |
parent | 1f79bda80fc99a9bea37dc83f80019be39c33c5a (diff) | |
download | FreeBSD-src-497ee46bc7673130423fc2967f992914bb690cbf.zip FreeBSD-src-497ee46bc7673130423fc2967f992914bb690cbf.tar.gz |
Fix the AR933x CPU UART support by using the correct clock when calculating
the UART frequency.
Tested:
* AR933x (carambola 2 board), UART now works again
Approved by: re
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/atheros/ar933x_chip.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/mips/atheros/ar933x_chip.c b/sys/mips/atheros/ar933x_chip.c index 1b68cad..9eab526 100644 --- a/sys/mips/atheros/ar933x_chip.c +++ b/sys/mips/atheros/ar933x_chip.c @@ -115,8 +115,14 @@ ar933x_chip_detect_sys_frequency(void) u_ar71xx_ahb_freq = freq / t; } - /* XXX uart should be the refclk, no? */ - u_ar71xx_uart_freq = u_ar71xx_ahb_freq; + /* On the AR933x, the UART frequency is the reference clock, + * not the AHB bus clock. + */ + u_ar71xx_uart_freq = u_ar71xx_refclk; + + /* + * XXX check what the watchdog frequency should be? + */ u_ar71xx_wdt_freq = u_ar71xx_ahb_freq; } |