devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Is there a binding for IORESOURCE_DMA population?
@ 2011-07-15 16:32 Shawn Guo
       [not found] ` <20110715163254.GG1840-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
  0 siblings, 1 reply; 36+ messages in thread
From: Shawn Guo @ 2011-07-15 16:32 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

It's pretty common on ARM platforms that IORESOURCE_DMA is being used
by platform devices to tell DMA channel/request/event number (either
physical or virtual).  And then drivers simply call function
platform_get_resource() to get that.  Do we have any support for
IORESOURCE_DMA to make it migrate to device tree probe as easy as we
do for IORESOURCE_IRQ?  Or do we have to follow "dma-channel" binding
that is being used on powerpc?

I ask because I do not see too much sense to use dma-channel binding
on ARM platforms.  For specific example like imx-sdma, it has 32
physical channels which are not bonded to any specific devices.
Instead, hardware defines 48 dma events (something like virtual
channels).  Every single event is assigned to specific device by
hardware.  Whenever one device wants to do dma, it just tells its dma
request number.  sdma will find an available physical channel to
do dma.

First of all, using powerpc dma-channel binding on such dma event
seems not reflecting the hardware facts.  Secondly, the binding in
this case (below) looks silly.  Thirdly, device driver need to make
code change for simply getting a dma event number.

sdma@83fb0000 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "fsl,imx51-sdma", "fsl,imx35-sdma";
        reg = <0x83fb0000 0x4000>;
        interrupts = <6>;
        fsl,sdma-ram-script-name = "sdma-imx51.bin";

        dma00: dma-channel@0 {
                compatible = "fsl,sdma-channel";
                reg = <0>;
        };

        dma01: dma-channel@1 {
                compatible = "fsl,sdma-channel";
                reg = <1>;
        };

        dma02: dma-channel@2 {
                compatible = "fsl,sdma-channel";
                reg = <2>;
        };

        dma04: dma-channel@3 {
                compatible = "fsl,sdma-channel";
                reg = <3>;
        };

        ......

        dma47: dma-channel@47 {
                compatible = "fsl,sdma-channel";
                reg = <47>;
        };
};

ssi@83fcc000 { /* SSI1 */
        compatible = "fsl,imx51-ssi", "fsl,imx1-ssi";
        reg = <0x83fcc000 0x4000>;
        interrupts = <29>;
        fsl,ssi-uses-dma;
        fsl,ssi-tx-dma-channel = &dma02;
        fsl,ssi-rx-dma-channel = &dma03;
};

Should we get dt infrastructural auto-load IORESOURCE_DMA to make
the thing a lot easier?  Or did I miss anything?

-- 
Regards,
Shawn

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2011-07-20  2:53 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-15 16:32 Is there a binding for IORESOURCE_DMA population? Shawn Guo
     [not found] ` <20110715163254.GG1840-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-15 16:45   ` Tabi Timur-B04825
     [not found]     ` <CAOZdJXVeM4Axf=TC4qKNHyqb=iDoDceGr-xjLNpD20WfL2h46Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-07-15 18:11       ` Arnd Bergmann
     [not found]         ` <201107152011.41546.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-15 23:49           ` Grant Likely
2011-07-16  7:57           ` Shawn Guo
     [not found]             ` <20110716075748.GI1840-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-16 12:09               ` Arnd Bergmann
     [not found]                 ` <201107161409.46719.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-16 12:55                   ` Tabi Timur-B04825
     [not found]                     ` <4E218A4C.8000603-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-16 14:40                       ` Shawn Guo
     [not found]                         ` <20110716144026.GB2374-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-16 14:38                           ` Tabi Timur-B04825
     [not found]                             ` <4E21A252.4060606-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-17  7:18                               ` Shawn Guo
2011-07-16 19:16                           ` Rob Herring
     [not found]                             ` <4E21E398.4060808-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-07-17  7:30                               ` Shawn Guo
2011-07-16 20:18                           ` Tabi Timur-B04825
     [not found]                             ` <4E21F22C.3020804-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-16 20:44                               ` Arnd Bergmann
     [not found]                                 ` <201107162244.47740.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-16 20:54                                   ` Tabi Timur-B04825
     [not found]                                     ` <4E21FA7C.2000602-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-17  7:38                                       ` Shawn Guo
2011-07-16 14:34                   ` Shawn Guo
     [not found]                     ` <20110716143456.GA2374-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-16 14:43                       ` Tabi Timur-B04825
     [not found]                         ` <4E21A392.3010608-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-17  7:41                           ` Shawn Guo
     [not found]                             ` <20110717074159.GF2374-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-17 13:41                               ` Tabi Timur-B04825
     [not found]                                 ` <4E22E66D.5010809-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-17 14:28                                   ` Shawn Guo
     [not found]                                     ` <20110717142838.GI2374-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-17 14:57                                       ` Tabi Timur-B04825
     [not found]                                         ` <4E22F867.5090707-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-17 15:47                                           ` Shawn Guo
     [not found]                                             ` <20110717154730.GK2374-+NayF8gZjK2ctlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2011-07-17 16:04                                               ` Tabi Timur-B04825
     [not found]                                                 ` <4E230802.9030805-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-19 15:16                                                   ` Arnd Bergmann
     [not found]                                                     ` <201107191716.56203.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-20  2:53                                                       ` Shawn Guo
2011-07-17 15:04                                       ` Arnd Bergmann
     [not found]                                         ` <201107171704.17779.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-17 15:41                                           ` Shawn Guo
2011-07-18  4:39                                   ` Grant Likely
     [not found]                                     ` <20110718043940.GD15023-e0URQFbLeQY2iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2011-07-18 11:19                                       ` Tabi Timur-B04825
2011-07-16 15:19                       ` Arnd Bergmann
     [not found]                         ` <201107161719.32543.arnd-r2nGTMty4D4@public.gmane.org>
2011-07-16 15:27                           ` Tabi Timur-B04825
     [not found]                             ` <4E21ADC5.5010205-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
2011-07-16 17:33                               ` Arnd Bergmann
2011-07-17  8:02                               ` Shawn Guo
2011-07-17  7:59                           ` Shawn Guo
2011-07-18  4:34                   ` Grant Likely

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