serial: pl01x: disable as per type of pl01x
[platform/kernel/u-boot.git] / drivers / serial / serial_pl01x.c
index fb11210..2a6b61d 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;