diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2012-05-26 15:56:03 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-28 08:52:53 +0200 |
commit | 87e677c4122e732dd1f7142ba7b2d4823576a199 (patch) | |
tree | ce5f6494a1e2030518a8077ee3da48b670dc369f /arch/sparc/include/asm/dma-mapping.h | |
parent | sparc32,leon: always include leon_pmc in build (diff) | |
download | linux-87e677c4122e732dd1f7142ba7b2d4823576a199.tar.xz linux-87e677c4122e732dd1f7142ba7b2d4823576a199.zip |
sparc32,leon: always support leon in ioport
Unconditially define pci32_dma_ops as this is used
for leon.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Konrad Eisele <konrad@gaisler.com>
Diffstat (limited to 'arch/sparc/include/asm/dma-mapping.h')
-rw-r--r-- | arch/sparc/include/asm/dma-mapping.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 48a7c65731d2..8493fd3c7ba5 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h @@ -12,13 +12,18 @@ extern int dma_supported(struct device *dev, u64 mask); #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) -extern struct dma_map_ops *dma_ops, pci32_dma_ops; +extern struct dma_map_ops *dma_ops; +extern struct dma_map_ops *leon_dma_ops; +extern struct dma_map_ops pci32_dma_ops; + extern struct bus_type pci_bus_type; static inline struct dma_map_ops *get_dma_ops(struct device *dev) { #if defined(CONFIG_SPARC32) && defined(CONFIG_PCI) - if (dev->bus == &pci_bus_type) + if (sparc_cpu_model == sparc_leon) + return leon_dma_ops; + else if (dev->bus == &pci_bus_type) return &pci32_dma_ops; #endif return dma_ops; |