summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_cpu_powerpc.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-12-19 18:00:50 +0000
committermarcel <marcel@FreeBSD.org>2007-12-19 18:00:50 +0000
commitc932130a316381031c153a6d005ad368b4e06f25 (patch)
tree956e367a9205ea80aea7a55392cb7b817d95191f /sys/dev/uart/uart_cpu_powerpc.c
parent93ea7f35941531199bafe14cc0f05096516fe4ad (diff)
downloadFreeBSD-src-c932130a316381031c153a6d005ad368b4e06f25.zip
FreeBSD-src-c932130a316381031c153a6d005ad368b4e06f25.tar.gz
Redefine bus_space_tag_t on PowerPC from a 32-bit integral to
a pointer to struct bus_space. The structure contains function pointers that do the actual bus space access. The reason for this change is that previously all bus space accesses were little endian (i.e. had an explicit byte-swap for multi-byte accesses), because all busses on Macs are little endian. The upcoming support for Book E, and in particular the E500 core, requires support for big-endian busses because all embedded peripherals are in the native byte-order. With this change, there's no distinction between I/O port space and memory mapped I/O. PowerPC doesn't have I/O port space. Busses assign tags based on the byte-order only. For that purpose, two global structures exist (bs_be_tag and bs_le_tag), of which the address can be taken to get a valid tag. Obtained from: Juniper, Semihalf
Diffstat (limited to 'sys/dev/uart/uart_cpu_powerpc.c')
-rw-r--r--sys/dev/uart/uart_cpu_powerpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/uart/uart_cpu_powerpc.c b/sys/dev/uart/uart_cpu_powerpc.c
index 6647c7d..de6af2b 100644
--- a/sys/dev/uart/uart_cpu_powerpc.c
+++ b/sys/dev/uart/uart_cpu_powerpc.c
@@ -38,8 +38,8 @@ __FBSDID("$FreeBSD$");
#include <dev/uart/uart.h>
#include <dev/uart/uart_cpu.h>
-bus_space_tag_t uart_bus_space_io = PPC_BUS_SPACE_IO;
-bus_space_tag_t uart_bus_space_mem = PPC_BUS_SPACE_MEM;
+bus_space_tag_t uart_bus_space_io = &bs_le_tag;
+bus_space_tag_t uart_bus_space_mem = &bs_le_tag;
int
uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2)
OpenPOWER on IntegriCloud