summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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;