linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [Q] block / zynq: DMA bouncing
@ 2014-01-27 15:13 Guennadi Liakhovetski
  2014-01-27 15:24 ` Ben Dooks
  2014-01-27 17:02 ` Russell King - ARM Linux
  0 siblings, 2 replies; 13+ messages in thread
From: Guennadi Liakhovetski @ 2014-01-27 15:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all,

I'm working on an MMC driver with a DMA capability. All has been working 
well, until at some point I've got a bus error, when the mmc driver had 
been handed in a buffer at 0x3000 physical RAM address. The reason is, 
that on Zynq arch bus masters cannot access RAM below 0x80000. Therefore 
my question: how shall I configure this in software?

The way I found was to use ARM-specific struct dmabounce_device_info and 
implement its .needs_bounce() method to return true for those addresses. 
Is this the right way or is there a better / more straight-forward one?

To do the above I have to enable CONFIG_DMABOUNCE, which then selects 
CONFIG_ZONE_DMA. Having done just that I suddenly discover, that 0x3000 
buffers aren't used any more, so, I cannot actually verify my 
implementation :) Looking at ZONE_DMA it looks like it is still covering 
the whole RAM range (/proc/zoneinfo shows start_pfn=0 in zone DMA), so, I 
don't see why 0x3000 should be excluded now.

So, is using the .needs_bounce() method the correct way to support DMA on 
this arch or is there a better one?

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/

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

end of thread, other threads:[~2014-01-28 18:34 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-27 15:13 [Q] block / zynq: DMA bouncing Guennadi Liakhovetski
2014-01-27 15:24 ` Ben Dooks
2014-01-27 15:35   ` Guennadi Liakhovetski
2014-01-27 17:02 ` Russell King - ARM Linux
2014-01-27 17:45   ` Michal Simek
2014-01-27 17:52     ` Russell King - ARM Linux
2014-01-27 17:57       ` Michal Simek
2014-01-27 22:34         ` Guennadi Liakhovetski
2014-01-28 13:28         ` Guennadi Liakhovetski
2014-01-28 13:33           ` Guennadi Liakhovetski
2014-01-28 13:48           ` Russell King - ARM Linux
2014-01-28 13:54             ` Michal Simek
2014-01-28 18:34             ` Jason Gunthorpe

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