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
This commit is contained in:
parent
fe9df26a36
commit
f17768d6df
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user