blackfin: Uart divisor should be set after their values are generated.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
This commit is contained in:
parent
d68e7faac0
commit
04eeb758e7
|
@ -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.
|
* for dividing which means we'd generate a libgcc reference.
|
||||||
*/
|
*/
|
||||||
unsigned int sdivR, vcoR;
|
unsigned int sdivR, vcoR;
|
||||||
unsigned int dividend = sdivB * divB * vcoR;
|
unsigned int dividend;
|
||||||
unsigned int divisor = vcoB * sdivR;
|
unsigned int divisor;
|
||||||
unsigned int quotient;
|
unsigned int quotient;
|
||||||
|
|
||||||
serial_putc('a');
|
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;
|
sdivR = bfin_read_PLL_DIV() & 0xf;
|
||||||
vcoR = (bfin_read_PLL_CTL() >> 9) & 0x3f;
|
vcoR = (bfin_read_PLL_CTL() >> 9) & 0x3f;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
dividend = sdivB * divB * vcoR;
|
||||||
|
divisor = vcoB * sdivR;
|
||||||
quotient = early_division(dividend, divisor);
|
quotient = early_division(dividend, divisor);
|
||||||
serial_early_put_div(quotient - ANOMALY_05000230);
|
serial_early_put_div(quotient - ANOMALY_05000230);
|
||||||
serial_putc('c');
|
serial_putc('c');
|
||||||
|
|
Loading…
Reference in New Issue