aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-07-31 00:11:25 -0400
committerPaul Mundt <lethal@linux-sh.org>2007-07-31 00:11:25 -0400
commit75c46162be3d0025d448e0b738d6f8b51ff8a6e5 (patch)
treea27c712bf4457aef48d6b918aad606148544cbb3
parentda9d5108f43d63f09b0328a4211f5f404ea05ab0 (diff)
sh64: Kill off virt_to_bus()/bus_to_virt().
Follows the SH change. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh64/Kconfig3
-rw-r--r--arch/sh64/kernel/pci-dma.c4
-rw-r--r--include/asm-sh64/dma-mapping.h8
-rw-r--r--include/asm-sh64/io.h4
4 files changed, 9 insertions, 10 deletions
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig
index ff654204b7d4..5664631d8ae5 100644
--- a/arch/sh64/Kconfig
+++ b/arch/sh64/Kconfig
@@ -47,6 +47,9 @@ config ARCH_HAS_ILOG2_U64
47 bool 47 bool
48 default n 48 default n
49 49
50config ARCH_NO_VIRT_TO_BUS
51 def_bool y
52
50source init/Kconfig 53source init/Kconfig
51 54
52menu "System type" 55menu "System type"
diff --git a/arch/sh64/kernel/pci-dma.c b/arch/sh64/kernel/pci-dma.c
index a36c3d71a3fe..a9328f894755 100644
--- a/arch/sh64/kernel/pci-dma.c
+++ b/arch/sh64/kernel/pci-dma.c
@@ -30,7 +30,7 @@ void *consistent_alloc(struct pci_dev *hwdev, size_t size,
30 30
31 if (vp != NULL) { 31 if (vp != NULL) {
32 memset(vp, 0, size); 32 memset(vp, 0, size);
33 *dma_handle = virt_to_bus(ret); 33 *dma_handle = virt_to_phys(ret);
34 dma_cache_wback_inv((unsigned long)ret, size); 34 dma_cache_wback_inv((unsigned long)ret, size);
35 } 35 }
36 36
@@ -42,7 +42,7 @@ void consistent_free(struct pci_dev *hwdev, size_t size,
42{ 42{
43 void *alloc; 43 void *alloc;
44 44
45 alloc = bus_to_virt((unsigned long)dma_handle); 45 alloc = phys_to_virt((unsigned long)dma_handle);
46 free_pages((unsigned long)alloc, get_order(size)); 46 free_pages((unsigned long)alloc, get_order(size));
47 47
48 iounmap(vaddr); 48 iounmap(vaddr);
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h
index c7c0f059cdc4..d505f357f819 100644
--- a/include/asm-sh64/dma-mapping.h
+++ b/include/asm-sh64/dma-mapping.h
@@ -51,11 +51,11 @@ static inline dma_addr_t dma_map_single(struct device *dev,
51{ 51{
52#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) 52#if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT)
53 if (dev->bus == &pci_bus_type) 53 if (dev->bus == &pci_bus_type)
54 return virt_to_bus(ptr); 54 return virt_to_phys(ptr);
55#endif 55#endif
56 dma_cache_sync(dev, ptr, size, dir); 56 dma_cache_sync(dev, ptr, size, dir);
57 57
58 return virt_to_bus(ptr); 58 return virt_to_phys(ptr);
59} 59}
60 60
61#define dma_unmap_single(dev, addr, size, dir) do { } while (0) 61#define dma_unmap_single(dev, addr, size, dir) do { } while (0)
@@ -98,7 +98,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle,
98 if (dev->bus == &pci_bus_type) 98 if (dev->bus == &pci_bus_type)
99 return; 99 return;
100#endif 100#endif
101 dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); 101 dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir);
102} 102}
103 103
104static inline void dma_sync_single_range(struct device *dev, 104static inline void dma_sync_single_range(struct device *dev,
@@ -110,7 +110,7 @@ static inline void dma_sync_single_range(struct device *dev,
110 if (dev->bus == &pci_bus_type) 110 if (dev->bus == &pci_bus_type)
111 return; 111 return;
112#endif 112#endif
113 dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); 113 dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir);
114} 114}
115 115
116static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, 116static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg,
diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h
index 14d8e7b4bf4b..1f37b6931922 100644
--- a/include/asm-sh64/io.h
+++ b/include/asm-sh64/io.h
@@ -31,10 +31,6 @@
31#include <asm/page.h> 31#include <asm/page.h>
32#include <asm-generic/iomap.h> 32#include <asm-generic/iomap.h>
33 33
34#define virt_to_bus virt_to_phys
35#define bus_to_virt phys_to_virt
36#define page_to_bus page_to_phys
37
38/* 34/*
39 * Nothing overly special here.. instead of doing the same thing 35 * Nothing overly special here.. instead of doing the same thing
40 * over and over again, we just define a set of sh64_in/out functions 36 * over and over again, we just define a set of sh64_in/out functions