On 10 December 2010 17:03, Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> wrote: > On Fri, Dec 10, 2010 at 12:03:07PM +0100, Janusz Krzysztofik wrote: >> Âvoid __init omap1_camera_init(void *info) >> Â{ >> Â Â Â struct platform_device *dev = &omap1_camera_device; >> + Â Â dma_addr_t paddr = omap1_camera_phys_mempool_base; >> + Â Â dma_addr_t size = omap1_camera_phys_mempool_size; >> Â Â Â int ret; >> >> Â Â Â dev->dev.platform_data = info; >> >> + Â Â if (paddr) { >> + Â Â Â Â Â Â if (dma_declare_coherent_memory(&dev->dev, paddr, paddr, size, >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE)) > > Although this works, you're ending up with SDRAM being mapped via > ioremap, which uses MT_DEVICE - so what is SDRAM ends up being > mapped as if it were a device. BTW, does the generic dma_declare_coherent_memory() does the correct thing in using ioremap()? Maybe some other function that takes a pgprot_t would be better (ioremap_page_range) and could pass something like pgprot_noncached (though ideally a pgprot_dmacoherent). Or just an architecturally-defined function. -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html