Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 171505da authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Paul Mackerras
Browse files

[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: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 8cffc6ac
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -81,10 +81,14 @@ static int udbg_550_getc(void)
void udbg_init_uart(void __iomem *comport, unsigned int speed,
void udbg_init_uart(void __iomem *comport, unsigned int speed,
		    unsigned int clock)
		    unsigned int clock)
{
{
	unsigned int dll, base_bauds = clock / 16;
	unsigned int dll, base_bauds;


	if (clock == 0)
		clock = 1843200;
	if (speed == 0)
	if (speed == 0)
		speed = 9600;
		speed = 9600;

	base_bauds = clock / 16;
	dll = base_bauds / speed;
	dll = base_bauds / speed;


	if (comport) {
	if (comport) {