Merged in david_s5/nuttx/upstream_stm_dma (pull request #355)

stm32: serial Allow configuring Rx DMA buffer size

Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
David Sidrane
2017-05-06 17:49:48 +00:00
committed by Gregory Nutt
2 changed files with 19 additions and 2 deletions
+13
View File
@@ -6165,6 +6165,19 @@ if STM32_SERIALDRIVER
comment "Serial Driver Configuration"
config STM32_SERIAL_RXDMA_BUFFER_SIZE
int "Rx DMA buffer size"
default 32
range 32 4096
depends on USART1_RXDMA || USART2_RXDMA || USART3_RXDMA || UART4_RXDMA || UART5_RXDMA || USART6_RXDMA || UART7_RXDMA || UART8_RXDMA
---help---
The DMA buffer size when using RX DMA to emulate a FIFO.
When streaming data, the generic serial layer will be called
every time the FIFO receives half or this number of bytes.
Value given here will be rounded up to next multiple of 4 bytes.
config SERIAL_DISABLE_REORDERING
bool "Disable reordering of ttySx devices."
depends on STM32_USART1 || STM32_USART2 || STM32_USART3 || STM32_UART4 || STM32_UART5 || STM32_USART6 || STM32_UART7 || STM32_UART8
+6 -2
View File
@@ -182,8 +182,12 @@
* When streaming data, the generic serial layer will be called
* every time the FIFO receives half this number of bytes.
*/
# define RXDMA_BUFFER_SIZE 32
# if !defined(CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE)
# define CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE 32
# endif
# define RXDMA_MUTIPLE 4
# define RXDMA_BUFFER_SIZE ((CONFIG_STM32_SERIAL_RXDMA_BUFFER_SIZE \
+ RXDMA_MUTIPLE) & ~RXDMA_MUTIPLE)
/* DMA priority */