mirror of https://github.com/ipxe/ipxe.git
Kill off lots of warnings in via-velocity.c by correcting these definitions.
parent
1af1668c95
commit
5e3f2247e0
|
@ -1,6 +1,7 @@
|
||||||
#ifndef ETHERBOOT_IO_H
|
#ifndef ETHERBOOT_IO_H
|
||||||
#define ETHERBOOT_IO_H
|
#define ETHERBOOT_IO_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include "virtaddr.h"
|
#include "virtaddr.h"
|
||||||
|
|
||||||
/* virt_to_bus converts an addresss inside of etherboot [_start, _end]
|
/* virt_to_bus converts an addresss inside of etherboot [_start, _end]
|
||||||
|
@ -71,13 +72,13 @@ static inline void iounmap(void *virt_addr __unused)
|
||||||
* differently. On the x86 architecture, we just read/write the
|
* differently. On the x86 architecture, we just read/write the
|
||||||
* memory location directly.
|
* memory location directly.
|
||||||
*/
|
*/
|
||||||
#define readb(addr) (*(volatile unsigned char *) (addr))
|
#define readb(addr) (*(volatile uint8_t *) (addr))
|
||||||
#define readw(addr) (*(volatile unsigned short *) (addr))
|
#define readw(addr) (*(volatile uint16_t *) (addr))
|
||||||
#define readl(addr) (*(volatile unsigned int *) (addr))
|
#define readl(addr) (*(volatile uint32_t *) (addr))
|
||||||
|
|
||||||
#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b))
|
#define writeb(b,addr) ((*(volatile uint8_t *) (addr)) = (b))
|
||||||
#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b))
|
#define writew(b,addr) ((*(volatile uint16_t *) (addr)) = (b))
|
||||||
#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b))
|
#define writel(b,addr) ((*(volatile uint32_t *) (addr)) = (b))
|
||||||
|
|
||||||
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
|
#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c))
|
||||||
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
|
#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c))
|
||||||
|
|
Loading…
Reference in New Issue