Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360180
b: refs/heads/master
c: fc7943d
h: refs/heads/master
v: v3
  • Loading branch information
Vineet Gupta committed Feb 15, 2013
1 parent 4895d16 commit dfb8e51
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 46 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: decae9d3e87b5454b3b190d8e00b063175a3a091
refs/heads/master: fc7943d29e9f6f5f6d4b111120b66ec86501673e
4 changes: 4 additions & 0 deletions trunk/arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ config CPU_BIG_ENDIAN
help
Build kernel for Big Endian Mode of ARC CPU

# If a platform can't work with 0x8000_0000 based dma_addr_t
config ARC_PLAT_NEEDS_CPU_TO_DMA
bool

config SMP
bool "Symmetric Multi-Processing (Incomplete)"
default n
Expand Down
16 changes: 16 additions & 0 deletions trunk/arch/arc/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,23 @@

#include <asm-generic/dma-coherent.h>
#include <asm/cacheflush.h>

#ifndef CONFIG_ARC_PLAT_NEEDS_CPU_TO_DMA
/*
* dma_map_* API take cpu addresses, which is kernel logical address in the
* untranslated address space (0x8000_0000) based. The dma address (bus addr)
* ideally needs to be 0x0000_0000 based hence these glue routines.
* However given that intermediate bus bridges can ignore the high bit, we can
* do with these routines being no-ops.
* If a platform/device comes up which sriclty requires 0 based bus addr
* (e.g. AHB-PCI bridge on Angel4 board), then it can provide it's own versions
*/
#define plat_dma_addr_to_kernel(dev, addr) ((unsigned long)(addr))
#define plat_kernel_addr_to_dma(dev, ptr) ((dma_addr_t)(ptr))

#else
#include <plat/dma_addr.h>
#endif

void *dma_alloc_noncoherent(struct device *dev, size_t size,
dma_addr_t *dma_handle, gfp_t gfp);
Expand Down
45 changes: 0 additions & 45 deletions trunk/arch/arc/plat-arcfpga/include/plat/dma_addr.h

This file was deleted.

0 comments on commit dfb8e51

Please sign in to comment.