From: Ramon Fried <ramon.fried@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/7] serial: serial_msm: fail probe if settings clocks fails
Date: Sat, 12 May 2018 13:15:53 +0300 [thread overview]
Message-ID: <20180512101558.24375-3-ramon.fried@gmail.com> (raw)
In-Reply-To: <20180512101558.24375-1-ramon.fried@gmail.com>
Failure to set the clocks will causes data abort exception when
trying to write to AHB uart registers.
This patch ensures that we don't touch these registers if clock
setting failed.
Signed-off-by: Ramon Fried <ramon.fried@gmail.com>
---
drivers/serial/serial_msm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/serial/serial_msm.c b/drivers/serial/serial_msm.c
index 119e6b9846..250e48c996 100644
--- a/drivers/serial/serial_msm.c
+++ b/drivers/serial/serial_msm.c
@@ -183,8 +183,8 @@ static int msm_serial_probe(struct udevice *dev)
{
struct msm_serial_data *priv = dev_get_priv(dev);
- msm_uart_clk_init(dev); /* Ignore return value and hope clock was
- properly initialized by earlier loaders */
+ if (msm_uart_clk_init(dev))
+ return -EINVAL;
if (readl(priv->base + UARTDM_SR) & UARTDM_SR_UART_OVERRUN)
writel(UARTDM_CR_CMD_RESET_ERR, priv->base + UARTDM_CR);
--
2.14.1
next prev parent reply other threads:[~2018-05-12 10:15 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-12 10:15 [U-Boot] [PATCH 0/7] *** Qualcomm Snapdraon serial fixes*** Ramon Fried
2018-05-12 10:15 ` [U-Boot] [PATCH 1/7] db820c: set clk node to be probed before relocation Ramon Fried
2018-05-13 22:00 ` Simon Glass
2018-05-14 7:06 ` Ramon Fried
2018-05-12 10:15 ` Ramon Fried [this message]
2018-05-13 22:00 ` [U-Boot] [PATCH 2/7] serial: serial_msm: fail probe if settings clocks fails Simon Glass
2018-05-14 7:07 ` Ramon Fried
2018-05-12 10:15 ` [U-Boot] [PATCH 3/7] serial: serial_msm: initialize uart only before relocation Ramon Fried
2018-05-13 22:00 ` Simon Glass
2018-05-12 10:15 ` [U-Boot] [PATCH 4/7] mach-snapdragon: Fix UART clock flow Ramon Fried
2018-05-12 10:15 ` [U-Boot] [PATCH 5/7] mach-snapdragon: Introduce pinctrl driver Ramon Fried
2018-05-13 22:00 ` Simon Glass
2018-05-14 7:10 ` Ramon Fried
2018-05-14 19:51 ` Simon Glass
2018-05-14 21:23 ` Ramon Fried
2018-05-15 16:02 ` Simon Glass
2018-05-15 16:09 ` Ramon Fried
2018-05-15 16:15 ` Simon Glass
2018-05-16 5:37 ` Ramon Fried
2018-05-12 10:15 ` [U-Boot] [PATCH 6/7] db410: added pinctrl node and serial bindings Ramon Fried
2018-05-13 22:00 ` Simon Glass
2018-05-12 10:15 ` [U-Boot] [PATCH 7/7] serial: serial_msm: added pinmux & config Ramon Fried
2018-05-13 22:00 ` Simon Glass
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=20180512101558.24375-3-ramon.fried@gmail.com \
--to=ramon.fried@gmail.com \
--cc=u-boot@lists.denx.de \
/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