Revision: linuxbios@linuxbios.org--devel/freebios--devel--2.0--patch-3
Creator: Eric Biederman <ebiederman@lnxi.com> Add read[bwl] write[bwl] to arch/io.h for i386 A pending patch requires needs this and ppc already has them so it is a good idea to implement them :) I don't know why this was not implemented earlier. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1922 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
3f8eb7a072
commit
4966de81c3
|
@ -138,5 +138,35 @@ static inline void insl(uint16_t port, void *addr, unsigned long count)
|
|||
);
|
||||
}
|
||||
|
||||
static inline void writeb(uint8_t b, volatile void *addr)
|
||||
{
|
||||
*(volatile uint8_t *) addr = b;
|
||||
}
|
||||
|
||||
static inline void writew(uint16_t b, volatile void *addr)
|
||||
{
|
||||
*(volatile uint16_t *) addr = b;
|
||||
}
|
||||
|
||||
static inline void writel(uint32_t b, volatile void *addr)
|
||||
{
|
||||
*(volatile uint32_t *) addr = b;
|
||||
}
|
||||
|
||||
static inline uint8_t readb(const volatile void *addr)
|
||||
{
|
||||
return *(volatile uint8_t *) addr;
|
||||
}
|
||||
|
||||
static inline uint16_t readw(const volatile void *addr)
|
||||
{
|
||||
return *(volatile uint16_t *) addr;
|
||||
}
|
||||
|
||||
static inline uint32_t readl(const volatile void *addr)
|
||||
{
|
||||
return *(volatile uint32_t *) addr;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue