dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Vinod <vkoul@kernel.org>,
	dmaengine@vger.kernel.org,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 1/2] dmaengine: rcar-dmac: Don't set DMACHCLR bit 0 to 1 if iommu is mapped
Date: Mon, 2 Sep 2019 10:52:20 +0200	[thread overview]
Message-ID: <CAMuHMdVbbnUj+S48oxBL0HDQsRjSBCLnfztj8WHsz-VQ=aWN5w@mail.gmail.com> (raw)
In-Reply-To: <1566990835-27028-2-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hi Shimoda-san,

On Wed, Aug 28, 2019 at 1:15 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> The commit 20c169aceb45 ("dmaengine: rcar-dmac: clear pertinence
> number of channels") always set the DMACHCLR bit 0 to 1, but if
> iommu is mapped to the device, this driver doesn't need to clear it.
> So, this patch takes care of it by using "channels_mask" bitfield.
>
> Note that, this patch doesn't have a "Fixes:" tag because the driver
> doesn't manage the channel 0 anyway so that the behavior of
> the channel is not changed.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> ---
>  drivers/dma/sh/rcar-dmac.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index 779b715..204160e 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -192,6 +192,7 @@ struct rcar_dmac_chan {
>   * @iomem: remapped I/O memory base
>   * @n_channels: number of available channels
>   * @channels: array of DMAC channels
> + * @channels_mask: bitfield of which DMA channels are managed by this driver
>   * @modules: bitmask of client modules in use
>   */
>  struct rcar_dmac {
> @@ -202,6 +203,7 @@ struct rcar_dmac {
>
>         unsigned int n_channels;
>         struct rcar_dmac_chan *channels;
> +       unsigned int channels_mask;

Given you want to store the output of of_property_read_u32() here in a
subsequent patch, you may want to use u32 instead of unsigned int.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  parent reply	other threads:[~2019-09-02  8:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28 11:13 [PATCH 0/2] dmaengine: rcar-dmac: Add dma-channel-mask property support Yoshihiro Shimoda
2019-08-28 11:13 ` [PATCH 1/2] dmaengine: rcar-dmac: Don't set DMACHCLR bit 0 to 1 if iommu is mapped Yoshihiro Shimoda
2019-08-31  8:49   ` Simon Horman
2019-09-02  8:36   ` Geert Uytterhoeven
2019-09-02  9:21     ` Yoshihiro Shimoda
2019-09-02  8:52   ` Geert Uytterhoeven [this message]
2019-09-02  9:25     ` Yoshihiro Shimoda
2019-08-28 11:13 ` [PATCH 2/2] dmaengine: rcar-dmac: Add dma-channel-mask property support Yoshihiro Shimoda
2019-08-31  8:50   ` Simon Horman
2019-09-02  8:50   ` Geert Uytterhoeven

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='CAMuHMdVbbnUj+S48oxBL0HDQsRjSBCLnfztj8WHsz-VQ=aWN5w@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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).