Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Use the bus_space_generic bus space ops.
details: https://anonhg.NetBSD.org/src/rev/68827bd29019
branches: trunk
changeset: 525536:68827bd29019
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Apr 12 19:12:31 2002 +0000
description:
Use the bus_space_generic bus space ops.
diffstat:
sys/arch/arm/footbridge/footbridge_com_io.c | 7 +-
sys/arch/arm/footbridge/footbridge_com_io_asm.S | 57 ----
sys/arch/arm/footbridge/footbridge_io.c | 40 +-
sys/arch/arm/footbridge/footbridge_io_asm.S | 300 ----------------------
sys/arch/evbarm/conf/files.integrator | 5 +-
sys/arch/evbarm/ifpga/ifpga_io.c | 40 +-
sys/arch/evbarm/ifpga/ifpga_io_asm.S | 302 -----------------------
sys/arch/netwinder/netwinder/netwinder_machdep.c | 16 +-
8 files changed, 54 insertions(+), 713 deletions(-)
diffs (truncated from 946 to 300 lines):
diff -r 3eb8176605d7 -r 68827bd29019 sys/arch/arm/footbridge/footbridge_com_io.c
--- a/sys/arch/arm/footbridge/footbridge_com_io.c Fri Apr 12 19:02:30 2002 +0000
+++ b/sys/arch/arm/footbridge/footbridge_com_io.c Fri Apr 12 19:12:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_com_io.c,v 1.2 2001/09/10 23:05:19 chris Exp $ */
+/* $NetBSD: footbridge_com_io.c,v 1.3 2002/04/12 19:12:31 thorpej Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -49,6 +49,7 @@
/* Proto types for all the bus_space structure functions */
bs_protos(fcomcons);
+bs_protos(generic);
bs_protos(bs_notimpl);
/* Declare the fcomcons bus space tag */
@@ -78,7 +79,7 @@
/* read (single) */
bs_notimpl_bs_r_1,
bs_notimpl_bs_r_2,
- fcomcons_bs_r_4,
+ generic_bs_r_4,
bs_notimpl_bs_r_8,
/* read multiple */
@@ -96,7 +97,7 @@
/* write (single) */
bs_notimpl_bs_w_1,
bs_notimpl_bs_w_2,
- fcomcons_bs_w_4,
+ generic_bs_w_4,
bs_notimpl_bs_w_8,
/* write multiple */
diff -r 3eb8176605d7 -r 68827bd29019 sys/arch/arm/footbridge/footbridge_com_io_asm.S
--- a/sys/arch/arm/footbridge/footbridge_com_io_asm.S Fri Apr 12 19:02:30 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/* $NetBSD: footbridge_com_io_asm.S,v 1.1 2001/06/09 10:29:12 chris Exp $ */
-
-/*
- * Copyright (c) 1997 Mark Brinicombe.
- * Copyright (c) 1997 Causality Limited
- * All rights reserved.
- *
- * 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 by Mark Brinicombe
- * for the NetBSD Project.
- * 4. The name of the company nor the name of the author may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR OR CONTRIBUTORS 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.
- */
-
-#include <machine/asm.h>
-
-/*
- * bus_space I/O functions for fcomcons
- */
-
-/*
- * read single
- */
-
-ENTRY(fcomcons_bs_r_4)
- ldr r0, [r1, r2]
- mov pc, lr
-
-/*
- * write single
- */
-
-ENTRY(fcomcons_bs_w_4)
- str r3, [r1, r2]
- mov pc, lr
diff -r 3eb8176605d7 -r 68827bd29019 sys/arch/arm/footbridge/footbridge_io.c
--- a/sys/arch/arm/footbridge/footbridge_io.c Fri Apr 12 19:02:30 2002 +0000
+++ b/sys/arch/arm/footbridge/footbridge_io.c Fri Apr 12 19:12:31 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: footbridge_io.c,v 1.5 2002/01/05 22:41:48 chris Exp $ */
+/* $NetBSD: footbridge_io.c,v 1.6 2002/04/12 19:12:31 thorpej Exp $ */
/*
* Copyright (c) 1997 Causality Limited
@@ -48,6 +48,8 @@
/* Proto types for all the bus_space structure functions */
bs_protos(footbridge);
+bs_protos(generic);
+bs_protos(generic_armv4);
bs_protos(bs_notimpl);
bs_map_proto(footbridge_mem);
bs_unmap_proto(footbridge_mem);
@@ -77,39 +79,39 @@
footbridge_bs_barrier,
/* read (single) */
- footbridge_bs_r_1,
- footbridge_bs_r_2,
- footbridge_bs_r_4,
+ generic_bs_r_1,
+ generic_armv4_bs_r_2,
+ generic_bs_r_4,
bs_notimpl_bs_r_8,
/* read multiple */
- footbridge_bs_rm_1,
- footbridge_bs_rm_2,
- footbridge_bs_rm_4,
+ generic_bs_rm_1,
+ generic_armv4_bs_rm_2,
+ generic_bs_rm_4,
bs_notimpl_bs_rm_8,
/* read region */
bs_notimpl_bs_rr_1,
- footbridge_bs_rr_2,
- footbridge_bs_rr_4,
+ generic_armv4_bs_rr_2,
+ generic_bs_rr_4,
bs_notimpl_bs_rr_8,
/* write (single) */
- footbridge_bs_w_1,
- footbridge_bs_w_2,
- footbridge_bs_w_4,
+ generic_bs_w_1,
+ generic_armv4_bs_w_2,
+ generic_bs_w_4,
bs_notimpl_bs_w_8,
/* write multiple */
- footbridge_bs_wm_1,
- footbridge_bs_wm_2,
- footbridge_bs_wm_4,
+ generic_bs_wm_1,
+ generic_armv4_bs_wm_2,
+ generic_bs_wm_4,
bs_notimpl_bs_wm_8,
/* write region */
bs_notimpl_bs_wr_1,
- footbridge_bs_wr_2,
- footbridge_bs_wr_4,
+ generic_armv4_bs_wr_2,
+ generic_bs_wr_4,
bs_notimpl_bs_wr_8,
/* set multiple */
@@ -120,13 +122,13 @@
/* set region */
bs_notimpl_bs_sr_1,
- footbridge_bs_sr_2,
+ generic_armv4_bs_sr_2,
bs_notimpl_bs_sr_4,
bs_notimpl_bs_sr_8,
/* copy */
bs_notimpl_bs_c_1,
- footbridge_bs_c_2,
+ generic_armv4_bs_c_2,
bs_notimpl_bs_c_4,
bs_notimpl_bs_c_8,
};
diff -r 3eb8176605d7 -r 68827bd29019 sys/arch/arm/footbridge/footbridge_io_asm.S
--- a/sys/arch/arm/footbridge/footbridge_io_asm.S Fri Apr 12 19:02:30 2002 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,300 +0,0 @@
-/* $NetBSD: footbridge_io_asm.S,v 1.1 2001/06/09 10:29:13 chris Exp $ */
-
-/*
- * Copyright (c) 1997 Causality Limited.
- * Copyright (c) 1997 Mark Brinicombe.
- * All rights reserved.
- *
- * 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 by Mark Brinicombe
- * for the NetBSD Project.
- * 4. The name of the company nor the name of the author may be used to
- * endorse or promote products derived from this software without specific
- * prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 THE AUTHOR OR CONTRIBUTORS 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.
- */
-
-#include <machine/asm.h>
-
-/*
- * bus_space I/O functions for the footbridge
- */
-
-/*
- * Note these functions use ARM Architecture V4 instructions as
- * all footbridge based systems will be using processors that support
- * V4 or later architectures
- */
-
-/*
- * read single
- */
-
-ENTRY(footbridge_bs_r_1)
- ldrb r0, [r1, r2]
- mov pc, lr
-
-ENTRY(footbridge_bs_r_2)
- ldrh r0, [r1, r2] /*.word 0xe19100b2*/
- mov pc, lr
-
-ENTRY(footbridge_bs_r_4)
- ldr r0, [r1, r2]
- mov pc, lr
-
-/*
- * write single
- */
-
-ENTRY(footbridge_bs_w_1)
- strb r3, [r1, r2]
- mov pc, lr
-
-ENTRY(footbridge_bs_w_2)
- strh r3, [r1, r2] /*.word 0xe18130b2*/
- mov pc, lr
-
-ENTRY(footbridge_bs_w_4)
- str r3, [r1, r2]
- mov pc, lr
-
-/*
- * read multiple
- */
-
-ENTRY(footbridge_bs_rm_1)
- add r0, r1, r2
- mov r1, r3
- ldr r2, [sp, #0]
- teq r2, #0
- moveq pc, lr
-
-Lfootbridge_bs_rm_1_loop:
- ldrb r3, [r0]
- strb r3, [r1], #1
- subs r2, r2, #1
- bne Lfootbridge_bs_rm_1_loop
-
- mov pc, lr
-
-ENTRY(footbridge_bs_rm_2)
- add r0, r1, r2
- mov r1, r3
- ldr r2, [sp, #0]
- teq r2, #0
- moveq pc, lr
-
-Lfootbridge_bs_rm_2_loop:
- ldrh r3, [r0] /*.word 0xe1d030b0*/
- strh r3, [r1], #2 /*.word 0xe0c130b2*/
- subs r2, r2, #1
Home |
Main Index |
Thread Index |
Old Index