xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Chen Baozi <baozich@gmail.com>
Cc: Ian Campbell <Ian.Campbell@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [PATCHv2 3/5] xen/arm: Add the new OMAP UART driver.
Date: Wed, 07 Aug 2013 14:45:26 +0100	[thread overview]
Message-ID: <52024F76.2030503@linaro.org> (raw)
In-Reply-To: <1375881245-25601-4-git-send-email-baozich@gmail.com>

On 08/07/2013 02:14 PM, Chen Baozi wrote:
> TI OMAP UART introduces some features such as register access modes, which
> makes its configuration and interrupt handling differs from 8250 compatible
> UART. Thus, we seperate this driver from ns16550's implementation.
> 
> Signed-off-by: Chen Baozi <baozich@gmail.com>
> ---
>  config/arm32.mk               |   1 +
>  xen/common/device_tree.c      |  15 ++
>  xen/drivers/char/Makefile     |   1 +
>  xen/drivers/char/omap-uart.c  | 352 ++++++++++++++++++++++++++++++++++++++++++
>  xen/include/xen/8250-uart.h   |  59 ++++++-
>  xen/include/xen/device_tree.h |   6 +
>  6 files changed, 431 insertions(+), 3 deletions(-)
>  create mode 100644 xen/drivers/char/omap-uart.c
> 
> diff --git a/config/arm32.mk b/config/arm32.mk
> index 8e21158..76e229d 100644
> --- a/config/arm32.mk
> +++ b/config/arm32.mk
> @@ -11,6 +11,7 @@ CFLAGS += -marm
>  
>  HAS_PL011 := y
>  HAS_EXYNOS4210 := y
> +HAS_OMAP := y
>  
>  # Use only if calling $(LD) directly.
>  LDFLAGS_DIRECT += -EL
> diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
> index 84d704d..b392c60 100644
> --- a/xen/common/device_tree.c
> +++ b/xen/common/device_tree.c
> @@ -574,6 +574,21 @@ const void *dt_get_property(const struct dt_device_node *np,
>      return pp ? pp->value : NULL;
>  }
>  
> +int dt_property_read_u32(const struct dt_device_node *np,
> +                            const char *name, u32 *out_value)
> +{
> +    u32 len;
> +    const __be32 *val;
> +
> +    val = dt_get_property(np, name, &len);
> +    if ( !val || len > 4 )
> +        return 1;
> +
> +    *out_value = be32_to_cpup(val);
> +
> +    return 0;
> +}
> +

This function only returns two values (0 or 1). Can you use bool_t and
return true (ie 1) if it succeeded.

Cheers,

-- 
Julien

  parent reply	other threads:[~2013-08-07 13:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 13:14 [PATCHv2 0/5] Add UART support and arch timer initialization for OMAP5 Chen Baozi
2013-08-07 13:14 ` [PATCHv2 1/5] xen: rename ns16550-uart.h to 8250-uart.h and fix some typos Chen Baozi
2013-08-07 13:55   ` Julien Grall
2013-08-07 13:58     ` Ian Campbell
2013-08-07 13:14 ` [PATCHv2 2/5] xen/arm: add 8250 compatible UART support for early_printk Chen Baozi
2013-08-07 13:14 ` [PATCHv2 3/5] xen/arm: Add the new OMAP UART driver Chen Baozi
2013-08-07 13:40   ` Julien Grall
2013-08-07 13:45   ` Julien Grall [this message]
2013-08-07 13:14 ` [PATCHv2 4/5] xen/arm: Introduce platform recognition codes for the OMAP5 Chen Baozi
2013-08-07 13:14 ` [PATCHv2 5/5] xen/arm: Add OMAP5 architected timer initialization codes Chen Baozi
  -- strict thread matches above, loose matches on Subject: below --
2013-08-07 12:31 [PATCHv2 0/5] Add UART support and arch timer initialization for OMAP5 Chen Baozi
2013-08-07 12:31 ` [PATCHv2 3/5] xen/arm: Add the new OMAP UART driver Chen Baozi

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=52024F76.2030503@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=baozich@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).