> -----Original Message----- > From: devicetree-discuss [mailto:devicetree-discuss- > [email protected]] On Behalf Of Marek > Vasut > Sent: Monday, July 23, 2012 9:01 AM > To: Aggrwal Poonam-B10812 > Cc: [email protected]; [email protected]; Wolfgang Denk > Subject: Re: Forcing PIO mode instead of DMA via DT property > > Dear Aggrwal Poonam-B10812, > > > > -----Original Message----- > > > From: devicetree-discuss [mailto:devicetree-discuss- > > > [email protected]] On Behalf Of > > > bounces+Marek > > > Vasut > > > Sent: Monday, July 23, 2012 2:58 AM > > > To: [email protected] > > > Cc: [email protected]; Wolfgang Denk > > > Subject: Forcing PIO mode instead of DMA via DT property > > > > > > Hi guys, > > > > > > I'm trying to implement a driver that can do both DMA and PIO, and > > > it would be nice if the user was able to select the mode (on a > > > per-bus > > > basis) using the DT. > > > The PIO mode can reduce the overhead in some cases and therefore be > > > better choice than the DMA (for example when most transfers move > > > only very few data, or when board-specific hardware properties kick > in). > > > > > > I was thinking about using some "manf,use-pio" DT property, but I > > > haven't found any such example yet, so I wonder if this is a good > idea. > > > > Not sure, but as far as I understand device tree is to publish the > > hardware capabilities, not the user choice/configuration. > > This might actually be one of the things I've been missing about DT, so > thanks for stating that clearly :-) > > > One option would be to > > put a compile time flag in the driver, which prefers PIO than DMA. I > > believe by default DMA is the first preference. > > Certainly, but please consider you might want to use PIO only on selected > instances of the driver (aka. selected busses, I wasn't probably clear > enough, this is a bus driver), not degrade performance on all of them. > Possibly due to a specific hardware wiring of the particular system. Okay, if the choice to use PIO is for a specific controller(bus) because of hardware reasons, may be device tree could be a place. But if it is simply that the user wants PIO mode for reasons like "less bytes to transfer" then device tree may not be the right place.
Regards Poonam > > > Regards > > Poonam > > Best regards, > Marek Vasut > _______________________________________________ > devicetree-discuss mailing list > [email protected] > https://lists.ozlabs.org/listinfo/devicetree-discuss _______________________________________________ devicetree-discuss mailing list [email protected] https://lists.ozlabs.org/listinfo/devicetree-discuss
