Use the base arm bus_space instead of an identical local copy.
This commit is contained in:
parent
673eea0b9b
commit
11083b32fd
@ -312,7 +312,7 @@ initarm(struct arm_boot_params *abp)
|
||||
* registers.
|
||||
*/
|
||||
i80321_calibrate_delay();
|
||||
i80321_sdram_bounds(&obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE,
|
||||
i80321_sdram_bounds(obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE,
|
||||
&memstart, &memsize);
|
||||
physmem = memsize / PAGE_SIZE;
|
||||
cninit();
|
||||
|
@ -6,7 +6,6 @@
|
||||
arm/xscale/i80321/iq80321.c standard
|
||||
arm/xscale/i80321/ep80219_machdep.c standard
|
||||
arm/xscale/i80321/obio.c standard
|
||||
arm/xscale/i80321/obio_space.c standard
|
||||
arm/xscale/i80321/uart_cpu_i80321.c optional uart
|
||||
arm/xscale/i80321/uart_bus_i80321.c optional uart
|
||||
dev/uart/uart_dev_ns8250.c optional uart
|
||||
|
@ -2,6 +2,7 @@
|
||||
#
|
||||
# IOP Specific
|
||||
#
|
||||
arm/arm/bus_space_base.c standard
|
||||
arm/arm/bus_space_generic.c standard
|
||||
arm/arm/cpufunc_asm_xscale.S standard
|
||||
arm/xscale/i80321/i80321.c standard
|
||||
|
@ -1,4 +1,5 @@
|
||||
#$FreeBSD$
|
||||
arm/arm/bus_space_base.c standard
|
||||
arm/arm/bus_space_generic.c standard
|
||||
arm/arm/cpufunc_asm_xscale.S standard
|
||||
arm/xscale/i80321/i80321.c standard
|
||||
|
@ -3,7 +3,6 @@ arm/xscale/i80321/iq80321.c standard
|
||||
arm/xscale/i80321/iq31244_machdep.c standard
|
||||
arm/xscale/i80321/iq31244_7seg.c optional iq31244_7seg
|
||||
arm/xscale/i80321/obio.c standard
|
||||
arm/xscale/i80321/obio_space.c standard
|
||||
arm/xscale/i80321/uart_cpu_i80321.c optional uart
|
||||
arm/xscale/i80321/uart_bus_i80321.c optional uart
|
||||
dev/uart/uart_dev_ns8250.c optional uart
|
||||
|
@ -313,7 +313,7 @@ initarm(struct arm_boot_params *abp)
|
||||
* registers.
|
||||
*/
|
||||
i80321_calibrate_delay();
|
||||
i80321_sdram_bounds(&obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE,
|
||||
i80321_sdram_bounds(obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE,
|
||||
&memstart, &memsize);
|
||||
physmem = memsize / PAGE_SIZE;
|
||||
cninit();
|
||||
|
@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$");
|
||||
#include <arm/xscale/i80321/iq80321reg.h>
|
||||
#include <arm/xscale/i80321/obiovar.h>
|
||||
|
||||
bus_space_tag_t obio_bs_tag;
|
||||
|
||||
int obio_probe(device_t);
|
||||
int obio_attach(device_t);
|
||||
|
||||
@ -72,7 +74,8 @@ obio_attach(device_t dev)
|
||||
{
|
||||
struct obio_softc *sc = device_get_softc(dev);
|
||||
|
||||
sc->oba_st = &obio_bs_tag;
|
||||
obio_bs_tag = arm_base_bs_tag;
|
||||
sc->oba_st = obio_bs_tag;
|
||||
sc->oba_addr = IQ80321_OBIO_BASE;
|
||||
sc->oba_size = IQ80321_OBIO_SIZE;
|
||||
sc->oba_rman.rm_type = RMAN_ARRAY;
|
||||
|
@ -1,127 +0,0 @@
|
||||
/* $NetBSD: obio_space.c,v 1.6 2003/07/15 00:25:05 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Written by Jason R. Thorpe for Wasabi Systems, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed for the NetBSD Project by
|
||||
* Wasabi Systems, Inc.
|
||||
* 4. The name of Wasabi Systems, Inc. may not be used to endorse
|
||||
* or promote products derived from this software without specific prior
|
||||
* written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* bus_space functions for IQ80321 on-board devices
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD$");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/bus.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
|
||||
/* Prototypes for all the bus_space structure functions */
|
||||
bs_protos(generic);
|
||||
|
||||
/*
|
||||
* The obio bus space tag. This is constant for all instances, so
|
||||
* we never have to explicitly "create" it.
|
||||
*/
|
||||
struct bus_space obio_bs_tag = {
|
||||
/* cookie */
|
||||
(void *) 0,
|
||||
|
||||
/* mapping/unmapping */
|
||||
generic_bs_map,
|
||||
generic_bs_unmap,
|
||||
generic_bs_subregion,
|
||||
|
||||
/* allocation/deallocation */
|
||||
generic_bs_alloc,
|
||||
generic_bs_free,
|
||||
|
||||
/* barrier */
|
||||
generic_bs_barrier,
|
||||
|
||||
/* read (single) */
|
||||
generic_bs_r_1,
|
||||
generic_bs_r_2,
|
||||
generic_bs_r_4,
|
||||
NULL,
|
||||
|
||||
/* read multiple */
|
||||
generic_bs_rm_1,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* read region */
|
||||
generic_bs_rr_1,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* write (single) */
|
||||
generic_bs_w_1,
|
||||
generic_bs_w_2,
|
||||
generic_bs_w_4,
|
||||
NULL,
|
||||
|
||||
/* write multiple */
|
||||
generic_bs_wm_1,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* write region */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* set multiple */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* set region */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
/* copy */
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
@ -53,6 +53,6 @@ struct obio_softc {
|
||||
struct rman oba_irq_rman;
|
||||
|
||||
};
|
||||
extern struct bus_space obio_bs_tag;
|
||||
extern bus_space_tag_t obio_bs_tag;
|
||||
|
||||
#endif /* _IQ80321_OBIOVAR_H_ */
|
||||
|
@ -53,14 +53,14 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
|
||||
{
|
||||
di->ops = uart_getops(&uart_ns8250_class);
|
||||
di->bas.chan = 0;
|
||||
di->bas.bst = &obio_bs_tag;
|
||||
di->bas.bst = obio_bs_tag;
|
||||
di->bas.regshft = 0;
|
||||
di->bas.rclk = 0;
|
||||
di->baudrate = 115200;
|
||||
di->databits = 8;
|
||||
di->stopbits = 1;
|
||||
di->parity = UART_PARITY_NONE;
|
||||
uart_bus_space_io = &obio_bs_tag;
|
||||
uart_bus_space_io = obio_bs_tag;
|
||||
uart_bus_space_mem = NULL;
|
||||
di->bas.bsh = 0xfe800000;
|
||||
return (0);
|
||||
|
@ -293,7 +293,7 @@ initarm(struct arm_boot_params *abp)
|
||||
cpu_setup("");
|
||||
|
||||
i80321_calibrate_delay();
|
||||
i81342_sdram_bounds(&obio_bs_tag, IOP34X_VADDR, &memstart, &memsize);
|
||||
i81342_sdram_bounds(obio_bs_tag, IOP34X_VADDR, &memstart, &memsize);
|
||||
physmem = memsize / PAGE_SIZE;
|
||||
cninit();
|
||||
/* Set stack for exception handlers */
|
||||
|
@ -1,4 +1,5 @@
|
||||
# $FreeBSD$
|
||||
arm/arm/bus_space_base.c standard
|
||||
arm/arm/bus_space_generic.c standard
|
||||
arm/arm/cpufunc_asm_xscale.S standard
|
||||
arm/arm/cpufunc_asm_xscale_c3.S standard
|
||||
@ -9,7 +10,6 @@ arm/xscale/i8134x/i81342_mcu.c standard
|
||||
arm/xscale/i8134x/i81342_pci.c optional pci
|
||||
arm/xscale/i8134x/i81342_space.c standard
|
||||
arm/xscale/i8134x/obio.c standard
|
||||
arm/xscale/i8134x/obio_space.c standard
|
||||
arm/xscale/i8134x/uart_bus_i81342.c optional uart
|
||||
arm/xscale/i8134x/uart_cpu_i81342.c optional uart
|
||||
dev/uart/uart_dev_ns8250.c optional uart
|
||||
|
@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <arm/xscale/i8134x/i81342reg.h>
|
||||
#include <arm/xscale/i8134x/obiovar.h>
|
||||
|
||||
bus_space_tag_t obio_bs_tag;
|
||||
|
||||
static int
|
||||
obio_probe(device_t dev)
|
||||
@ -68,7 +69,8 @@ obio_attach(device_t dev)
|
||||
{
|
||||
struct obio_softc *sc = device_get_softc(dev);
|
||||
|
||||
sc->oba_st = &obio_bs_tag;
|
||||
obio_bs_tag = arm_base_bs_tag;
|
||||
sc->oba_st = obio_bs_tag;
|
||||
sc->oba_rman.rm_type = RMAN_ARRAY;
|
||||
sc->oba_rman.rm_descr = "OBIO I/O";
|
||||
if (rman_init(&sc->oba_rman) != 0 ||
|
||||
|
@ -50,6 +50,6 @@ struct obio_softc {
|
||||
struct rman oba_irq_rman;
|
||||
|
||||
};
|
||||
extern struct bus_space obio_bs_tag;
|
||||
extern bus_space_tag_t obio_bs_tag;
|
||||
|
||||
#endif /* _IQ80321_OBIOVAR_H_ */
|
||||
|
@ -54,14 +54,14 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
|
||||
|
||||
di->ops = uart_getops(&uart_ns8250_class);
|
||||
di->bas.chan = 0;
|
||||
di->bas.bst = &obio_bs_tag;
|
||||
di->bas.bst = obio_bs_tag;
|
||||
di->bas.regshft = 2;
|
||||
di->bas.rclk = 33334000;
|
||||
di->baudrate = 115200;
|
||||
di->databits = 8;
|
||||
di->stopbits = 1;
|
||||
di->parity = UART_PARITY_NONE;
|
||||
uart_bus_space_io = &obio_bs_tag;
|
||||
uart_bus_space_io = obio_bs_tag;
|
||||
uart_bus_space_mem = NULL;
|
||||
di->bas.bsh = IOP34X_UART0_VADDR;
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user