[PowerPC64LE] Bus space prep for LE
Swap the BE and LE bus_space tags when on LE, and adjust the nexus tag to match. This is prep for a a followup that makes the powerpc bus_space macros easier to maintain in the future. Sponsored by: Tag1 Consulting, Inc.
This commit is contained in:
parent
a72eeb2025
commit
edf215199e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=365697
@ -790,7 +790,11 @@ bs_le_sr_8(bus_space_handle_t bsh, bus_size_t ofs, uint64_t val, size_t cnt)
|
||||
TODO;
|
||||
}
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
struct bus_space bs_le_tag = {
|
||||
#else
|
||||
struct bus_space bs_be_tag = {
|
||||
#endif
|
||||
/* mapping/unmapping */
|
||||
bs_gen_map,
|
||||
bs_gen_unmap,
|
||||
@ -884,7 +888,11 @@ struct bus_space bs_be_tag = {
|
||||
bs_be_sr_8,
|
||||
};
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
struct bus_space bs_be_tag = {
|
||||
#else
|
||||
struct bus_space bs_le_tag = {
|
||||
#endif
|
||||
/* mapping/unmapping */
|
||||
bs_gen_map,
|
||||
bs_gen_unmap,
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/endian.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
@ -173,7 +174,11 @@ static bus_space_tag_t
|
||||
nexus_get_bus_tag(device_t bus __unused, device_t child __unused)
|
||||
{
|
||||
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN
|
||||
return(&bs_le_tag);
|
||||
#else
|
||||
return(&bs_be_tag);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user