All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH DRAFT 0/2] Sketch for ZTE ZX296702 UART integration
@ 2015-11-02 12:24 ` Andre Przywara
  0 siblings, 0 replies; 72+ messages in thread
From: Andre Przywara @ 2015-11-02 12:24 UTC (permalink / raw)
  To: Jun Nie, Peter Hurley, Timur Tabi
  Cc: Andrew.Jackson, Russell King, linux-arm-kernel, linux-serial

Hi,

there has been some discussion on how to integrate support for the
ZTE ZX296702 UART, which is very similar to the PL011, but (among
other deviations) has its registers at different offsets from the base
address.
Previous patches on the list [1] were reworking the whole of the PL011
driver, creating extra churn for all architecture compliant
implementations.
This sketch introduces register accessor wrappers in patch 1, which
are useful for other things as well later. Ideally the generated
code should look identical after this one, given the compiler properly
inlines the accessor functions.
Based on that patch 2 then introduces a mapping table just for the
ZTE UART, which redirects the original PL011 register offsets to the
shifted positions on the ZTE UART.
The impact on all other implementations are kept minimal, actually if
the CONFIG_ symbol for that SoC is not defined, there should be no
code difference compared to the state before.

I don't have access to the ZTE UART hardware, so could not test this
(this patch set is not complete anyway), but I quickly tested for
regressions on a Juno, which seems to work fine for me.

I provide these patches as a base for discussion and for future,
proper support patches.
Do these make sense to anyone? Is this the way to go for the ZTE UART
implementation?

Any comments are appreciated.

Cheers,
Andre.

[1] http://marc.info/?l=linux-serial&m=143832897928885&w=2

Andre Przywara (2):
  drivers: serial: PL011: refactor register access
  drivers: serial: PL011: [DRAFT] implement register diverson for ZTE
    UART

 drivers/tty/serial/amba-pl011.c | 246 +++++++++++++++++++++++-----------------
 include/linux/amba/serial.h     |  10 ++
 2 files changed, 155 insertions(+), 101 deletions(-)

-- 
2.5.1

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2015-12-13  6:03 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-02 12:24 [PATCH DRAFT 0/2] Sketch for ZTE ZX296702 UART integration Andre Przywara
2015-11-02 12:24 ` Andre Przywara
2015-11-02 12:24 ` [PATCH DRAFT 1/2] drivers: serial: PL011: refactor register access Andre Przywara
2015-11-02 12:24   ` Andre Przywara
2015-11-02 13:27   ` Timur Tabi
2015-11-02 13:27     ` Timur Tabi
2015-11-02 13:40     ` Andre Przywara
2015-11-02 13:40       ` Andre Przywara
2015-11-02 13:44       ` Timur Tabi
2015-11-02 13:44         ` Timur Tabi
2015-11-02 12:24 ` [PATCH DRAFT 2/2] drivers: serial: PL011: [DRAFT] implement register diverson for ZTE UART Andre Przywara
2015-11-02 12:24   ` Andre Przywara
2015-11-03 13:46   ` Russell King - ARM Linux
2015-11-03 13:46     ` Russell King - ARM Linux
2015-11-03 13:57     ` Andre Przywara
2015-11-03 13:57       ` Andre Przywara
2015-11-05  9:54     ` Jun Nie
2015-11-05  9:54       ` Jun Nie
2015-11-03 14:23   ` Russell King - ARM Linux
2015-11-03 14:23     ` Russell King - ARM Linux
2015-11-03 14:30     ` Andre Przywara
2015-11-03 14:30       ` Andre Przywara
2015-11-03 13:43 ` [PATCH DRAFT 0/2] Sketch for ZTE ZX296702 UART integration Russell King - ARM Linux
2015-11-03 13:43   ` Russell King - ARM Linux
2015-11-03 14:48   ` Russell King - ARM Linux
2015-11-03 14:48     ` Russell King - ARM Linux
2015-11-03 14:50   ` [PATCH 01/11] tty: amba-pl011: add register accessor functions Russell King
2015-11-03 14:50     ` Russell King
2015-11-03 14:53     ` Timur Tabi
2015-11-03 14:53       ` Timur Tabi
2015-11-03 15:18       ` Russell King - ARM Linux
2015-11-03 15:18         ` Russell King - ARM Linux
2015-11-03 14:51   ` [PATCH 02/11] tty: amba-pl011: convert accessor functions to take uart_amba_port Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 03/11] tty: amba-pl011: add helper to detect split LCRH register Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 04/11] tty: amba-pl011: prepare REG_* register indexes Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 05/11] tty: amba-pl011: add register lookup table Russell King
2015-11-03 14:51     ` Russell King
2015-11-06  0:00     ` Timur Tabi
2015-11-06  0:00       ` Timur Tabi
2015-11-06  0:24       ` Russell King - ARM Linux
2015-11-06  0:24         ` Russell King - ARM Linux
2015-11-06  0:27         ` Timur Tabi
2015-11-06  0:27           ` Timur Tabi
2015-12-13  6:03     ` Greg Kroah-Hartman
2015-12-13  6:03       ` Greg Kroah-Hartman
2015-11-03 14:51   ` [PATCH 06/11] tty: amba-pl011: add register offset table to vendor data Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 07/11] tty: amba-pl011: add ST register offset table Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 08/11] tty: amba-pl011: clean up LCR register offsets Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 09/11] tty: amba-pl011: remove ST micro registers from standard table Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:51   ` [PATCH 10/11] tty: amba-pl011: add support for 32-bit register access Russell King
2015-11-03 14:51     ` Russell King
2015-11-03 14:57     ` Timur Tabi
2015-11-03 14:57       ` Timur Tabi
2015-11-03 16:19       ` Russell King - ARM Linux
2015-11-03 16:19         ` Russell King - ARM Linux
2015-11-05  4:46         ` Peter Hurley
2015-11-05  4:46           ` Peter Hurley
2015-11-03 14:51   ` [PATCH 11/11] tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL) Russell King
2015-11-03 14:51     ` Russell King
2015-11-05  8:28     ` Linus Walleij
2015-11-05  8:28       ` Linus Walleij
2015-11-05  9:27       ` Russell King - ARM Linux
2015-11-05  9:27         ` Russell King - ARM Linux
2015-11-05  9:54         ` Linus Walleij
2015-11-05  9:54           ` Linus Walleij

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.