diff options
-rw-r--r-- | arch/sh/Kconfig | 3 | ||||
-rw-r--r-- | include/asm-sh/dma-mapping.h | 8 | ||||
-rw-r--r-- | include/asm-sh/floppy.h | 4 | ||||
-rw-r--r-- | include/asm-sh/io.h | 4 |
4 files changed, 9 insertions, 10 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 0a631d0f75f1..ec2beabb193c 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig | |||
@@ -90,6 +90,9 @@ config ARCH_HAS_ILOG2_U64 | |||
90 | bool | 90 | bool |
91 | default n | 91 | default n |
92 | 92 | ||
93 | config ARCH_NO_VIRT_TO_BUS | ||
94 | def_bool y | ||
95 | |||
93 | source "init/Kconfig" | 96 | source "init/Kconfig" |
94 | 97 | ||
95 | menu "System type" | 98 | menu "System type" |
diff --git a/include/asm-sh/dma-mapping.h b/include/asm-sh/dma-mapping.h index d3bc7818bbbe..6f492ac3fa13 100644 --- a/include/asm-sh/dma-mapping.h +++ b/include/asm-sh/dma-mapping.h | |||
@@ -69,11 +69,11 @@ static inline dma_addr_t dma_map_single(struct device *dev, | |||
69 | { | 69 | { |
70 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) | 70 | #if defined(CONFIG_PCI) && !defined(CONFIG_SH_PCIDMA_NONCOHERENT) |
71 | if (dev->bus == &pci_bus_type) | 71 | if (dev->bus == &pci_bus_type) |
72 | return virt_to_bus(ptr); | 72 | return virt_to_phys(ptr); |
73 | #endif | 73 | #endif |
74 | dma_cache_sync(dev, ptr, size, dir); | 74 | dma_cache_sync(dev, ptr, size, dir); |
75 | 75 | ||
76 | return virt_to_bus(ptr); | 76 | return virt_to_phys(ptr); |
77 | } | 77 | } |
78 | 78 | ||
79 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) | 79 | #define dma_unmap_single(dev, addr, size, dir) do { } while (0) |
@@ -116,7 +116,7 @@ static inline void dma_sync_single(struct device *dev, dma_addr_t dma_handle, | |||
116 | if (dev->bus == &pci_bus_type) | 116 | if (dev->bus == &pci_bus_type) |
117 | return; | 117 | return; |
118 | #endif | 118 | #endif |
119 | dma_cache_sync(dev, bus_to_virt(dma_handle), size, dir); | 119 | dma_cache_sync(dev, phys_to_virt(dma_handle), size, dir); |
120 | } | 120 | } |
121 | 121 | ||
122 | static inline void dma_sync_single_range(struct device *dev, | 122 | static inline void dma_sync_single_range(struct device *dev, |
@@ -128,7 +128,7 @@ static inline void dma_sync_single_range(struct device *dev, | |||
128 | if (dev->bus == &pci_bus_type) | 128 | if (dev->bus == &pci_bus_type) |
129 | return; | 129 | return; |
130 | #endif | 130 | #endif |
131 | dma_cache_sync(dev, bus_to_virt(dma_handle) + offset, size, dir); | 131 | dma_cache_sync(dev, phys_to_virt(dma_handle) + offset, size, dir); |
132 | } | 132 | } |
133 | 133 | ||
134 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, | 134 | static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, |
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index dc1ad464fa32..3b59b3af777b 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -181,7 +181,7 @@ static void _fd_chose_dma_mode(char *addr, unsigned long size) | |||
181 | { | 181 | { |
182 | if(can_use_virtual_dma == 2) { | 182 | if(can_use_virtual_dma == 2) { |
183 | if((unsigned int) addr >= (unsigned int) high_memory || | 183 | if((unsigned int) addr >= (unsigned int) high_memory || |
184 | virt_to_bus(addr) >= 0x10000000) | 184 | virt_to_phys(addr) >= 0x10000000) |
185 | use_virtual_dma = 1; | 185 | use_virtual_dma = 1; |
186 | else | 186 | else |
187 | use_virtual_dma = 0; | 187 | use_virtual_dma = 0; |
@@ -219,7 +219,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
219 | doing_pdma = 0; | 219 | doing_pdma = 0; |
220 | clear_dma_ff(FLOPPY_DMA); | 220 | clear_dma_ff(FLOPPY_DMA); |
221 | set_dma_mode(FLOPPY_DMA,mode); | 221 | set_dma_mode(FLOPPY_DMA,mode); |
222 | set_dma_addr(FLOPPY_DMA,virt_to_bus(addr)); | 222 | set_dma_addr(FLOPPY_DMA,virt_to_phys(addr)); |
223 | set_dma_count(FLOPPY_DMA,size); | 223 | set_dma_count(FLOPPY_DMA,size); |
224 | enable_dma(FLOPPY_DMA); | 224 | enable_dma(FLOPPY_DMA); |
225 | return 0; | 225 | return 0; |
diff --git a/include/asm-sh/io.h b/include/asm-sh/io.h index aa80930ce8e4..e6a1877dcb20 100644 --- a/include/asm-sh/io.h +++ b/include/asm-sh/io.h | |||
@@ -241,10 +241,6 @@ static inline void *phys_to_virt(unsigned long address) | |||
241 | #define virt_to_phys(address) ((unsigned long)(address)) | 241 | #define virt_to_phys(address) ((unsigned long)(address)) |
242 | #endif | 242 | #endif |
243 | 243 | ||
244 | #define virt_to_bus virt_to_phys | ||
245 | #define bus_to_virt phys_to_virt | ||
246 | #define page_to_bus page_to_phys | ||
247 | |||
248 | /* | 244 | /* |
249 | * readX/writeX() are used to access memory mapped devices. On some | 245 | * readX/writeX() are used to access memory mapped devices. On some |
250 | * architectures the memory mapped IO stuff needs to be accessed | 246 | * architectures the memory mapped IO stuff needs to be accessed |