Skip to content

Commit

Permalink
[POWERPC] Fix default clock for udbg_16550
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jul 7, 2006
1 parent 1e031d6 commit e70e943
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/powerpc/kernel/udbg_16550.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit e70e943

Please sign in to comment.