Changes in uspace/lib/c/include/ddi.h [7ee7e6a:aad43a8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ddi.h
r7ee7e6a raad43a8 52 52 typedef volatile uint16_t ioport16_t; 53 53 typedef volatile uint32_t ioport32_t; 54 55 extern int device_assign_devno(void); 54 typedef volatile uint64_t ioport64_t; 56 55 57 56 extern int physmem_map(uintptr_t, size_t, unsigned int, void **); … … 69 68 extern int pio_disable(void *, size_t); 70 69 71 typedef void (*trace_fnc)(const volatile void *place, uint 32_t val,70 typedef void (*trace_fnc)(const volatile void *place, uint64_t val, 72 71 volatile void* base, size_t size, void *data, bool write); 73 72 74 73 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 75 extern void pio_trace_log(const volatile void *, uint 32_t val, bool write);74 extern void pio_trace_log(const volatile void *, uint64_t val, bool write); 76 75 extern void pio_trace_disable(void *); 77 76 … … 79 78 extern void pio_write_16(ioport16_t *, uint16_t); 80 79 extern void pio_write_32(ioport32_t *, uint32_t); 80 extern void pio_write_64(ioport64_t *, uint64_t); 81 81 82 82 extern uint8_t pio_read_8(const ioport8_t *); 83 83 extern uint16_t pio_read_16(const ioport16_t *); 84 84 extern uint32_t pio_read_32(const ioport32_t *); 85 extern uint64_t pio_read_64(const ioport64_t *); 85 86 86 87 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, … … 111 112 } 112 113 114 static inline uint64_t pio_change_64(ioport64_t *reg, uint64_t val, 115 uint64_t mask, useconds_t delay) 116 { 117 uint64_t v = pio_read_64(reg); 118 udelay(delay); 119 pio_write_64(reg, (v & ~mask) | val); 120 return v; 121 } 122 113 123 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 114 124 { … … 122 132 { 123 133 return pio_change_32(r, v, 0, d); 134 } 135 static inline uint64_t pio_set_64(ioport64_t *r, uint64_t v, useconds_t d) 136 { 137 return pio_change_64(r, v, 0, d); 124 138 } 125 139 … … 136 150 return pio_change_32(r, 0, v, d); 137 151 } 152 static inline uint64_t pio_clear_64(ioport64_t *r, uint64_t v, useconds_t d) 153 { 154 return pio_change_64(r, 0, v, d); 155 } 138 156 139 157 #endif
Note:
See TracChangeset
for help on using the changeset viewer.