svn commit: r202985 - head/sys/mips/cavium
Warner Losh
imp at FreeBSD.org
Mon Jan 25 19:27:21 UTC 2010
Author: imp
Date: Mon Jan 25 19:27:20 2010
New Revision: 202985
URL: http://svn.freebsd.org/changeset/base/202985
Log:
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
Modified:
head/sys/mips/cavium/obio.c
head/sys/mips/cavium/uart_cpu_octeonusart.c
Modified: head/sys/mips/cavium/obio.c
==============================================================================
--- head/sys/mips/cavium/obio.c Mon Jan 25 19:25:21 2010 (r202984)
+++ head/sys/mips/cavium/obio.c Mon Jan 25 19:27:20 2010 (r202985)
@@ -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
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;
Modified: head/sys/mips/cavium/uart_cpu_octeonusart.c
==============================================================================
--- head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:25:21 2010 (r202984)
+++ head/sys/mips/cavium/uart_cpu_octeonusart.c Mon Jan 25 19:27:20 2010 (r202985)
@@ -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 bs
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,
More information about the svn-src-all
mailing list