]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial: pl01x: disable as per type of pl01x
authorVikas Manocha <vikas.manocha@st.com>
Fri, 21 Nov 2014 18:34:22 +0000 (10:34 -0800)
committerTom Rini <trini@ti.com>
Mon, 8 Dec 2014 14:35:44 +0000 (09:35 -0500)
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>
drivers/serial/serial_pl01x.c

index fb11210e4c8fe2d08b598edc18ea9eda624c3ea0..2a6b61d40da54ed2d682504bcca3988767b32baf 100644 (file)
@@ -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;