[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] ns16550: Add compatible string for Raspberry Pi 4
On Wed, 24 Jul 2019 14:34:55 +0000 Stewart Hildebrand <Stewart.Hildebrand@xxxxxxxxxxxxxxx> wrote: Hi, I am afraid this is not enough. In your repo you hack the DT to contain the reg-shift and io-width properties, but those are not part of the "brcm,bcm2835-aux-uart" binding. Using 32-bit accesses is an integral property of this UART, and since it is only *somewhat* compatible to an 8250 or DW UART, it cannot use that binding. So I had the following additional hunk in: @@ -1572,6 +1572,12 @@ static int __init ns16550_uart_dt_init(struct dt_device_node *dev, if ( uart->reg_width != 1 && uart->reg_width != 4 ) return -EINVAL; + if ( dt_device_is_compatible(dev, "brcm,bcm2835-aux-uart") ) + { + uart->reg_width = 4; + uart->reg_shift = 2; + } + res = platform_get_irq(dev, 0); if ( ! res ) return -EINVAL; Feel free to use that snippet, that should work with the normal DT. Cheers, Andre. > Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxxxxxxxxxx> > --- > xen/drivers/char/ns16550.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c > index e518f2d790..c8d7c9b710 100644 > --- a/xen/drivers/char/ns16550.c > +++ b/xen/drivers/char/ns16550.c > @@ -1611,6 +1611,7 @@ static const struct dt_device_match ns16550_dt_match[] > __initconst = > DT_MATCH_COMPATIBLE("ns16550"), > DT_MATCH_COMPATIBLE("ns16550a"), > DT_MATCH_COMPATIBLE("snps,dw-apb-uart"), > + DT_MATCH_COMPATIBLE("brcm,bcm2835-aux-uart"), > { /* sentinel */ }, > }; > -- > 2.22.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |