Fix MGT5100 PSC baudrate calculation

Patch by Sebastian Schau, 27 Jan 2005
master
Wolfgang Denk 20 years ago
parent c97a2aaf27
commit 9f221d0738
  1. 3
      CHANGELOG
  2. 6
      cpu/mpc5xxx/serial.c

@ -2,6 +2,9 @@
Changes for U-Boot 1.1.4: Changes for U-Boot 1.1.4:
====================================================================== ======================================================================
* Fix MGT5100 PSC baudrate calculation
Patch by Sebastian Schau, 27 Jan 2005
* OMAP242x fix for GP device booting * OMAP242x fix for GP device booting
- Add SRAM unlock for GP devices. - Add SRAM unlock for GP devices.
- Change DDR DLL unlock value to allow DPLLout*1 operation. - Change DDR DLL unlock value to allow DPLLout*1 operation.

@ -152,14 +152,14 @@ serial_setbrg(void)
unsigned long baseclk, div; unsigned long baseclk, div;
#if defined(CONFIG_MGT5100) #if defined(CONFIG_MGT5100)
baseclk = CFG_MPC5XXX_CLKIN / 32; baseclk = (CFG_MPC5XXX_CLKIN + 16) / 32;
#elif defined(CONFIG_MPC5200) #elif defined(CONFIG_MPC5200)
baseclk = (gd->ipb_clk + 16) / 32; baseclk = (gd->ipb_clk + 16) / 32;
#endif #endif
/* set up UART divisor */ /* set up UART divisor */
div = (baseclk + (gd->baudrate/2)) / gd->baudrate; div = (baseclk + (gd->baudrate/2)) / gd->baudrate;
psc->ctur = div >> 8; psc->ctur = (div >> 8) & 0xFF;
psc->ctlr = div & 0xff; psc->ctlr = div & 0xff;
} }
#endif /* CONFIG_PSC_CONSOLE */ #endif /* CONFIG_PSC_CONSOLE */

Loading…
Cancel
Save