Browse Source

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

stroese 22 years ago
parent
commit
7e11d8269e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      cpu/ppc4xx/serial.c

+ 2 - 0
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