[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v8 8/5] Add UART support and arch timer initialization for OMAP5

Since OMAP UART has a few distinct features than common 8250 UART, I
re-implemented its driver rather than porting it based on ns16550.c.
There are mainly two big differences between the implementations. First,
OMAP UART introduces the concept of register access mode, which divides
the register map into seperated space. Switching the access mode is then
necessary when configuring it. Second, THRE interrupt needs to be disable
after finished transmission and enabled once transmission started. This
is because the semantic of THRE interrupt differs from common 8250 in TI's
implementation, which would be generated if TX FIFO below trigger level
and cannot be cleared by simply write to THR once.

Besides UART driver, arch timer initialization for OMAP5432 platform
is also done in this patch series.

v8 <- v7:
- Only modifying THRE bit when enable/disable THRE interrupt in patch #4.

v7 <- v6:
- Fix a bug in patch #3.
- Fix type problems Julien pointed out in patch #4.
- Add vuart_info callback for omap-uart driver.

v6 <- v5:
- Add EARLY_UART_REG_SHIFT and remove REG_SHIFT in 8250-uart.h
- Define REG_SHIFT in omap-uart.c rather than 8250-uart.h, since Linux
  also uses hardcoded regshift in omap-uart driver and there is no
  reg-shift of UART defined in OMAP5's DT.
- Separate dt_property_read_u32 introduction into a single patch.
- Fix some typos.

v5 <- v4:
- Separate dt specified arch_timer clkfrq setup into patch #4.

v4 <- v3:
- Merege #4 and #5 in v3 into one patch.
- Fix some coding-style and comments.

v3 <- v2:
- [3/5] Use bool_t as the return type of dt_property_read_u32.
- [3/5] Use sizeof(*out_value) instead of hardcoded value in 
- [3/5] Fix some coding-style problems and some typos.

v2 <- v1:
- [2/5] Add early printk support for sun6i.

- [3/5] Introduce dt_property_read_u32() helper to get clock-frequency.
- [3/5] Use ioreadl/iowritel instead of uart->regs[...] in OMAP UART driver.
- [3/5] Change do-while structure to while in OMAP UART interrupt handler.
- [3/5] Use hardcoded value when setting up OMAP UART.
- [3/5] Won't enable IRQ if setup failed in init_postirq().
- [3/5] Fix coding-style problems and some typos.
- [3/5] Remove unnecessary define.

- [4/5] Remove the macros that would be used in future.

- [5/5] Use dt_property_read_u32() helper to get clock-frequency.

Chen Baozi (6):
  xen: rename ns16550-uart.h to 8250-uart.h and fix some typos
  xen/arm: add 8250 compatible UART support for early_printk
  xen: Introduce a helper to read a u32 property in device tree.
  xen/arm: Add the new OMAP UART driver.
  xen/arm: Add support for device tree specified arch_timer clock
  xen/arm: Platform recognition and initialize arch_timer for the OMAP5

 config/arm32.mk                                 |   1 +
 docs/misc/arm/early-printk.txt                  |   3 +
 xen/arch/arm/Rules.mk                           |  16 +
 xen/arch/arm/arm32/debug-8250.inc               |  41 +++
 xen/arch/arm/platforms/Makefile                 |   1 +
 xen/arch/arm/platforms/omap5.c                  | 117 ++++++++
 xen/arch/arm/time.c                             |   7 +-
 xen/common/device_tree.c                        |  15 +
 xen/drivers/char/Makefile                       |   1 +
 xen/drivers/char/ns16550.c                      |   2 +-
 xen/drivers/char/omap-uart.c                    | 374 ++++++++++++++++++++++++
 xen/include/asm-arm/platforms/omap5.h           |  25 ++
 xen/include/xen/{ns16550-uart.h => 8250-uart.h} |  69 ++++-
 xen/include/xen/device_tree.h                   |  11 +
 14 files changed, 672 insertions(+), 11 deletions(-)
 create mode 100644 xen/arch/arm/arm32/debug-8250.inc
 create mode 100644 xen/arch/arm/platforms/omap5.c
 create mode 100644 xen/drivers/char/omap-uart.c
 create mode 100644 xen/include/asm-arm/platforms/omap5.h
 rename xen/include/xen/{ns16550-uart.h => 8250-uart.h} (63%)


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.