Skip to content
Snippets Groups Projects
Commit b8c1d6a5 authored by Stefan Roese's avatar Stefan Roese Committed by Wolfgang Denk
Browse files

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: default avatarStefan Roese <sr@denx.de>
parent 52568c36
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment