summaryrefslogtreecommitdiff
path: root/arch/blackfin
diff options
context:
space:
mode:
authorSonic Zhang <sonic.zhang@analog.com>2013-03-14 12:47:12 +0800
committerSonic Zhang <sonic.zhang@analog.com>2013-05-13 16:30:17 +0800
commit04eeb758e746d80848b4add1515493fe565a735e (patch)
tree04cb2f14f3ca197c49b0cfcf6eb28b0cfdb947d6 /arch/blackfin
parentd68e7faac08be5424c748c0ead9b07dd00a43cc1 (diff)
blackfin: Uart divisor should be set after their values are generated.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r--arch/blackfin/cpu/initcode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/blackfin/cpu/initcode.c b/arch/blackfin/cpu/initcode.c
index 4b10b6c6b2f..8ef0b92c238 100644
--- a/arch/blackfin/cpu/initcode.c
+++ b/arch/blackfin/cpu/initcode.c
@@ -715,8 +715,8 @@ update_serial_clocks(ADI_BOOT_DATA *bs, uint sdivB, uint divB, uint vcoB)
* for dividing which means we'd generate a libgcc reference.
*/
unsigned int sdivR, vcoR;
- unsigned int dividend = sdivB * divB * vcoR;
- unsigned int divisor = vcoB * sdivR;
+ unsigned int dividend;
+ unsigned int divisor;
unsigned int quotient;
serial_putc('a');
@@ -729,6 +729,9 @@ update_serial_clocks(ADI_BOOT_DATA *bs, uint sdivB, uint divB, uint vcoB)
sdivR = bfin_read_PLL_DIV() & 0xf;
vcoR = (bfin_read_PLL_CTL() >> 9) & 0x3f;
#endif
+
+ dividend = sdivB * divB * vcoR;
+ divisor = vcoB * sdivR;
quotient = early_division(dividend, divisor);
serial_early_put_div(quotient - ANOMALY_05000230);
serial_putc('c');