aboutsummaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorVikas Manocha2014-11-21 10:34:22 -0800
committerTom Rini2014-12-08 09:35:44 -0500
commitf7e517b4ebc199ec90bb56ae4336dbd534ecade5 (patch)
tree1681209091ad72060ce1071a971454eef1a9eec9 /drivers/serial
parentd2ca9fd2cd74e8346827af111ceb249a7fd44637 (diff)
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>
Diffstat (limited to 'drivers/serial')
-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 fb11210e4c8..2a6b61d40da 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;