Skip to contentSkip to conversation

of_serial : set custom divisor computed from device tree values

PATCH New Jens Osterkamp 1 participant 1 message Jan 26, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of_serial : set custom divisor computed from device tree values

Small fix to Arnds of_serial driver which computes the custom divisor from the device tree values.

drivers/serial/of_serial.c +2 -3
Index: linux-2.6.20-rc5/drivers/serial/of_serial.c
===================================================================
@@ -50,9 +50,8 @@ static int __devinit of_platform_serial_
  port->uartclk = *clk;
  port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP;
  port->dev = &ofdev->dev;
-/* if (spd) // FIXME: how to set?
-  port->speed = spd;
-*/
+ port->custom_divisor = *clk / (16 * (*spd));
+
  return 0;
 }