|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv2 3/5] xen/arm: Add the new OMAP UART driver.
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@xxxxxxxxx>
> ---
> 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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |