All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH] pl011: early_panic if baud rate not set in hardware
Date: Thu, 22 Aug 2013 17:34:20 +0100	[thread overview]
Message-ID: <52163D8C.5050404@linaro.org> (raw)
In-Reply-To: <1377187319-30598-1-git-send-email-ian.campbell@citrix.com>

On 08/22/2013 05:01 PM, Ian Campbell wrote:
> Now that the driver defaults to BAUD_AUTO this can happen if the early uart !=
> console or if early printk isn't in use.

Does the fast model set correctly the baud rate?

> The following division by zero causes a trap but that uses regular printk and
> not early_printk, so it is never seen.

That's annoying. I often have this problem, is there any plan to support
early print in printk?

> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Julien Grall <julien.grall@linaro.org>
> ---
>  xen/drivers/char/pl011.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
> index 0e1eb64..7eb90b0 100644
> --- a/xen/drivers/char/pl011.c
> +++ b/xen/drivers/char/pl011.c
> @@ -104,6 +104,8 @@ static void __init pl011_init_preirq(struct serial_port *port)
>      {
>          /* Baud rate already set: read it out from the divisor latch. */
>          divisor = (pl011_read(uart, IBRD) << 6) | (pl011_read(uart, FBRD));
> +        if (!divisor)
> +            early_panic("pl011: No Baud rate configured\n");
>          uart->baud = (uart->clock_hz << 2) / divisor;
>      }
>      /* This write must follow FBRD and IBRD writes. */
> 


-- 
Julien Grall

  reply	other threads:[~2013-08-22 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 16:01 [PATCH] pl011: early_panic if baud rate not set in hardware Ian Campbell
2013-08-22 16:34 ` Julien Grall [this message]
2013-08-22 18:49   ` Ian Campbell
2013-08-22 21:09     ` Julien Grall
2013-08-23  0:41       ` Chen Baozi
2013-08-27 13:46   ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52163D8C.5050404@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.