From: Thierry Reding <thierry.reding@gmail.com>
To: Dmitry Osipenko <digetx@gmail.com>
Cc: Sowjanya Komatineni <skomatineni@nvidia.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
Mantravadi Karthik <mkarthik@nvidia.com>,
Shardar Mohammed <smohammed@nvidia.com>,
Timo Alho <talho@nvidia.com>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH V9 3/5] i2c: tegra: Add DMA support
Date: Mon, 4 Feb 2019 09:18:29 +0100 [thread overview]
Message-ID: <20190204081829.GC19087@ulmo> (raw)
In-Reply-To: <a5e79739-3ce5-6c22-c9d2-e9d2c709cb30@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2661 bytes --]
On Sun, Feb 03, 2019 at 07:48:09PM +0300, Dmitry Osipenko wrote:
> 02.02.2019 21:32, Sowjanya Komatineni пишет:
> >>> This patch adds DMA support for Tegra I2C.
> >>>
> >>> Tegra I2C TX and RX FIFO depth is 8 words. PIO mode is used for
> >>> transfer size of the max FIFO depth and DMA mode is used for transfer
> >>> size higher than max FIFO depth to save CPU overhead.
> >>>
> >>> PIO mode needs full intervention of CPU to fill or empty FIFO's and
> >>> also need to service multiple data requests interrupt for the same
> >>> transaction. This adds delay between data bytes of the same transfer
> >>> when CPU is fully loaded and some slave devices has internal timeout
> >>> for no bus activity and stops transaction to avoid bus hang. DMA mode
> >>> is helpful in such cases.
> >>>
> >>> DMA mode is also helpful for Large transfers during downloading or
> >>> uploading FW over I2C to some external devices.
> >>>
> >>> Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
> >>> ---
> >>
> >>
> >>> +static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev) {
> >>> + struct dma_chan *dma_chan;
> >>> + u32 *dma_buf;
> >>> + dma_addr_t dma_phys;
> >>> + int err = 0;
> >>> +
> >>> + if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA))
> >>> + return -ENODEV;
> >>
> >> Another detail is that we need to keep older kernels working on
> >> T186+ after its device-tree will get the "dmas" property,
> >> device-tree changes shall be backwards-compatible with older
> >> kernels. Hence we need to check that platform actually wants the
> >> APB DMA driver, otherwise T186+ will be failing with -EPROBE_DEFER.
> >
> > Yes, that will be a separate patch later for adding DMA support for
> > Tegra186 and later chips once we check on GPCDMA upstream
> >
> >
>
> Sure, and there is a requirement in upstream to keep older kernel
> versions working with the later device-tree updates, as I pointed
> above. Please include the ".has_apb_dma checking" that I'm suggesting
> into the next version.
I don't think that's true. The requirement is for the device-tree ABI to
remain stable, but that technically only requires that kernel updates do
not require a DTB update.
The assumption on which this is based is that the DTB may be shipping in
read-only storage, like it used to fairly commonly in the distant past.
Conversely, if you update the DTB the assumption is that you can also
update the kernel, so the compatibility doesn't need to go that way.
That said, I think what you're proposing here makes sense and is pretty
trivial, so might as well add it at this time.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-02-04 8:18 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-01 17:07 [PATCH V9 1/5] i2c: tegra: sort all the include headers alphabetically Sowjanya Komatineni
2019-02-01 17:07 ` [PATCH V9 2/5] i2c: tegra: add bus clear master support Sowjanya Komatineni
2019-02-01 19:06 ` Dmitry Osipenko
2019-02-01 17:07 ` [PATCH V9 3/5] i2c: tegra: Add DMA support Sowjanya Komatineni
2019-02-01 18:57 ` Dmitry Osipenko
2019-02-01 19:20 ` Sowjanya Komatineni
2019-02-01 19:22 ` Dmitry Osipenko
2019-02-02 14:13 ` Dmitry Osipenko
2019-02-02 18:43 ` Sowjanya Komatineni
2019-02-03 16:42 ` Dmitry Osipenko
2019-02-01 20:21 ` Sowjanya Komatineni
2019-02-01 20:30 ` Dmitry Osipenko
2019-02-01 21:36 ` Sowjanya Komatineni
2019-02-01 21:45 ` Dmitry Osipenko
2019-02-02 14:01 ` Dmitry Osipenko
2019-02-02 18:32 ` Sowjanya Komatineni
2019-02-03 16:48 ` Dmitry Osipenko
2019-02-04 8:18 ` Thierry Reding [this message]
2019-02-03 14:19 ` Dmitry Osipenko
2019-02-03 14:47 ` Dmitry Osipenko
2019-02-03 15:27 ` Dmitry Osipenko
2019-02-04 12:57 ` Dmitry Osipenko
2019-02-05 1:37 ` Sowjanya Komatineni
2019-02-05 6:20 ` Dmitry Osipenko
2019-02-04 8:04 ` Thierry Reding
2019-02-01 17:07 ` [PATCH V9 4/5] i2c: tegra: update transfer timeout Sowjanya Komatineni
2019-02-01 19:16 ` Dmitry Osipenko
2019-02-01 19:37 ` Sowjanya Komatineni
2019-02-01 19:41 ` Dmitry Osipenko
2019-02-04 7:54 ` Thierry Reding
2019-02-01 17:07 ` [PATCH V9 5/5] i2c: tegra: add i2c interface timing support Sowjanya Komatineni
2019-02-01 19:05 ` [PATCH V9 1/5] i2c: tegra: sort all the include headers alphabetically Dmitry Osipenko
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=20190204081829.GC19087@ulmo \
--to=thierry.reding@gmail.com \
--cc=digetx@gmail.com \
--cc=jonathanh@nvidia.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mkarthik@nvidia.com \
--cc=skomatineni@nvidia.com \
--cc=smohammed@nvidia.com \
--cc=talho@nvidia.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;
as well as URLs for NNTP newsgroup(s).