All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyrille Pitchen <cyrille.pitchen@atmel.com>
To: <nicolas.ferre@atmel.com>, <gregkh@linuxfoundation.org>,
	<wenyou.yang@atmel.com>, <ludovic.desroches@atmel.com>,
	<leilei.zhao@atmel.com>, <josh.wu@atmel.com>,
	<alexandre.belloni@free-electrons.com>,
	<linux-serial@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>, <galak@codeaurora.org>,
	<ijc+devicetree@hellion.org.uk>, <mark.rutland@arm.com>,
	<pawel.moll@arm.com>, <robh+dt@kernel.org>,
	Cyrille Pitchen <cyrille.pitchen@atmel.com>
Subject: [PATCH linux-next v2 0/4] tty/serial: at91: add support to FIFOs
Date: Thu, 11 Jun 2015 18:20:13 +0200	[thread overview]
Message-ID: <cover.1434038494.git.cyrille.pitchen@atmel.com> (raw)

ChangeLog

v2:
- remove "atmel,rts-high-threshold" and "atmel,rts-low-threshold" from new
  DT properties. For now these two thresholds are set once for all during the
  probe but a later patch might allow to configure them at run time.
- reword the commit message of the DT property patch to better explain why we
  have chosen to introduce the new property "atmel,fifo-size".
- add a missing chunk in the FIFO patch: as the commit message explains, we
  need to use 8bit accesses when dealing with the Transmit/Receive Holding
  Registers.

v1:
This series of patches add support to FIFOs which will be introduced with Atmel
sama5d2x SoC.

FIFOs allow to reduce the number of I/O access. Indeed depending on the data
size and the USART mode, FIFOs work in either single or multiple data. For
multiple data, up to 4 data can be written into the Transmit Holding Register
or read from the Receive Holding Register in a single word access.

Also the RX FIFO allows to reduce the risk of receive overrun and data loss,
especially when the DMA controller is not used.

Finally, when the hardware handshake mode is selected, the RTS line can now be
controlled by two thresholds on the RX FIFO. When FIFO level (the number of
data available to be read) crosses the high threshold, the RTS line is set to
high level telling the peer that it should stop sending new data. Data are read
from the RX FIFO and when the FIFO level crosses the low threshold, the RTS
is set back to low level telling the remote peer that it can send data again.

This new feature resolves a long time hardware limitation where the RTS line
was directly controlled by a PDC signal. There is no equivalent of that signal
for the DMA controller so for all SoCs without PDC for USART there was no mean
to control the RTS line properly: once the hardware handshake mode selected,
the RTS line remains high level. Next SoCs with FIFOs will be able to use the
hardware handshake mode thanks to the RX FIFO.

Cyrille Pitchen (4):
  ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs
  tty/serial: at91: fix some macro definitions to fit coding style
  tty/serial: at91: add support to FIFOs
  tty/serial: at91: use 32bit writes into TX FIFO when DMA is enabled

 .../devicetree/bindings/serial/atmel-usart.txt     |   3 +
 drivers/tty/serial/atmel_serial.c                  | 193 +++++++++++++----
 include/linux/atmel_serial.h                       | 240 ++++++++++++---------
 3 files changed, 293 insertions(+), 143 deletions(-)

-- 
1.8.2.2


WARNING: multiple messages have this Message-ID (diff)
From: Cyrille Pitchen <cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
To: nicolas.ferre-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
	wenyou.yang-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	ludovic.desroches-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	leilei.zhao-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	josh.wu-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org,
	alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org,
	linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org,
	ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	pawel.moll-5wv7dgnIgG8@public.gmane.org,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	Cyrille Pitchen
	<cyrille.pitchen-AIFe0yeh4nAAvxtiuMwx3w@public.gmane.org>
Subject: [PATCH linux-next v2 0/4] tty/serial: at91: add support to FIFOs
Date: Thu, 11 Jun 2015 18:20:13 +0200	[thread overview]
Message-ID: <cover.1434038494.git.cyrille.pitchen@atmel.com> (raw)

ChangeLog

v2:
- remove "atmel,rts-high-threshold" and "atmel,rts-low-threshold" from new
  DT properties. For now these two thresholds are set once for all during the
  probe but a later patch might allow to configure them at run time.
- reword the commit message of the DT property patch to better explain why we
  have chosen to introduce the new property "atmel,fifo-size".
- add a missing chunk in the FIFO patch: as the commit message explains, we
  need to use 8bit accesses when dealing with the Transmit/Receive Holding
  Registers.

v1:
This series of patches add support to FIFOs which will be introduced with Atmel
sama5d2x SoC.

FIFOs allow to reduce the number of I/O access. Indeed depending on the data
size and the USART mode, FIFOs work in either single or multiple data. For
multiple data, up to 4 data can be written into the Transmit Holding Register
or read from the Receive Holding Register in a single word access.

Also the RX FIFO allows to reduce the risk of receive overrun and data loss,
especially when the DMA controller is not used.

Finally, when the hardware handshake mode is selected, the RTS line can now be
controlled by two thresholds on the RX FIFO. When FIFO level (the number of
data available to be read) crosses the high threshold, the RTS line is set to
high level telling the peer that it should stop sending new data. Data are read
from the RX FIFO and when the FIFO level crosses the low threshold, the RTS
is set back to low level telling the remote peer that it can send data again.

This new feature resolves a long time hardware limitation where the RTS line
was directly controlled by a PDC signal. There is no equivalent of that signal
for the DMA controller so for all SoCs without PDC for USART there was no mean
to control the RTS line properly: once the hardware handshake mode selected,
the RTS line remains high level. Next SoCs with FIFOs will be able to use the
hardware handshake mode thanks to the RX FIFO.

