mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
microblaze: Preliminary support for dma drivers
I found several problems for ll_temac driver and on system with WB. This early fix should fix it. I will clean this patch before I will add it to mainline Signed-off-by: Michal Simek <monstr@monstr.eu>
This commit is contained in:
parent
4c912c1a33
commit
dcbae4be90
@ -20,18 +20,15 @@
|
|||||||
* can set archdata.dma_data to an unsigned long holding the offset. By
|
* can set archdata.dma_data to an unsigned long holding the offset. By
|
||||||
* default the offset is PCI_DRAM_OFFSET.
|
* default the offset is PCI_DRAM_OFFSET.
|
||||||
*/
|
*/
|
||||||
|
static inline void __dma_sync_page(unsigned long paddr, unsigned long offset,
|
||||||
static inline void __dma_sync_page(void *paddr, unsigned long offset,
|
|
||||||
size_t size, enum dma_data_direction direction)
|
size_t size, enum dma_data_direction direction)
|
||||||
{
|
{
|
||||||
unsigned long start = (unsigned long)paddr;
|
|
||||||
|
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
case DMA_TO_DEVICE:
|
case DMA_TO_DEVICE:
|
||||||
flush_dcache_range(start + offset, start + offset + size);
|
flush_dcache_range(paddr + offset, paddr + offset + size);
|
||||||
break;
|
break;
|
||||||
case DMA_FROM_DEVICE:
|
case DMA_FROM_DEVICE:
|
||||||
invalidate_dcache_range(start + offset, start + offset + size);
|
invalidate_dcache_range(paddr + offset, paddr + offset + size);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
BUG();
|
BUG();
|
||||||
|
Loading…
Reference in New Issue
Block a user