diff mbox

[Xen-devel] ns16550: setup default lsr_mask for DT systems too (Was: Re: [PATCH V8 RESEND] ns16550: Add support for UART present in Broadcom TruManage capable NetXtreme chips)

Message ID 1395335099.3104.41.camel@kazak.uk.xensource.com
State Superseded
Headers show

Commit Message

Ian Campbell March 20, 2014, 5:04 p.m. UTC
On Thu, 2014-03-20 at 16:47 +0000, Ian Campbell wrote:
> Unfortunately this patch breaks the console on the arm64 x-gene
> platform, it drops a fairly large subset of the characters.
> 
> I'm not sure why yet.

The simple fix is below.

I'm going to take a look at making ns16550_init and ns16550_uart_dt_init
share a common function for setting up the defaults, but for now I'd
appreciate getting this bandaid in.

Ian.

------8<----------------

From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Thu, 20 Mar 2014 17:02:52 +0000
Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
 xen/drivers/char/ns16550.c |    2 ++
 1 file changed, 2 insertions(+)

Comments

Julien Grall March 20, 2014, 5:08 p.m. UTC | #1
On 03/20/2014 05:04 PM, Ian Campbell wrote:
> ------8<----------------
> 
> From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Thu, 20 Mar 2014 17:02:52 +0000
> Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>

> ---
>  xen/drivers/char/ns16550.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index 429d786..2dd32b2 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
>      uart->stop_bits = 1;
>      /* Default is no transmit FIFO. */
>      uart->fifo_size = 1;
> +    /* Default lsr_mask = UART_LSR_THRE */
> +    uart->lsr_mask = UART_LSR_THRE;
>  
>      res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
>      if ( res )
>
Konrad Rzeszutek Wilk March 20, 2014, 7:08 p.m. UTC | #2
On Thu, Mar 20, 2014 at 05:08:54PM +0000, Julien Grall wrote:
> On 03/20/2014 05:04 PM, Ian Campbell wrote:
> > ------8<----------------
> > 
> > From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
> > From: Ian Campbell <ian.campbell@citrix.com>
> > Date: Thu, 20 Mar 2014 17:02:52 +0000
> > Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> Acked-by: Julien Grall <julien.grall@linaro.org>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

> 
> > ---
> >  xen/drivers/char/ns16550.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> > index 429d786..2dd32b2 100644
> > --- a/xen/drivers/char/ns16550.c
> > +++ b/xen/drivers/char/ns16550.c
> > @@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
> >      uart->stop_bits = 1;
> >      /* Default is no transmit FIFO. */
> >      uart->fifo_size = 1;
> > +    /* Default lsr_mask = UART_LSR_THRE */
> > +    uart->lsr_mask = UART_LSR_THRE;
> >  
> >      res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
> >      if ( res )
> > 
> 
> 
> -- 
> Julien Grall
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
PranavkumarSawargaonkar March 21, 2014, 10:02 a.m. UTC | #3
Hi Ian,

On 20 March 2014 22:34, Ian Campbell <Ian.Campbell@citrix.com> wrote:
> On Thu, 2014-03-20 at 16:47 +0000, Ian Campbell wrote:
>> Unfortunately this patch breaks the console on the arm64 x-gene
>> platform, it drops a fairly large subset of the characters.
>>
>> I'm not sure why yet.
>
> The simple fix is below.
>
> I'm going to take a look at making ns16550_init and ns16550_uart_dt_init
> share a common function for setting up the defaults, but for now I'd
> appreciate getting this bandaid in.
>
> Ian.
>
> ------8<----------------
>
> From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Thu, 20 Mar 2014 17:02:52 +0000
> Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  xen/drivers/char/ns16550.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index 429d786..2dd32b2 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
>      uart->stop_bits = 1;
>      /* Default is no transmit FIFO. */
>      uart->fifo_size = 1;
> +    /* Default lsr_mask = UART_LSR_THRE */
> +    uart->lsr_mask = UART_LSR_THRE;
>
>      res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
>      if ( res )
> --
> 1.7.10.4
>
>
>

It works for me on xgene.

Tested-By: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>

Thanks,
Pranav
Chen Baozi March 21, 2014, 3:05 p.m. UTC | #4
On Mar 21, 2014, at 1:04, Ian Campbell <Ian.Campbell@citrix.com> wrote:

> On Thu, 2014-03-20 at 16:47 +0000, Ian Campbell wrote:
>> Unfortunately this patch breaks the console on the arm64 x-gene
>> platform, it drops a fairly large subset of the characters.
>> 
>> I'm not sure why yet.
> 
> The simple fix is below.
> 
> I'm going to take a look at making ns16550_init and ns16550_uart_dt_init
> share a common function for setting up the defaults, but for now I'd
> appreciate getting this bandaid in.
> 
> Ian.
> 
> ------8<----------------
> 
> From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Thu, 20 Mar 2014 17:02:52 +0000
> Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-By: Chen Baozi <baozich@gmail.com>

> ---
> xen/drivers/char/ns16550.c |    2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index 429d786..2dd32b2 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
>     uart->stop_bits = 1;
>     /* Default is no transmit FIFO. */
>     uart->fifo_size = 1;
> +    /* Default lsr_mask = UART_LSR_THRE */
> +    uart->lsr_mask = UART_LSR_THRE;
> 
>     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
>     if ( res )
> -- 
> 1.7.10.4
> 
> 
> 
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
Ian Campbell March 24, 2014, 12:49 p.m. UTC | #5
(culling cc)

Keir, Ping?

On Thu, 2014-03-20 at 17:04 +0000, Ian Campbell wrote:
> From 4fc6d9c71ae6b40940040910e27ba0f5272a2f27 Mon Sep 17 00:00:00 2001
> From: Ian Campbell <ian.campbell@citrix.com>
> Date: Thu, 20 Mar 2014 17:02:52 +0000
> Subject: [PATCH] ns16550: setup default lsr_mask for DT systems too
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
>  xen/drivers/char/ns16550.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
> index 429d786..2dd32b2 100644
> --- a/xen/drivers/char/ns16550.c
> +++ b/xen/drivers/char/ns16550.c
> @@ -1129,6 +1129,8 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
>      uart->stop_bits = 1;
>      /* Default is no transmit FIFO. */
>      uart->fifo_size = 1;
> +    /* Default lsr_mask = UART_LSR_THRE */
> +    uart->lsr_mask = UART_LSR_THRE;
>  
>      res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
>      if ( res )
diff mbox

Patch

diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index 429d786..2dd32b2 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -1129,6 +1129,8 @@  static int __init ns16550_uart_dt_init(struct dt_device_node *dev,
     uart->stop_bits = 1;
     /* Default is no transmit FIFO. */
     uart->fifo_size = 1;
+    /* Default lsr_mask = UART_LSR_THRE */
+    uart->lsr_mask = UART_LSR_THRE;
 
     res = dt_device_get_address(dev, 0, &uart->io_base, &io_size);
     if ( res )