mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-05 02:36:39 +09:00
mips: Fix baudrate divisor computation on alchemy cpus
Use CFG_MIPS_TIMER_FREQ when computing the baudrate divisor on alchemy cpus. Signed-off-by: Wolfgang Ocker <weo@reccoware.de> Signed-off-by: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
This commit is contained in:
parent
1953d128fd
commit
dbd3238792
|
@ -76,7 +76,7 @@ void serial_setbrg (void)
|
||||||
sd = (*sys_powerctrl & 0x03) + 2;
|
sd = (*sys_powerctrl & 0x03) + 2;
|
||||||
|
|
||||||
/* calulate 2x baudrate and round */
|
/* calulate 2x baudrate and round */
|
||||||
divisorx2 = ((CFG_HZ/(sd * 16 * CONFIG_BAUDRATE)));
|
divisorx2 = ((CFG_MIPS_TIMER_FREQ/(sd * 16 * CONFIG_BAUDRATE)));
|
||||||
|
|
||||||
if (divisorx2 & 0x01)
|
if (divisorx2 & 0x01)
|
||||||
divisorx2 = divisorx2 + 1;
|
divisorx2 = divisorx2 + 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user