[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 2/5] xen/arm: add 8250 compatible UART support for early_printk
On Thu, 2013-08-08 at 20:17 +0800, Chen Baozi wrote: > On Aug 8, 2013, at 8:06 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote: > > > On 08/08/2013 01:04 PM, Chen Baozi wrote: > >> > >> On Aug 8, 2013, at 7:36 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote: > >> > >>> On Thu, 2013-08-08 at 12:34 +0100, Ian Campbell wrote: > >>> > >>>>> diff --git a/xen/include/xen/8250-uart.h b/xen/include/xen/8250-uart.h > >>>>> index 7287364..33daa6d 100644 > >>>>> --- a/xen/include/xen/8250-uart.h > >>>>> +++ b/xen/include/xen/8250-uart.h > >>>>> @@ -22,6 +22,10 @@ > >>>>> #ifndef __XEN_8250_UART_H__ > >>>>> #define __XEN_8250_UART_H__ > >>>>> > >>>>> +#ifdef CONFIG_ARM > >>>>> +#define REG_SHIFT 2 > >>>>> +#endif > >>>> > >>>> I think this should actually be part of the per-platform early-printk > >>>> block, e.g. EARLY_UART_REG_SHIFT > >>> > >>> I should have also said that for non-early drivers this should come from > >>> the device tree. > >>> > >>> Possibly in the case of your OMAP speciifc driver it could be hardcoded, > >>> but only if it isn't in DT IMHO. > >> > >> It seems OMAP5's DT doesn't have this info? Does exynos5 have it? > > > > Exynos5 uses a different UART which doesn't need shift. > > I don't think DT would hold that info. (Fix me if I'm wrong.) Actually this > shift > comes from the different register size between OMAP UART (32-bit) and common > 8250 > UART (8-bit). And we would like to share the offset macros between the two > similar > UART. For those UART doesn't share offset macros with others or they do have > same > register size, the shift is not necessary. linux/Documentation/devicetree/bindings/tty/serial/of-serial.txt defines reg-shift, so do a few other bindings. DT is all about defining how the hardware is wired up, and different register layouts, arising from (effectively) choosing to wire different CPU address lines to the UART address lines, is a part of this. Ian. > > Baozi _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |