Skip to content
Snippets Groups Projects
Commit 7e11d826 authored by Stefan Roese's avatar Stefan Roese
Browse files

Clip udiv to 5 bits on PPC405 (serial.c).

parent 38daa27d
No related merge requests found
...@@ -451,6 +451,8 @@ int serial_init (void) ...@@ -451,6 +451,8 @@ int serial_init (void)
#else #else
tmp = CFG_BASE_BAUD * 16; tmp = CFG_BASE_BAUD * 16;
udiv = (clk + tmp / 2) / tmp; udiv = (clk + tmp / 2) / tmp;
if (udiv > 32) /* max. 5 bits for udiv */
udiv = 32;
#endif #endif
#endif #endif
......
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