dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Vinod Koul <vkoul@kernel.org>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	Chris Brandt <Chris.Brandt@renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH v4 2/4] drivers: dma: sh: Add DMAC driver for RZ/G2L SoC
Date: Wed, 28 Jul 2021 12:42:14 +0000	[thread overview]
Message-ID: <OS0PR01MB59220E0282D0EF21437B6EF786EA9@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAMuHMdUFr8FWk_i2hG3HJ1vTz7wjdHc=Sr8eYtzU20AwcA+2+g@mail.gmail.com>

Hi Geert,

Thanks for the feedback.

> -----Original Message-----
> From: Geert Uytterhoeven <geert@linux-m68k.org>
> Sent: 28 July 2021 13:34
> To: Biju Das <biju.das.jz@bp.renesas.com>
> Cc: Vinod Koul <vkoul@kernel.org>; Prabhakar Mahadev Lad
> <prabhakar.mahadev-lad.rj@bp.renesas.com>; Chris Paterson
> <Chris.Paterson2@renesas.com>; dmaengine@vger.kernel.org; Chris Brandt
> <Chris.Brandt@renesas.com>; linux-renesas-soc@vger.kernel.org
> Subject: Re: [PATCH v4 2/4] drivers: dma: sh: Add DMAC driver for RZ/G2L
> SoC
> 
> Hi Biju,
> 
> On Wed, Jul 28, 2021 at 1:58 PM Biju Das <biju.das.jz@bp.renesas.com>
> wrote:
> > > On 28-07-21, 07:00, Biju Das wrote:
> > > > > Sorry I dont like passing numbers like this :(
> > > > >
> > > > > Can you explain what is meant by each of the above values and
> > > > > looks like some (if not all) can be derived (slave config as
> > > > > well as transaction
> > > > > properties)
> > > >
> > > >
> > > > 0x11228 (Tx)
> > > > 0x11220 (Rx)
> > > >
> > > > BIT 22:- TM :- Transfer Mode
> > >
> > > What are the values, here it seems 0
> >
> > Yes, that is correct single bit. 0 means single transfer mode, 1 block
> transfer mode.
> >
> > >
> > > > Bits 16->19 :- DDS(Destination Data Size) --> 0x0001 (16 bits)
> > > > Bits
> > > > 12->15 :- SDS(Source Data size)--> 0x0001 (16 bits)
> > >
> > > use src_addr_width/dst_addr_width ..?
> >
> > We support 128,256,512 and 1024 bits as well. I will extend enum
> dma_slave_buswidth to support this in another patch.
> > Is it ok?
> >
> > >
> > > > Bit  11     :- Reserved
> > > > Bits 8->10 :- Ack mode  --> 0x010 (Bus cycle mode)
> > >
> > > What does this mean?
> >
> > DMAACK output mode is coming from HW manual, A big table of around 230
> entries for on chip request with dedicated values for the above bits.
> >
> > 0x000 -- Initial value
> > 0x001 -- 001 (LEVEL Mode) (001 for MTU,PWM,CAN etccc 0x01x -- Bus
> > cycle mode (010 for OSTM,I2C, SSIF) 0x1xx -- DMAACK not to
> > output(SCIF)
> >
> > >
> > > > Bit 7 :-  Reserved
> > > > Bit 6:- LVL -->  Level -->0 (DMA request based on edge of
> > > > thesignal) Bit 5:- HIEN -->  High Enable --> 1 (Detects a DMA
> > > > request on rising edge of the signal) Bit 4:- LOEN --> Low Enable
> > > > -->0 (Does not DMA request on falling edge of the signal) Bit 3:-
> > > > REQD --> Request Direction ->1 (DMAREQ is Destination)
> > >
> > > how and what decides these values
> > > It is now hardcoded in the client driver,
> >
> > It is SoC specific, coming from HW manual. Each on chip peripheral has
> it's own values.
> > Even source address/Destination address of the on chip module is also
> part of that table.
> >
> > can we do that in dma driver
> > > instead? While deriving most of the values?
> >
> > If we add this in DMA driver, it won't be generic. We need to prepare
> > a big LUT(based on MID +RID) for all the peripherals If SSI then use a
> value from LUT, SCIF then another value like that.
> >
> > So please let me know how do we want to proceed here?
> 
> Looks like we should pass this in the dmas properties in DT instead,
> either by increasing #dma-cells, or by encoding it with the MID/RID value
> in the existing cell?

I like the idea of encoding it with MID/RID in the existing cell. I will post next version based on this.

Cheers,
Biju

> 
> 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

      reply	other threads:[~2021-07-28 12:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  9:25 [PATCH v4 0/4] Add RZ/G2L DMAC support Biju Das
2021-07-19  9:25 ` [PATCH v4 2/4] drivers: dma: sh: Add DMAC driver for RZ/G2L SoC Biju Das
2021-07-27  7:56   ` Biju Das
2021-07-27 12:40   ` Vinod Koul
2021-07-27 13:45     ` Biju Das
2021-07-28  6:20       ` Vinod Koul
2021-07-28  7:00         ` Biju Das
2021-07-28 11:05           ` Vinod Koul
2021-07-28 11:58             ` Biju Das
2021-07-28 12:34               ` Geert Uytterhoeven
2021-07-28 12:42                 ` Biju Das [this message]

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=OS0PR01MB59220E0282D0EF21437B6EF786EA9@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Brandt@renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=vkoul@kernel.org \
    /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).