aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorLudovic Desroches <ludovic.desroches@atmel.com>2016-06-17 12:05:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-25 13:38:37 -0700
commit637ba54f6051903e1f0011b75ee36b2a29696c6d (patch)
tree5460e5b33bcb0c76f0cce88c798b6070c3068edd /drivers/tty/serial
parenttty/serial: atmel: split tx and rx paths (diff)
downloadlinux-dev-637ba54f6051903e1f0011b75ee36b2a29696c6d.tar.xz
linux-dev-637ba54f6051903e1f0011b75ee36b2a29696c6d.zip
tty/serial: atmel: add comment for the ring buffer size macro
There is a macro named ATMEL_SERIAL_RINGSIZE which suggesting that it corresponds to the real size of the ring buffer. Let warn people that there is a factor of four since allocation size is sizeof(struct atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/atmel_serial.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 6c1ec7d0d497..857016367a7a 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -108,6 +108,12 @@ struct atmel_uart_char {
u16 ch;
};
+/*
+ * Be careful, the real size of the ring buffer is
+ * sizeof(atmel_uart_char) * ATMEL_SERIAL_RINGSIZE. It means that ring buffer
+ * can contain up to 1024 characters in PIO mode and up to 4096 characters in
+ * DMA mode.
+ */
#define ATMEL_SERIAL_RINGSIZE 1024
/*