Changeset b5c2f56 in mainline


Ignore:
Timestamp:
2012-11-04T12:41:53Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d27a9c8f
Parents:
ef93167
Message:

libc: Make pio_read_* accept const ioports.

Location:
uspace
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c

    ref93167 rb5c2f56  
    6464} amdm37x_t;
    6565
    66 static void log(volatile void *place, uint32_t val, volatile void* base, size_t size, void *data, bool write)
     66static void log(const volatile void *place, uint32_t val, volatile void* base, size_t size, void *data, bool write)
    6767{
    6868        printf("PIO %s: %p(%p) %#"PRIx32"\n", write ? "WRITE" : "READ",
  • uspace/lib/c/arch/abs32le/include/ddi.h

    ref93167 rb5c2f56  
    5151}
    5252
    53 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     53static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    5454{
    5555        return *port;
    5656}
    5757
    58 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     58static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    5959{
    6060        return *port;
    6161}
    6262
    63 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     63static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    6464{
    6565        return *port;
  • uspace/lib/c/arch/arm32/include/ddi.h

    ref93167 rb5c2f56  
    5252}
    5353
    54 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     54static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    5555{
    5656        return *port;
    5757}
    5858
    59 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     59static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    6060{
    6161        return *port;
    6262}
    6363
    64 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     64static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    6565{
    6666        return *port;
  • uspace/lib/c/arch/ia32/include/ddi.h

    ref93167 rb5c2f56  
    3939#define IO_SPACE_BOUNDARY  ((void *) (64 * 1024))
    4040
    41 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     41static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    4242{
    4343        if (port < (ioport8_t *) IO_SPACE_BOUNDARY) {
     
    5555}
    5656
    57 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     57static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    5858{
    5959        if (port < (ioport16_t *) IO_SPACE_BOUNDARY) {
     
    7171}
    7272
    73 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     73static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    7474{
    7575        if (port < (ioport32_t *) IO_SPACE_BOUNDARY) {
  • uspace/lib/c/arch/ia64/include/ddi.h

    ref93167 rb5c2f56  
    9595}
    9696
    97 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     97static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    9898{
    9999        uint8_t v;
     
    115115}
    116116
    117 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     117static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    118118{
    119119        uint16_t v;
     
    135135}
    136136
    137 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     137static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    138138{
    139139        uint32_t v;
  • uspace/lib/c/arch/mips32/include/ddi.h

    ref93167 rb5c2f56  
    5252}
    5353
    54 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     54static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    5555{
    5656        return *port;
    5757}
    5858
    59 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     59static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    6060{
    6161        return *port;
    6262}
    6363
    64 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     64static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    6565{
    6666        return *port;
  • uspace/lib/c/arch/mips64/include/ddi.h

    ref93167 rb5c2f56  
    5252}
    5353
    54 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     54static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    5555{
    5656        return *port;
    5757}
    5858
    59 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     59static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    6060{
    6161        return *port;
    6262}
    6363
    64 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     64static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    6565{
    6666        return *port;
  • uspace/lib/c/arch/ppc32/include/ddi.h

    ref93167 rb5c2f56  
    5252}
    5353
    54 static inline uint8_t arch_pio_read_8(ioport8_t *port)
     54static inline uint8_t arch_pio_read_8(const ioport8_t *port)
    5555{
    5656        return *port;
    5757}
    5858
    59 static inline uint16_t arch_pio_read_16(ioport16_t *port)
     59static inline uint16_t arch_pio_read_16(const ioport16_t *port)
    6060{
    6161        return *port;
    6262}
    6363
    64 static inline uint32_t arch_pio_read_32(ioport32_t *port)
     64static inline uint32_t arch_pio_read_32(const ioport32_t *port)
    6565{
    6666        return *port;
  • uspace/lib/c/generic/ddi.c

    ref93167 rb5c2f56  
    192192}
    193193
    194 uint8_t pio_read_8(ioport8_t *reg)
     194uint8_t pio_read_8(const ioport8_t *reg)
    195195{
    196196        const uint8_t val = arch_pio_read_8(reg);
     
    199199}
    200200
    201 uint16_t pio_read_16(ioport16_t *reg)
     201uint16_t pio_read_16(const ioport16_t *reg)
    202202{
    203203        const uint16_t val = arch_pio_read_16(reg);
     
    206206}
    207207
    208 uint32_t pio_read_32(ioport32_t *reg)
     208uint32_t pio_read_32(const ioport32_t *reg)
    209209{
    210210        const uint32_t val = arch_pio_read_32(reg);
  • uspace/lib/c/generic/pio_trace.c

    ref93167 rb5c2f56  
    9191
    9292
    93 void pio_trace_log(volatile void *r, uint32_t val, bool write)
     93void pio_trace_log(const volatile void *r, uint32_t val, bool write)
    9494{
    9595        pio_regions_t *regions = get_regions();
  • uspace/lib/c/include/ddi.h

    ref93167 rb5c2f56  
    5454extern int pio_enable(void *, size_t, void **);
    5555
    56 typedef void (*trace_fnc)(volatile void *place, uint32_t val,
     56typedef void (*trace_fnc)(const volatile void *place, uint32_t val,
    5757    volatile void* base, size_t size, void *data, bool write);
    5858
    5959extern int pio_trace_enable(void *, size_t, trace_fnc, void *);
    60 extern void pio_trace_log(volatile void *, uint32_t val, bool write);
     60extern void pio_trace_log(const volatile void *, uint32_t val, bool write);
    6161extern void pio_trace_disable(void *);
    6262
     
    6565extern void pio_write_32(ioport32_t *, uint32_t);
    6666
    67 extern uint8_t pio_read_8(ioport8_t *);
    68 extern uint16_t pio_read_16(ioport16_t *);
    69 extern uint32_t pio_read_32(ioport32_t *);
     67extern uint8_t pio_read_8(const ioport8_t *);
     68extern uint16_t pio_read_16(const ioport16_t *);
     69extern uint32_t pio_read_32(const ioport32_t *);
    7070
    7171static inline uint8_t pio_change_8(
Note: See TracChangeset for help on using the changeset viewer.