Cyrille Pitchen (4):
  ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs
  tty/serial: at91: fix some macro definitions to fit coding style
  tty/serial: at91: add support to FIFOs
  tty/serial: at91: use 32bit writes into TX FIFO when DMA is enabled

 .../devicetree/bindings/serial/atmel-usart.txt     |   3 +
 drivers/tty/serial/atmel_serial.c                  | 193 +++++++++++++----
 include/linux/atmel_serial.h                       | 240 ++++++++++++---------
 3 files changed, 293 insertions(+), 143 deletions(-)

-- 
1.8.2.2

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: cyrille.pitchen@atmel.com (Cyrille Pitchen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH linux-next v2 0/4] tty/serial: at91: add support to FIFOs
Date: Thu, 11 Jun 2015 18:20:13 +0200	[thread overview]
Message-ID: <cover.1434038494.git.cyrille.pitchen@atmel.com> (raw)

ChangeLog

v2:
- remove "atmel,rts-high-threshold" and "atmel,rts-low-threshold" from new
  DT properties. For now these two thresholds are set once for all during the
  probe but a later patch might allow to configure them at run time.
- reword the commit message of the DT property patch to better explain why we
  have chosen to introduce the new property "atmel,fifo-size".
- add a missing chunk in the FIFO patch: as the commit message explains, we
  need to use 8bit accesses when dealing with the Transmit/Receive Holding
  Registers.

v1:
This series of patches add support to FIFOs which will be introduced with Atmel
sama5d2x SoC.

FIFOs allow to reduce the number of I/O access. Indeed depending on the data
size and the USART mode, FIFOs work in either single or multiple data. For
multiple data, up to 4 data can be written into the Transmit Holding Register
or read from the Receive Holding Register in a single word access.

Also the RX FIFO allows to reduce the risk of receive overrun and data loss,
especially when the DMA controller is not used.

Finally, when the hardware handshake mode is selected, the RTS line can now be
controlled by two thresholds on the RX FIFO. When FIFO level (the number of
data available to be read) crosses the high threshold, the RTS line is set to
high level telling the peer that it should stop sending new data. Data are read
from the RX FIFO and when the FIFO level crosses the low threshold, the RTS
is set back to low level telling the remote peer that it can send data again.

This new feature resolves a long time hardware limitation where the RTS line
was directly controlled by a PDC signal. There is no equivalent of that signal
for the DMA controller so for all SoCs without PDC for USART there was no mean
to control the RTS line properly: once the hardware handshake mode selected,
the RTS line remains high level. Next SoCs with FIFOs will be able to use the
hardware handshake mode thanks to the RX FIFO.

Cyrille Pitchen (4):
  ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs
  tty/serial: at91: fix some macro definitions to fit coding style
  tty/serial: at91: add support to FIFOs
  tty/serial: at91: use 32bit writes into TX FIFO when DMA is enabled

 .../devicetree/bindings/serial/atmel-usart.txt     |   3 +
 drivers/tty/serial/atmel_serial.c                  | 193 +++++++++++++----
 include/linux/atmel_serial.h                       | 240 ++++++++++++---------
 3 files changed, 293 insertions(+), 143 deletions(-)

-- 
1.8.2.2

             reply	other threads:[~2015-06-11 16:20 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 16:20 Cyrille Pitchen [this message]
2015-06-11 16:20 ` [PATCH linux-next v2 0/4] tty/serial: at91: add support to FIFOs Cyrille Pitchen
2015-06-11 16:20 ` Cyrille Pitchen
2015-06-11 16:20 ` [PATCH linux-next v2 1/4] ARM: at91/dt: add a new DT property to support FIFOs on Atmel USARTs Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-18 16:39   ` Alexandre Belloni
2015-06-18 16:39     ` Alexandre Belloni
2015-06-29 13:00   ` Nicolas Ferre
2015-06-29 13:00     ` Nicolas Ferre
2015-06-29 13:00     ` Nicolas Ferre
2015-06-11 16:20 ` [PATCH linux-next v2 2/4] tty/serial: at91: fix some macro definitions to fit coding style Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-18 16:39   ` Alexandre Belloni
2015-06-18 16:39     ` Alexandre Belloni
2015-06-18 16:39     ` Alexandre Belloni
2015-06-29 13:00   ` Nicolas Ferre
2015-06-29 13:00     ` Nicolas Ferre
2015-06-29 13:00     ` Nicolas Ferre
2015-06-11 16:20 ` [PATCH linux-next v2 3/4] tty/serial: at91: add support to FIFOs Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-18 16:36   ` Alexandre Belloni
2015-06-18 16:36     ` Alexandre Belloni
2015-06-18 16:36     ` Alexandre Belloni
2015-06-29 13:11   ` Nicolas Ferre
2015-06-29 13:11     ` Nicolas Ferre
2015-06-29 13:11     ` Nicolas Ferre
2015-06-11 16:20 ` [PATCH linux-next v2 4/4] tty/serial: at91: use 32bit writes into TX FIFO when DMA is enabled Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-11 16:20   ` Cyrille Pitchen
2015-06-29 13:28   ` Nicolas Ferre
2015-06-29 13:28     ` Nicolas Ferre
2015-06-29 13:28     ` Nicolas Ferre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1434038494.git.cyrille.pitchen@atmel.com \
    --to=cyrille.pitchen@atmel.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=josh.wu@atmel.com \
    --cc=leilei.zhao@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=ludovic.desroches@atmel.com \
    --cc=mark.rutland@arm.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=wenyou.yang@atmel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.