diff options
Diffstat (limited to 'arch/x86/include/asm/io_32.h')
| -rw-r--r-- | arch/x86/include/asm/io_32.h | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/arch/x86/include/asm/io_32.h b/arch/x86/include/asm/io_32.h index d8e242e1b39..a299900f592 100644 --- a/arch/x86/include/asm/io_32.h +++ b/arch/x86/include/asm/io_32.h | |||
| @@ -37,8 +37,6 @@ | |||
| 37 | * - Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 37 | * - Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
| 38 | */ | 38 | */ |
| 39 | 39 | ||
| 40 | #define IO_SPACE_LIMIT 0xffff | ||
| 41 | |||
| 42 | #define XQUAD_PORTIO_BASE 0xfe400000 | 40 | #define XQUAD_PORTIO_BASE 0xfe400000 |
| 43 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ | 41 | #define XQUAD_PORTIO_QUAD 0x40000 /* 256k per quad. */ |
| 44 | 42 | ||
| @@ -53,92 +51,6 @@ | |||
| 53 | */ | 51 | */ |
| 54 | #define xlate_dev_kmem_ptr(p) p | 52 | #define xlate_dev_kmem_ptr(p) p |
| 55 | 53 | ||
| 56 | /** | ||
| 57 | * virt_to_phys - map virtual addresses to physical | ||
| 58 | * @address: address to remap | ||
| 59 | * | ||
| 60 | * The returned physical address is the physical (CPU) mapping for | ||
| 61 | * the memory address given. It is only valid to use this function on | ||
| 62 | * addresses directly mapped or allocated via kmalloc. | ||
| 63 | * | ||
| 64 | * This function does not give bus mappings for DMA transfers. In | ||
| 65 | * almost all conceivable cases a device driver should not be using | ||
| 66 | * this function | ||
| 67 | */ | ||
| 68 | |||
| 69 | static inline unsigned long virt_to_phys(volatile void *address) | ||
| 70 | { | ||
| 71 | return __pa(address); | ||
| 72 | } | ||
| 73 | |||
| 74 | /** | ||
| 75 | * phys_to_virt - map physical address to virtual | ||
| 76 | * @address: address to remap | ||
| 77 | * | ||
| 78 | * The returned virtual address is a current CPU mapping for | ||
| 79 | * the memory address given. It is only valid to use this function on | ||
| 80 | * addresses that have a kernel mapping | ||
| 81 | * | ||
| 82 | * This function does not handle bus mappings for DMA transfers. In | ||
| 83 | * almost all conceivable cases a device driver should not be using | ||
| 84 | * this function | ||
| 85 | */ | ||
| 86 | |||
| 87 | static inline void *phys_to_virt(unsigned long address) | ||
| 88 | { | ||
| 89 | return __va(address); | ||
| 90 | } | ||
| 91 | |||
| 92 | /* | ||
| 93 | * Change "struct page" to physical address. | ||
| 94 | */ | ||
| 95 | #define page_to_phys(page) ((dma_addr_t)page_to_pfn(page) << PAGE_SHIFT) | ||
| 96 | |||
| 97 | /** | ||
| 98 | * ioremap - map bus memory into CPU space | ||
| 99 | * @offset: bus address of the memory | ||
| 100 | * @size: size of the resource to map | ||
| 101 | * | ||
| 102 | * ioremap performs a platform specific sequence of operations to | ||
| 103 | * make bus memory CPU accessible via the readb/readw/readl/writeb/ | ||
| 104 | * writew/writel functions and the other mmio helpers. The returned | ||
| 105 | * address is not guaranteed to be usable directly as a virtual | ||
| 106 | * address. | ||
| 107 | * | ||
| 108 | * If the area you are trying to map is a PCI BAR you should have a | ||
| 109 | * look at pci_iomap(). | ||
| 110 | */ | ||
| 111 | extern void __iomem *ioremap_nocache(resource_size_t offset, unsigned long size); | ||
| 112 | extern void __iomem *ioremap_cache(resource_size_t offset, unsigned long size); | ||
| 113 | extern void __iomem *ioremap_prot(resource_size_t offset, unsigned long size, | ||
| 114 | unsigned long prot_val); | ||
| 115 | |||
| 116 | /* | ||
| 117 | * The default ioremap() behavior is non-cached: | ||
| 118 | */ | ||
| 119 | static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | ||
| 120 | { | ||
| 121 | return ioremap_nocache(offset, size); | ||
| 122 | } | ||
| 123 | |||
| 124 | extern void iounmap(volatile void __iomem *addr); | ||
| 125 | |||
| 126 | /* | ||
| 127 | * ISA I/O bus memory addresses are 1:1 with the physical address. | ||
| 128 | */ | ||
| 129 | #define isa_virt_to_bus virt_to_phys | ||
| 130 | #define isa_page_to_bus page_to_phys | ||
| 131 | #define isa_bus_to_virt phys_to_virt | ||
| 132 | |||
| 133 | /* | ||
| 134 | * However PCI ones are not necessarily 1:1 and therefore these interfaces | ||
| 135 | * are forbidden in portable PCI drivers. | ||
| 136 | * | ||
| 137 | * Allow them on x86 for legacy drivers, though. | ||
| 138 | */ | ||
| 139 | #define virt_to_bus virt_to_phys | ||
| 140 | #define bus_to_virt phys_to_virt | ||
| 141 | |||
| 142 | static inline void | 54 | static inline void |
| 143 | memset_io(volatile void __iomem *addr, unsigned char val, int count) | 55 | memset_io(volatile void __iomem *addr, unsigned char val, int count) |
| 144 | { | 56 | { |
