From: Vikas Manocha Date: Fri, 21 Nov 2014 18:34:22 +0000 (-0800) Subject: serial: pl01x: disable as per type of pl01x X-Git-Tag: v2015.01-rc3~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f7e517b4ebc199ec90bb56ae4336dbd534ecade5;p=platform%2Fkernel%2Fu-boot.git 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 Acked-by: Simon Glass --- diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c index fb11210e4c..2a6b61d40d 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, ®s->pl010_cr); - switch (type) { case TYPE_PL010: + /* disable everything */ + writel(0, ®s->pl010_cr); break; case TYPE_PL011: + /* disable everything */ + writel(0, ®s->pl011_cr); break; default: return -EINVAL;