Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ddi.h

    r7ee7e6a raad43a8  
    5252typedef volatile uint16_t ioport16_t;
    5353typedef volatile uint32_t ioport32_t;
    54 
    55 extern int device_assign_devno(void);
     54typedef volatile uint64_t ioport64_t;
    5655
    5756extern int physmem_map(uintptr_t, size_t, unsigned int, void **);
     
    6968extern int pio_disable(void *, size_t);
    7069
    71 typedef void (*trace_fnc)(const volatile void *place, uint32_t val,
     70typedef void (*trace_fnc)(const volatile void *place, uint64_t val,
    7271    volatile void* base, size_t size, void *data, bool write);
    7372
    7473extern int pio_trace_enable(void *, size_t, trace_fnc, void *);
    75 extern void pio_trace_log(const volatile void *, uint32_t val, bool write);
     74extern void pio_trace_log(const volatile void *, uint64_t val, bool write);
    7675extern void pio_trace_disable(void *);
    7776
     
    7978extern void pio_write_16(ioport16_t *, uint16_t);
    8079extern void pio_write_32(ioport32_t *, uint32_t);
     80extern void pio_write_64(ioport64_t *, uint64_t);
    8181
    8282extern uint8_t pio_read_8(const ioport8_t *);
    8383extern uint16_t pio_read_16(const ioport16_t *);
    8484extern uint32_t pio_read_32(const ioport32_t *);
     85extern uint64_t pio_read_64(const ioport64_t *);
    8586
    8687static inline uint8_t pio_change_8(ioport8_t *reg, uint8_t val, uint8_t mask,
     
    111112}
    112113
     114static 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
    113123static inline uint8_t pio_set_8(ioport8_t *r, uint8_t v, useconds_t d)
    114124{
     
    122132{
    123133        return pio_change_32(r, v, 0, d);
     134}
     135static 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);
    124138}
    125139
     
    136150        return pio_change_32(r, 0, v, d);
    137151}
     152static 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}
    138156
    139157#endif
Note: See TracChangeset for help on using the changeset viewer.