Skip to content

Commit

Permalink
omap-serial: Use default clock speed (48Mhz) if not specified
Browse files Browse the repository at this point in the history
Use a default clock speed of 48Mhz, instead of ending up with 0,
if platforms fail to specify a valid clock speed.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Reviewed-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Rajendra Nayak authored and Tony Lindgren committed Dec 16, 2011
1 parent ba77433 commit 8fe789d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@
#include <plat/dmtimer.h>
#include <plat/omap-serial.h>

#define DEFAULT_CLK_SPEED 48000000 /* 48Mhz*/

static struct uart_omap_port *ui[OMAP_MAX_HSUART_PORTS];

/* Forward declaration of functions */
Expand Down Expand Up @@ -1387,6 +1389,11 @@ static int serial_omap_probe(struct platform_device *pdev)

up->port.flags = omap_up_info->flags;
up->port.uartclk = omap_up_info->uartclk;
if (!up->port.uartclk) {
up->port.uartclk = DEFAULT_CLK_SPEED;
dev_warn(&pdev->dev, "No clock speed specified: using default:"
"%d\n", DEFAULT_CLK_SPEED);
}
up->uart_dma.uart_base = mem->start;
up->errata = omap_up_info->errata;

Expand Down

0 comments on commit 8fe789d

Please sign in to comment.