diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2006-07-04 00:11:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-25 11:27:13 -0400 |
commit | 171505dafef56e4c84c48399b36604f4be55cf36 (patch) | |
tree | 8c972f1c3306f29a373f851d4e1ba6158a927fab | |
parent | 8cffc6ac66a2b251df2490702923611aa4ac1fc5 (diff) |
[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>
-rw-r--r-- | arch/powerpc/kernel/udbg_16550.c | 6 |
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) | |||
81 | void udbg_init_uart(void __iomem *comport, unsigned int speed, | 81 | void udbg_init_uart(void __iomem *comport, unsigned int speed, |
82 | unsigned int clock) | 82 | unsigned int clock) |
83 | { | 83 | { |
84 | unsigned int dll, base_bauds = clock / 16; | 84 | unsigned int dll, base_bauds; |
85 | 85 | ||
86 | if (clock == 0) | ||
87 | clock = 1843200; | ||
86 | if (speed == 0) | 88 | if (speed == 0) |
87 | speed = 9600; | 89 | speed = 9600; |
90 | |||
91 | base_bauds = clock / 16; | ||
88 | dll = base_bauds / speed; | 92 | dll = base_bauds / speed; |
89 | 93 | ||
90 | if (comport) { | 94 | if (comport) { |