RE: [PATCH] serial: Add driver for OMAP UARTs

Syed Mohammed, Khasim
2007-04-10T05:36:00Z

Hi Juha,

The serial driver presented is really good, as you said we can enhance the same for DMA, High speed UART, Power Management etc.

One concern I had here was, as we know OMAP supports multiple (3) UART ports and they can be used for IrDA (UART3), Bluetooth (UART2/1), Serial applications etc. All these drivers should configure/use similar register sets. So if we could,

- make the arch/arm/mach-omap2/serial.c more kind of a generic UART API library that can be used by all UART drivers.
- the UART library should handle overall clock /power management policy.
- Centralized interrupt handler.
- DMA / Polling / Interrupt based read/writes.

- The serial driver implemented by you, IrDA and other UART dependent drivers should use the APIs exported by UART library.

- Basically UART dependent drivers should get registered with centralized UART library for interrupt, clock, power and data transfer.

This will avoid redundant code (for DMA, interrupt, PM, clk) in multiple drivers. If we like/agree on this design, I can probably post a patch (RFC) for the same.

Please do let me know your comments / suggestions.

Regards,
Khasim

>-----Original Message-----
>From: linux-omap-open-source-bounces+x0khasim=ti.com@linux.omap.com
>[mailto:linux-omap-open-source-bounces+x0khasim=ti.com@linux.omap.com] On
>Behalf Of Juha Yrjölä
>Sent: Monday, April 09, 2007 3:45 PM
>To: linux-omap-open-source@linux.omap.com
>Subject: [PATCH] serial: Add driver for OMAP UARTs
>
>>From 1b812d197f1451fc03335a999472a25e8c1830c6 Mon Sep 17 00:00:00 2001
>From: Juha Yrjola <juha.yrjola@solidboot.com>
>Date: Mon, 9 Apr 2007 23:43:34 +0300
>Subject: [PATCH] serial: Add driver for OMAP UARTs
>
>An OMAP-specific UART driver is needed when support for advanced
>functionality (such as DMA transfers and power management) is added.
>Currently it helps to work around UART initialization bugs at least
>in the OMAP2420 silicon.
>
>Only OMAP24xx CPUs are supported at the moment, although adding
>support for OMAP1 should not be a big deal.
>
>Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
>---
> arch/arm/configs/n800_defconfig | 8 +-
> arch/arm/configs/omap_2430sdp_defconfig | 12 +-
> arch/arm/configs/omap_apollon_2420_defconfig | 12 +-
> arch/arm/configs/omap_generic_2420_defconfig | 7 +-
> arch/arm/configs/omap_h4_2420_defconfig | 12 +-
> arch/arm/mach-omap2/serial.c | 190 ++----
> drivers/serial/Kconfig | 23 +
> drivers/serial/Makefile | 1 +
> drivers/serial/omap.c | 893
>++++++++++++++++++++++++++
> include/linux/serial_core.h | 2 +
> 10 files changed, 994 insertions(+), 166 deletions(-)
> create mode 100644 drivers/serial/omap.c