summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2010-01-25 19:27:20 +0000
committerimp <imp@FreeBSD.org>2010-01-25 19:27:20 +0000
commit4ac34cbf90d631bda5ab7745c48093ba012fabf6 (patch)
treec75b900efec1724dda16a61cce64da173e05ba5f /sys/mips
parent894160498af21bad4f32d1d7a21b931e099abb1e (diff)
downloadFreeBSD-src-4ac34cbf90d631bda5ab7745c48093ba012fabf6.zip
FreeBSD-src-4ac34cbf90d631bda5ab7745c48093ba012fabf6.tar.gz
Export knowledge of the special bus space we use for the console to
obio. Take advantage of the fact that obio only really supports uart at the moment to use the uart bus tag always for IOPORT allocations. # this needs to be redone to conform to FreeBSD standards and allow for # additional drivers for SoC hardware to attach
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/cavium/obio.c8
-rw-r--r--sys/mips/cavium/uart_cpu_octeonusart.c3
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/mips/cavium/obio.c b/sys/mips/cavium/obio.c
index 1349ae2..9ef5b45 100644
--- a/sys/mips/cavium/obio.c
+++ b/sys/mips/cavium/obio.c
@@ -36,8 +36,8 @@
*/
/*
- * On-board device autoconfiguration support for Intel IQ80321
- * evaluation boards.
+ * On-board device autoconfiguration support for Cavium OCTEON 1 family of
+ * SoC devices.
*/
#include <sys/cdefs.h>
@@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$");
#include <mips/cavium/octeon_pcmap_regs.h>
#include <mips/cavium/obiovar.h>
+extern struct bus_space octeon_uart_tag;
+
int obio_probe(device_t);
int obio_attach(device_t);
@@ -125,7 +127,7 @@ obio_alloc_resource(device_t bus, device_t child, int type, int *rid,
return (NULL);
case SYS_RES_IOPORT:
rm = &sc->oba_rman;
- bt = sc->oba_st;
+ bt = &octeon_uart_tag;
bh = device_get_unit(child) ?
OCTEON_MIO_UART1 : OCTEON_MIO_UART0;
start = bh;
diff --git a/sys/mips/cavium/uart_cpu_octeonusart.c b/sys/mips/cavium/uart_cpu_octeonusart.c
index 78fb7397..d2d8f56 100644
--- a/sys/mips/cavium/uart_cpu_octeonusart.c
+++ b/sys/mips/cavium/uart_cpu_octeonusart.c
@@ -70,7 +70,6 @@ __FBSDID("$FreeBSD$");
* 64-bit word bus that's on the octeon. We only support simple read/write
* in this space. Everything else is undefined.
*/
-
static uint8_t
ou_bs_r_1(void *t, bus_space_handle_t handle, bus_size_t offset)
{
@@ -127,7 +126,7 @@ ou_bs_w_8(void *t, bus_space_handle_t bsh, bus_size_t offset, uint64_t value)
oct_write64(bsh + (offset << 3), value);
}
-static struct bus_space octeon_uart_tag = {
+struct bus_space octeon_uart_tag = {
.bs_map = generic_bs_map,
.bs_unmap = generic_bs_unmap,
.bs_subregion = generic_bs_subregion,
OpenPOWER on IntegriCloud