From: Rajendra Nayak <rnayak@ti.com>
To: linux-serial@vger.kernel.org, linux-omap@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org
Cc: tony@atomide.com, khilman@ti.com, govindraj.raja@ti.com,
b-cousson@ti.com, linux-arm-kernel@lists.infradead.org,
linaro-dev@lists.linaro.org, patches@linaro.org,
robherring2@gmail.com, Rajendra Nayak <rnayak@ti.com>
Subject: [PATCH v2 2/4] omap-serial: Use default clock speed (48Mhz) if not specified
Date: Tue, 22 Nov 2011 19:14:14 +0530 [thread overview]
Message-ID: <1321969456-24266-3-git-send-email-rnayak@ti.com> (raw)
In-Reply-To: <1321969456-24266-1-git-send-email-rnayak@ti.com>
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>
---
drivers/tty/serial/omap-serial.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index a02cc9f..f14b9c5 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -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 */
@@ -1386,6 +1388,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;
--
1.7.1
next prev parent reply other threads:[~2011-11-22 13:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-22 13:44 [PATCH v2 0/4] OMAP serial device tree support Rajendra Nayak
[not found] ` <1321969456-24266-1-git-send-email-rnayak-l0cyMroinI0@public.gmane.org>
2011-11-22 13:44 ` [PATCH v2 1/4] omap-serial: Get rid of all pdev->id usage Rajendra Nayak
2011-11-22 13:44 ` [PATCH v2 3/4] omap-serial: Add minimal device tree support Rajendra Nayak
2011-11-28 13:39 ` Rob Herring
2011-11-29 7:04 ` Rajendra Nayak
2011-11-22 13:44 ` [PATCH v2 4/4] ARM: omap: pass minimal SoC/board data for UART from dt Rajendra Nayak
2011-11-28 13:40 ` Rob Herring
2011-11-22 13:44 ` Rajendra Nayak [this message]
2011-11-27 3:36 ` [PATCH v2 0/4] OMAP serial device tree support Greg KH
2011-11-28 6:06 ` Rajendra Nayak
2011-11-28 6:31 ` Greg KH
2011-11-28 13:44 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1321969456-24266-3-git-send-email-rnayak@ti.com \
--to=rnayak@ti.com \
--cc=b-cousson@ti.com \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=govindraj.raja@ti.com \
--cc=khilman@ti.com \
--cc=linaro-dev@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=patches@linaro.org \
--cc=robherring2@gmail.com \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).