From: Mikko Perttunen <cyndis@kapsi.fi>
To: Thierry Reding <thierry.reding@gmail.com>,
Mikko Perttunen <mperttunen@nvidia.com>
Cc: jassisinghbrar@gmail.com, gregkh@linuxfoundation.org,
jonathanh@nvidia.com, devicetree@vger.kernel.org,
linux-serial@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 6/8] serial: Add Tegra Combined UART driver
Date: Mon, 2 Jul 2018 16:30:07 +0300 [thread overview]
Message-ID: <50c4702b-3d59-e443-5075-c888f83a2615@kapsi.fi> (raw)
In-Reply-To: <20180702131851.GH13096@ulmo>
On 02.07.2018 16:18, Thierry Reding wrote:
> On Mon, Jul 02, 2018 at 02:40:31PM +0300, Mikko Perttunen wrote:
>> The Tegra Combined UART (TCU) is a mailbox-based mechanism that allows
>> multiplexing multiple "virtual UARTs" into a single hardware serial
>> port. The TCU is the primary serial port on Tegra194 devices.
>>
>> Add a TCU driver utilizing the mailbox framework, as the used mailboxes
>> are part of Tegra HSP blocks that are already controlled by the Tegra
>> HSP mailbox driver.
>>
>> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
>> ---
>>
>> Notes:
>> v2:
>> - Removed (void) casts for unused variables.
>> - Changed the uart_set_options() call to be on one line, even if its
>> over 80 characters.
>> - Added defines for magic numbers.
>> - Style fixes.
>> - Changed Kconfig entry to depend on the Tegra HSP driver instead of
>> just the mailbox framework.
>>
>> v3:
>> - Removed FLUSH bit, as it's unnecessary and slows down printing
>> - Removed call to uart_set_options
>> - Added mbox_free_channel calls to remove()
>>
>> drivers/tty/serial/Kconfig | 9 ++
>> drivers/tty/serial/Makefile | 1 +
>> drivers/tty/serial/tegra-tcu.c | 291 +++++++++++++++++++++++++++++++++++++++
>> include/uapi/linux/serial_core.h | 3 +
>> 4 files changed, 304 insertions(+)
>> create mode 100644 drivers/tty/serial/tegra-tcu.c
>
> The driver looks good to me. But for my own understanding, is there some
> way we can make use of the multiplexing? That is, could we add a
> mechanism to have the driver filter out only a specific stream? Could we
> also specify which stream to send data back to? What happens by default?
> Which stream is data sent to?
There is no multiplexing on the producer/device side (i.e. what this
driver does). The mailbox specified in device tree specifies the stream
we send stuff to. The mailboxes are per-CPU (we use the CCPLEX mailbox
here), so it cannot really be changed.
The consumer then sees the multiplexing in that it can receive from and
transmit to all of the various CPUs in the system at the same time. AIUI
there is also a secondary form of multiplexing where the outputs of
different VMs can be multiplexed by the hypervisor, but I'm not very
familiar with that.
Mikko
>
> Thierry
>
next prev parent reply other threads:[~2018-07-02 13:30 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 11:40 [PATCH v3 0/8] " Mikko Perttunen
2018-07-02 11:40 ` [PATCH v3 1/8] dt-bindings: tegra186-hsp: Add shared interrupts Mikko Perttunen
2018-07-02 12:37 ` Thierry Reding
2018-07-02 11:40 ` [PATCH v3 2/8] dt-bindings: serial: Add bindings for nvidia,tegra194-tcu Mikko Perttunen
2018-07-02 12:51 ` Thierry Reding
2018-07-02 11:40 ` [PATCH v3 3/8] mailbox: Add transmit done by blocking option Mikko Perttunen
2018-07-02 13:09 ` Thierry Reding
2018-07-10 15:49 ` Thierry Reding
2018-08-03 12:54 ` Jassi Brar
2018-08-04 10:45 ` Mikko Perttunen
2018-08-08 11:38 ` Mikko Perttunen
2018-08-08 14:10 ` Jassi Brar
2018-08-08 14:34 ` Mikko Perttunen
2018-08-08 14:39 ` Jassi Brar
2018-08-08 14:46 ` Mikko Perttunen
2018-08-09 8:49 ` Mikko Perttunen
2018-08-09 9:26 ` Jassi Brar
2018-07-02 11:40 ` [PATCH v3 4/8] mailbox: tegra-hsp: Refactor in preparation of mailboxes Mikko Perttunen
2018-07-02 13:12 ` Thierry Reding
2018-07-02 11:40 ` [PATCH v3 5/8] mailbox: tegra-hsp: Add support for shared mailboxes Mikko Perttunen
2018-07-02 13:13 ` Thierry Reding
2018-07-02 11:40 ` [PATCH v3 6/8] serial: Add Tegra Combined UART driver Mikko Perttunen
2018-07-02 13:18 ` Thierry Reding
2018-07-02 13:30 ` Mikko Perttunen [this message]
2018-07-02 13:47 ` Thierry Reding
2018-07-03 6:40 ` Mikko Perttunen
2018-07-02 11:40 ` [PATCH v3 7/8] arm64: tegra: Add nodes for tcu on Tegra194 Mikko Perttunen
2018-07-02 11:40 ` [PATCH v3 8/8] arm64: tegra: Mark tcu as primary serial port on Tegra194 P2888 Mikko Perttunen
2018-07-02 14:03 ` [PATCH v3 0/8] Tegra Combined UART driver Thierry Reding
2018-07-02 14:07 ` Greg KH
2018-07-02 14:17 ` Thierry Reding
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=50c4702b-3d59-e443-5075-c888f83a2615@kapsi.fi \
--to=cyndis@kapsi.fi \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jassisinghbrar@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mperttunen@nvidia.com \
--cc=thierry.reding@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®