mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-16 23:07:00 +00:00
mpc512x: Fix PSC divisor calculation for baudrate setting
The wrong input frequency was used in serial_setbrg(). This patch fixes this by using ips_clk as input frequency for the PSC baudrate generator. Signed-off-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
52568c3654
commit
b8c1d6a54f
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ void serial_setbrg (void)
|
|||
volatile psc512x_t *psc = (psc512x_t *) &im->psc[CONFIG_PSC_CONSOLE];
|
||||
unsigned long baseclk, div;
|
||||
|
||||
baseclk = (gd->csb_clk + 8) / 16;
|
||||
baseclk = (gd->ips_clk + 8) / 16;
|
||||
div = (baseclk + (gd->baudrate / 2)) / gd->baudrate;
|
||||
|
||||
out_8(&psc->ctur, (div >> 8) & 0xFF);
|
||||
|
|
Loading…
Add table
Reference in a new issue