From: stroese Date: Thu, 20 Mar 2003 15:25:59 +0000 (+0000) Subject: Clip udiv to 5 bits on PPC405 (serial.c). X-Git-Tag: v2008.10-rc1~2189 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e11d8269e4491cffd10ea0439c29585d766db77;p=platform%2Fkernel%2Fu-boot.git Clip udiv to 5 bits on PPC405 (serial.c). --- diff --git a/cpu/ppc4xx/serial.c b/cpu/ppc4xx/serial.c index 7e684f4..5a6af76 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