summaryrefslogtreecommitdiffstats
path: root/cpu/ppc4xx/serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpu/ppc4xx/serial.c')
-rw-r--r--cpu/ppc4xx/serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu/ppc4xx/serial.c b/cpu/ppc4xx/serial.c
index 7e684f4bc5..5a6af766dd 100644
--- a/cpu/ppc4xx/serial.c
+++ b/cpu/ppc4xx/serial.c
@@ -451,6 +451,8 @@ int serial_init (void)
#else
tmp = CFG_BASE_BAUD * 16;
udiv = (clk + tmp / 2) / tmp;
+ if (udiv > 32) /* max. 5 bits for udiv */
+ udiv = 32;
#endif
#endif