Changeset ee06f2a in mainline for kernel/arch/sparc64/include/asm.h


Ignore:
Timestamp:
2009-02-15T15:28:00Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2d96f4d
Parents:
e7f2ad68
Message:

Introduce a more platform-neutral name for programmed I/O.

The new API looks like pio_read_n() or pio_write_n(), where n is 8, 16 or 32.
The old API (i.e. inb(), inw(), inl(), outb() outw(), outl()) may have made
some people think that the interface is only to be used with the separate I/O
space. That's not the case. This API is to be implemented on all platforms
so that we can finally have really generic kernel device drivers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/include/asm.h

    re7f2ad68 ree06f2a  
    4545#include <arch/barrier.h>
    4646
    47 static inline void outb(ioport_t port, uint8_t v)
     47static inline void pio_write_8(ioport_t port, uint8_t v)
    4848{
    4949        *((volatile uint8_t *)(port)) = v;
     
    5151}
    5252
    53 static inline void outw(ioport_t port, uint16_t v)
     53static inline void pio_write_16(ioport_t port, uint16_t v)
    5454{
    5555        *((volatile uint16_t *)(port)) = v;
     
    5757}
    5858
    59 static inline void outl(ioport_t port, uint32_t v)
     59static inline void pio_write_32(ioport_t port, uint32_t v)
    6060{
    6161        *((volatile uint32_t *)(port)) = v;
     
    6363}
    6464
    65 static inline uint8_t inb(ioport_t port)
     65static inline uint8_t pio_read_8(ioport_t port)
    6666{
    6767        uint8_t rv;
     
    7373}
    7474
    75 static inline uint16_t inw(ioport_t port)
     75static inline uint16_t pio_read_16(ioport_t port)
    7676{
    7777        uint16_t rv;
     
    8383}
    8484
    85 static inline uint32_t inl(ioport_t port)
     85static inline uint32_t pio_read_32(ioport_t port)
    8686{
    8787        uint32_t rv;
Note: See TracChangeset for help on using the changeset viewer.