Changes in uspace/lib/c/include/ddi.h [aad43a8:7ee7e6a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/ddi.h
raad43a8 r7ee7e6a 52 52 typedef volatile uint16_t ioport16_t; 53 53 typedef volatile uint32_t ioport32_t; 54 typedef volatile uint64_t ioport64_t; 54 55 extern int device_assign_devno(void); 55 56 56 57 extern int physmem_map(uintptr_t, size_t, unsigned int, void **); … … 68 69 extern int pio_disable(void *, size_t); 69 70 70 typedef void (*trace_fnc)(const volatile void *place, uint 64_t val,71 typedef void (*trace_fnc)(const volatile void *place, uint32_t val, 71 72 volatile void* base, size_t size, void *data, bool write); 72 73 73 74 extern int pio_trace_enable(void *, size_t, trace_fnc, void *); 74 extern void pio_trace_log(const volatile void *, uint 64_t val, bool write);75 extern void pio_trace_log(const volatile void *, uint32_t val, bool write); 75 76 extern void pio_trace_disable(void *); 76 77 … … 78 79 extern void pio_write_16(ioport16_t *, uint16_t); 79 80 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 *);86 85 87 86 static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask, … … 112 111 } 113 112 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 123 113 static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d) 124 114 { … … 132 122 { 133 123 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);138 124 } 139 125 … … 150 136 return pio_change_32(r, 0, v, d); 151 137 } 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 }156 138 157 139 #endif
Note:
See TracChangeset
for help on using the changeset viewer.