Hi all, <div><br></div><div>I would like to be able to set a baud rate of 460800 for modem that we are testing. With the actual prescaler of 32 and a IPB frequency of 84MHz</div><div>I got a 5.1% error (437500) vs a 0.9% error (456522) if I could use the prescaler of 4. See MPC5200B user manual page 15-46 for the calculation formula and page 15-12 for the CSR description.</div>
<div><br></div><div>Currently the code for the kernel we are using here, (2.6.29.2) seams not to take a prescaler of 4 into account.</div><div><div>Line 249 of mpc52xx_uart.c <a href="http://lxr.linux.no/linux+v2.6.29.2/drivers/serial/mpc52xx_uart.c#L249">http://lxr.linux.no/linux+v2.6.29.2/drivers/serial/mpc52xx_uart.c#L249</a></div>
<div><br></div><div>/* Search for bus-frequency property in this node or a parent */</div><div>static unsigned long mpc52xx_getuartclk(void *p)</div><div>{</div><div> /*</div><div> * 5200 UARTs have a / 32 prescaler</div>
<div> * but the generic serial code assumes 16</div><div> * so return ipb freq / 2</div><div> */</div><div> return mpc52xx_find_ipb_freq(p) / 2;</div><div>}</div><div><br></div><div>How could I make it use the prescaler of 4 without breaking anything that we currently have working ?</div>
<div>I doubt that simply doing return mpc52xx_find_ipb_freq(p) / 4 would do the trick ...</div></div>