mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-06 14:14:11 +08:00
PCI(4): Add big endian support
This commit is contained in:
parent
76aee9403a
commit
cdbae21e4d
@ -80,6 +80,14 @@ __FBSDID("$FreeBSD$");
|
||||
#include <rtems/bsd/local/pcib_if.h>
|
||||
#include <rtems/bsd/local/pci_if.h>
|
||||
|
||||
#ifdef __rtems__
|
||||
#undef bus_read_4
|
||||
#define bus_read_4(r, o) \
|
||||
le32toh(bus_space_read_4((r)->r_bustag, (r)->r_bushandle, o))
|
||||
#undef bus_write_4
|
||||
#define bus_write_4(r, o, v) \
|
||||
bus_space_write_4((r)->r_bustag, (r)->r_bushandle, o, htole32(v))
|
||||
#endif /* __rtems__ */
|
||||
#define PCIR_IS_BIOS(cfg, reg) \
|
||||
(((cfg)->hdrtype == PCIM_HDRTYPE_NORMAL && reg == PCIR_BIOS) || \
|
||||
((cfg)->hdrtype == PCIM_HDRTYPE_BRIDGE && reg == PCIR_BIOS_1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user