Changes in uspace/lib/c/arch/ia64/include/ddi.h [86a34d3e:63f8966] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/arch/ia64/include/ddi.h
r86a34d3e r63f8966 52 52 static inline void pio_write_8(ioport8_t *port, uint8_t v) 53 53 { 54 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 55 uintptr_t prt = (uintptr_t) port; 54 uintptr_t prt = (uintptr_t) port; 56 55 57 *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 58 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 59 } else { 60 *port = v; 61 } 56 *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 57 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 62 58 63 59 asm volatile ("mf\n" ::: "memory"); … … 66 62 static inline void pio_write_16(ioport16_t *port, uint16_t v) 67 63 { 68 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 69 uintptr_t prt = (uintptr_t) port; 64 uintptr_t prt = (uintptr_t) port; 70 65 71 *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 72 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 73 } else { 74 *port = v; 75 } 66 *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 67 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 76 68 77 69 asm volatile ("mf\n" ::: "memory"); … … 80 72 static inline void pio_write_32(ioport32_t *port, uint32_t v) 81 73 { 82 if (port < (ioport32_t *) IO_SPACE_BOUNDARY) { 83 uintptr_t prt = (uintptr_t) port; 74 uintptr_t prt = (uintptr_t) port; 84 75 85 *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 86 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 87 } else { 88 *port = v; 89 } 76 *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 77 ((prt & 0xfff) | ((prt >> 2) << 12)))) = v; 90 78 91 79 asm volatile ("mf\n" ::: "memory"); … … 94 82 static inline uint8_t pio_read_8(ioport8_t *port) 95 83 { 96 uint 8_t v;84 uintptr_t prt = (uintptr_t) port; 97 85 98 86 asm volatile ("mf\n" ::: "memory"); 99 87 100 if (port < (ioport8_t *) IO_SPACE_BOUNDARY) { 101 uintptr_t prt = (uintptr_t) port; 102 103 v = *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 104 ((prt & 0xfff) | ((prt >> 2) << 12)))); 105 } else { 106 v = *port; 107 } 108 109 return v; 88 return *((ioport8_t *)(IA64_IOSPACE_ADDRESS + 89 ((prt & 0xfff) | ((prt >> 2) << 12)))); 110 90 } 111 91 112 92 static inline uint16_t pio_read_16(ioport16_t *port) 113 93 { 114 uint 16_t v;94 uintptr_t prt = (uintptr_t) port; 115 95 116 96 asm volatile ("mf\n" ::: "memory"); 117 97 118 if (port < (ioport16_t *) IO_SPACE_BOUNDARY) { 119 uintptr_t prt = (uintptr_t) port; 120 121 v = *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 122 ((prt & 0xfff) | ((prt >> 2) << 12)))); 123 } else { 124 v = *port; 125 } 126 127 return v; 98 return *((ioport16_t *)(IA64_IOSPACE_ADDRESS + 99 ((prt & 0xfff) | ((prt >> 2) << 12)))); 128 100 } 129 101 130 102 static inline uint32_t pio_read_32(ioport32_t *port) 131 103 { 132 uint 32_t v;104 uintptr_t prt = (uintptr_t) port; 133 105 134 106 asm volatile ("mf\n" ::: "memory"); 135 107 136 if (port < (ioport32_t *) port) { 137 uintptr_t prt = (uintptr_t) port; 138 139 v = *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 140 ((prt & 0xfff) | ((prt >> 2) << 12)))); 141 } else { 142 v = *port; 143 } 144 145 return v; 108 return *((ioport32_t *)(IA64_IOSPACE_ADDRESS + 109 ((prt & 0xfff) | ((prt >> 2) << 12)))); 146 110 } 147 111
Note:
See TracChangeset
for help on using the changeset viewer.