diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-08-06 07:38:40 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-09-23 10:56:41 +0200 |
commit | 5d0b5c9463c2f0824155933cbbfbf31ca09c5e4a (patch) | |
tree | 1e25700fb11dff1a3e27143280309e1446dae635 /freebsd/sys | |
parent | PCI(4): Install header files (diff) | |
download | rtems-libbsd-5d0b5c9463c2f0824155933cbbfbf31ca09c5e4a.tar.bz2 |
PCI(4): Add big endian support
Diffstat (limited to 'freebsd/sys')
-rw-r--r-- | freebsd/sys/dev/pci/pci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/freebsd/sys/dev/pci/pci.c b/freebsd/sys/dev/pci/pci.c index 2c977b85..ae9c90d4 100644 --- a/freebsd/sys/dev/pci/pci.c +++ b/freebsd/sys/dev/pci/pci.c @@ -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)) |