summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorstroese <stroese>2003-03-20 15:25:59 +0000
committerstroese <stroese>2003-03-20 15:25:59 +0000
commit7e11d8269e4491cffd10ea0439c29585d766db77 (patch)
treee0250015665d036b7fd32ed841281a28f805ddeb /cpu
parent38daa27d21c975c3285933e86c556d1dc69642f9 (diff)
Clip udiv to 5 bits on PPC405 (serial.c).
Diffstat (limited to 'cpu')
-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 7e684f4bc54..5a6af766ddf 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