OpenCloudOS-Kernel/include/linux/amba
Chanho Min cb06ff102e ARM: PL011: Add support for Rx DMA buffer polling.
In DMA support, The received data is not pushed to tty until the DMA buffer
is filled. But some megabyte rate chips such as BT expect fast response and
data should be pushed immediately. In order to fix this issue, We suggest
the use of the timer for polling DMA buffer.
In our test, no data loss occurred at high-baudrate as compared with interrupt-
driven (We tested with 3Mbps).
We changes:

- We add timer for polling. If we set poll_timer to 10, every 10ms,
 timer handler checks the residue in the dma buffer and transfer data
 to the tty. Also, last_residue is updated for the next polling.

- poll_timeout is used to prevent the timer's system cost.
  If poll_timeout is set to 3000 and no data is received in 3 seconds,
  we inactivate poll timer and driver falls back to interrupt-driven.
  When data is received again in FIFO and UART irq is occurred, we switch
  back to DMA mode and start polling.

- We use consistent DMA mappings to avoid from the frequent cache operation
  of the timer function for default.

- pl011_dma_rx_chars is modified. the pending size is recalculated because
  data can be taken by polling.

- the polling time is adjusted if dma rx poll is enabled but no rate is
  specified. Ideal polling interval to push 1 character at every interval
  is the reciprocal of 'baud rate / 10 line bits per character / 1000 ms
  per sec'. But It is very aggressive to system. Experimentally,
 '10000000 / baud' is suitable to receive dozens of characters. the poll rate
 can be specified statically by dma_rx_poll_rate of the platform data as well.

Changes compared to v1:
 - Use of consistent DMA mappings.
 - Added dma_rx_poll_rate in platform data to specify the polling interval.
 - Added dma_rx_poll_timeout in platform data to specify the polling timeout.

Changes compared to v2:
 - Use of consistent DMA mappings for default.
 - Added dma_rx_poll_enable in platform data to adjust the polling time
   according to the baud rate.
 - remove unnecessary lock from the polling function.

Signed-off-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-29 09:20:05 -07:00
..
bus.h ARM: 7588/1: amba: create a resource parent registrator 2012-12-03 11:15:35 +00:00
clcd.h Fix common misspellings 2011-03-31 11:26:23 -03:00
kmi.h
mmci.h ARM: 7219/1: mmc: mmci: Change vdd_handler to a generic ios_handler 2012-01-20 00:00:56 +00:00
pl08x.h dmaengine: PL08x: get rid of unnecessary checks in dma_slave_config 2012-07-01 14:15:48 +01:00
pl022.h spi/pl022: Add chip select handling via GPIO 2012-08-22 20:00:44 +01:00
pl061.h gpio: pl061: convert to use 0 for no irq 2012-01-04 10:10:19 -06:00
pl080.h pl080.h: moved from arm/include/asm/hardware to include/linux/amba/ 2013-01-13 05:19:45 -08:00
pl093.h ARM: PL093: Header file for PL093 SSMC PrimeCell 2009-07-30 23:22:54 +01:00
pl330.h DMA: PL330: Merge PL330 driver into drivers/dma/ 2012-03-08 17:59:28 +05:30
serial.h ARM: PL011: Add support for Rx DMA buffer polling. 2013-03-29 09:20:05 -07:00
sp810.h arm: Move sp810.h to include/linux/amba/ 2013-01-30 15:55:45 +00:00