aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGravatar Benjamin Herrenschmidt <benh@kernel.crashing.org> 2006-07-04 14:11:23 +1000
committerGravatar Paul Mackerras <paulus@samba.org> 2006-07-26 01:27:13 +1000
commit171505dafef56e4c84c48399b36604f4be55cf36 (patch)
tree8c972f1c3306f29a373f851d4e1ba6158a927fab /arch/powerpc
parent[POWERPC] Fix non-MPIC CHRPs with CONFIG_SMP set (diff)
downloadlinux-171505dafef56e4c84c48399b36604f4be55cf36.tar.gz
linux-171505dafef56e4c84c48399b36604f4be55cf36.tar.bz2
linux-171505dafef56e4c84c48399b36604f4be55cf36.zip
[POWERPC] Fix default clock for udbg_16550
This patch makes it possible to provide 0 as the clock value for udbg_16550, making it default to the standard 1.8432Mhz clock Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/udbg_16550.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 0835b4841dea..2d17f2b8eda7 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -81,10 +81,14 @@ static int udbg_550_getc(void)
void udbg_init_uart(void __iomem *comport, unsigned int speed,
unsigned int clock)
{
- unsigned int dll, base_bauds = clock / 16;
+ unsigned int dll, base_bauds;
+ if (clock == 0)
+ clock = 1843200;
if (speed == 0)
speed = 9600;
+
+ base_bauds = clock / 16;
dll = base_bauds / speed;
if (comport) {