aboutsummaryrefslogtreecommitdiff
path: root/sys/arm
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2015-01-21 05:05:07 +0000
committerIan Lepore <ian@FreeBSD.org>2015-01-21 05:05:07 +0000
commit41adadc9c03f878849b644af61331fdda6692193 (patch)
treebb3a6b92b481dc39741a0b2f28ce38c8a91284db /sys/arm
parentc0501ea3fd859208b6c42f107ed82f4a0c2dba75 (diff)
downloadsrc-41adadc9c03f878849b644af61331fdda6692193.tar.gz
src-41adadc9c03f878849b644af61331fdda6692193.zip
Use the base arm bus_space instead of an identical local copy.
Notes
Notes: svn path=/head/; revision=277477
Diffstat (limited to 'sys/arm')
-rw-r--r--sys/arm/xscale/i80321/ep80219_machdep.c2
-rw-r--r--sys/arm/xscale/i80321/files.ep802191
-rw-r--r--sys/arm/xscale/i80321/files.i802191
-rw-r--r--sys/arm/xscale/i80321/files.i803211
-rw-r--r--sys/arm/xscale/i80321/files.iq312441
-rw-r--r--sys/arm/xscale/i80321/iq31244_machdep.c2
-rw-r--r--sys/arm/xscale/i80321/obio.c5
-rw-r--r--sys/arm/xscale/i80321/obio_space.c127
-rw-r--r--sys/arm/xscale/i80321/obiovar.h2
-rw-r--r--sys/arm/xscale/i80321/uart_cpu_i80321.c4
-rw-r--r--sys/arm/xscale/i8134x/crb_machdep.c2
-rw-r--r--sys/arm/xscale/i8134x/files.i813422
-rw-r--r--sys/arm/xscale/i8134x/obio.c4
-rw-r--r--sys/arm/xscale/i8134x/obiovar.h2
-rw-r--r--sys/arm/xscale/i8134x/uart_cpu_i81342.c4
15 files changed, 19 insertions, 141 deletions
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c
index bf3e49ada307..f04f7fdef977 100644
--- a/sys/arm/xscale/i80321/ep80219_machdep.c
+++ b/sys/arm/xscale/i80321/ep80219_machdep.c
@@ -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();
diff --git a/sys/arm/xscale/i80321/files.ep80219 b/sys/arm/xscale/i80321/files.ep80219
index cbf2e39ed5a8..0eaf9db2872c 100644
--- a/sys/arm/xscale/i80321/files.ep80219
+++ b/sys/arm/xscale/i80321/files.ep80219
@@ -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
diff --git a/sys/arm/xscale/i80321/files.i80219 b/sys/arm/xscale/i80321/files.i80219
index e9d9eab95643..10b7630b3da0 100644
--- a/sys/arm/xscale/i80321/files.i80219
+++ b/sys/arm/xscale/i80321/files.i80219
@@ -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
diff --git a/sys/arm/xscale/i80321/files.i80321 b/sys/arm/xscale/i80321/files.i80321
index 48082242e3a3..48f9b08a07ff 100644
--- a/sys/arm/xscale/i80321/files.i80321
+++ b/sys/arm/xscale/i80321/files.i80321
@@ -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
diff --git a/sys/arm/xscale/i80321/files.iq31244 b/sys/arm/xscale/i80321/files.iq31244
index 66d89b3db630..d28d49b3a6b1 100644
--- a/sys/arm/xscale/i80321/files.iq31244
+++ b/sys/arm/xscale/i80321/files.iq31244
@@ -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
diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c
index 9c119ed25bc0..1a1b9e72fc79 100644
--- a/sys/arm/xscale/i80321/iq31244_machdep.c
+++ b/sys/arm/xscale/i80321/iq31244_machdep.c
@@ -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();
diff --git a/sys/arm/xscale/i80321/obio.c b/sys/arm/xscale/i80321/obio.c
index 566d6cd11ce1..55218ccd20d1 100644
--- a/sys/arm/xscale/i80321/obio.c
+++ b/sys/arm/xscale/i80321/obio.c
@@ -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;
diff --git a/sys/arm/xscale/i80321/obio_space.c b/sys/arm/xscale/i80321/obio_space.c
deleted file mode 100644
index 4eba7000dbc7..000000000000
--- a/sys/arm/xscale/i80321/obio_space.c
+++ /dev/null
@@ -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,
-};
diff --git a/sys/arm/xscale/i80321/obiovar.h b/sys/arm/xscale/i80321/obiovar.h
index 8e0c1459d708..182b52f57f5a 100644
--- a/sys/arm/xscale/i80321/obiovar.h
+++ b/sys/arm/xscale/i80321/obiovar.h
@@ -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_ */
diff --git a/sys/arm/xscale/i80321/uart_cpu_i80321.c b/sys/arm/xscale/i80321/uart_cpu_i80321.c
index 32dd463cfb47..a3faec7289df 100644
--- a/sys/arm/xscale/i80321/uart_cpu_i80321.c
+++ b/sys/arm/xscale/i80321/uart_cpu_i80321.c
@@ -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);
diff --git a/sys/arm/xscale/i8134x/crb_machdep.c b/sys/arm/xscale/i8134x/crb_machdep.c
index 195304485bf7..3e6440d4b012 100644
--- a/sys/arm/xscale/i8134x/crb_machdep.c
+++ b/sys/arm/xscale/i8134x/crb_machdep.c
@@ -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 */
diff --git a/sys/arm/xscale/i8134x/files.i81342 b/sys/arm/xscale/i8134x/files.i81342
index c9bd619ed641..089301689857 100644
--- a/sys/arm/xscale/i8134x/files.i81342
+++ b/sys/arm/xscale/i8134x/files.i81342
@@ -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
diff --git a/sys/arm/xscale/i8134x/obio.c b/sys/arm/xscale/i8134x/obio.c
index b8bccce43a1a..5aa3c477d2e2 100644
--- a/sys/arm/xscale/i8134x/obio.c
+++ b/sys/arm/xscale/i8134x/obio.c
@@ -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 ||
diff --git a/sys/arm/xscale/i8134x/obiovar.h b/sys/arm/xscale/i8134x/obiovar.h
index 7350d0ade1bb..237dd9e7d944 100644
--- a/sys/arm/xscale/i8134x/obiovar.h
+++ b/sys/arm/xscale/i8134x/obiovar.h
@@ -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_ */
diff --git a/sys/arm/xscale/i8134x/uart_cpu_i81342.c b/sys/arm/xscale/i8134x/uart_cpu_i81342.c
index 2cb2902a9d1a..1d98d78bcfe2 100644
--- a/sys/arm/xscale/i8134x/uart_cpu_i81342.c
+++ b/sys/arm/xscale/i8134x/uart_cpu_i81342.c
@@ -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);