From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Jens Osterkamp To: Arnd Bergmann Subject: [PATCH] of_serial : set custom divisor computed from device tree values Date: Fri, 26 Jan 2007 18:22:21 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Message-Id: <200701261822.21284.jens@de.ibm.com> Cc: linuxppc-dev@ozlabs.org, cbe-oss-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Small fix to Arnds of_serial driver which computes the custom divisor from the device tree values. Signed-off-by: Jens Osterkamp Index: linux-2.6.20-rc5/drivers/serial/of_serial.c =================================================================== --- linux-2.6.20-rc5.orig/drivers/serial/of_serial.c +++ 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; }