summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVikas Manocha <vikas.manocha@st.com>2014-11-21 10:34:22 -0800
committerTom Rini <trini@ti.com>2014-12-08 09:35:44 -0500
commitf7e517b4ebc199ec90bb56ae4336dbd534ecade5 (patch)
tree1681209091ad72060ce1071a971454eef1a9eec9
parentd2ca9fd2cd74e8346827af111ceb249a7fd44637 (diff)
downloadu-boot-imx-f7e517b4ebc199ec90bb56ae4336dbd534ecade5.zip
u-boot-imx-f7e517b4ebc199ec90bb56ae4336dbd534ecade5.tar.gz
u-boot-imx-f7e517b4ebc199ec90bb56ae4336dbd534ecade5.tar.bz2
serial: pl01x: disable as per type of pl01x
pl010 & pl011 have different control register offsets, setting it as per the pl01x type. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Acked-by: Simon Glass <sjg@chromium.org>
-rw-r--r--drivers/serial/serial_pl01x.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index fb11210..2a6b61d 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -82,13 +82,14 @@ static int pl01x_generic_serial_init(struct pl01x_regs *regs,
}
#endif
- /* First, disable everything */
- writel(0, &regs->pl010_cr);
-
switch (type) {
case TYPE_PL010:
+ /* disable everything */
+ writel(0, &regs->pl010_cr);
break;
case TYPE_PL011:
+ /* disable everything */
+ writel(0, &regs->pl011_cr);
break;
default:
return -EINVAL;