I/O access functions

List of functions to be used for hardware register access (I/O).

Native IN/OUT access

Note:
Native means: It uses the same endianess than the CPU.

Single access of various width

The following functions are intended to be used for a single I/O access.

To read a byte (8 bit) from a specific I/O address:

uint8_t readb(unsigned long)

To read a word (16 bit) from a specific I/O address:

uint16_t readw(unsigned long)

To read a long word (32 bit) from a specific I/O address:

uint32_t readl(unsigned long)

To write a byte (8 bit) into a specific I/O address:

void writeb(uint8_t val, unsigned long)

To write a word (16 bit) into a specific I/O address:

void writew(uint16_t val, unsigned long)

To write a long word (32 bit) into a specific I/O address:

void writel(uint32_t val, unsigned long)

String native access of various width

The following functions are intended to be used for string based I/O access.

To read a string of bytes (8 bit) from one specific I/O address:

void readsb(const void __iomem *addr, void *mem_buffer, int byte_count);

To read a string of words (16 bit) from one specific I/O address:

void readsw(const void __iomem *addr, void *mem_buffer, int word_count);

To read a string of long words (32 bit) from one specific I/O address:

void readsl(const void __iomem *addr, void *mem_buffer, int long_count);

To write a string of bytes (8 bit) to one specific I/O address:

void writesb(void __iomem *addr, const void *mem_buffer, int byte_count);

To write a string of words (16 bit) to one specific I/O address:

void writesw(void __iomem *addr, const void *mem_buffer, int word_count);

To write a string of long words (32 bit) to one specific I/O address:

void writesl(void __iomem *addr, const void *mem_buffer, int long_count);

Special IN/OUT access

TBD

Generated on Fri Dec 25 14:13:15 2009 for barebox by  doxygen 1.5.6