Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/arm Pull up revisions:



details:   https://anonhg.NetBSD.org/src/rev/b9ab9c87f407
branches:  netbsd-6
changeset: 774406:b9ab9c87f407
user:      jdc <jdc%NetBSD.org@localhost>
date:      Fri Aug 10 12:15:51 2012 +0000

description:
Pull up revisions:
  src/sys/arch/arm/arm/bus_space_a2x.S revision 1.1
  src/sys/arch/arm/arm/bus_space_a4x.S revision 1.1
  src/sys/arch/arm/gemini/files.gemini revision 1.12
  src/sys/arch/arm/mpcore/files.mpcore revision 1.2
  src/sys/arch/arm/mpcore/mpcore_a2x_io.S delete
  src/sys/arch/arm/mpcore/mpcore_a4x_io.S delete
  src/sys/arch/arm/omap/files.omap revision 1.6
  src/sys/arch/arm/omap/files.omap2 revision 1.9
  src/sys/arch/arm/omap/omap_a2x_io.S delete
  src/sys/arch/arm/xscale/files.pxa2x0 revision 1.18
  src/sys/arch/arm/xscale/pxa2x0_a4x_io.S delete
(requested by skrll to fix ticket #454).

Provide generic a[24]x bus_space methods (aNx is normal access, offset
multipled by N).

Use the generic method and delete the other versions.

Discussed with matt@

diffstat:

 sys/arch/arm/arm/bus_space_a2x.S    |  112 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/arm/bus_space_a4x.S    |  112 ++++++++++++++++++++++++++++++++++++
 sys/arch/arm/gemini/files.gemini    |    4 +-
 sys/arch/arm/mpcore/files.mpcore    |    6 +-
 sys/arch/arm/mpcore/mpcore_a2x_io.S |   99 -------------------------------
 sys/arch/arm/mpcore/mpcore_a4x_io.S |   99 -------------------------------
 sys/arch/arm/omap/files.omap        |    6 +-
 sys/arch/arm/omap/files.omap2       |    6 +-
 sys/arch/arm/omap/omap_a2x_io.S     |  103 ---------------------------------
 sys/arch/arm/xscale/files.pxa2x0    |    4 +-
 sys/arch/arm/xscale/pxa2x0_a4x_io.S |  103 ---------------------------------
 11 files changed, 237 insertions(+), 417 deletions(-)

diffs (truncated from 751 to 300 lines):

diff -r ceaebe15eb80 -r b9ab9c87f407 sys/arch/arm/arm/bus_space_a2x.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/arm/bus_space_a2x.S  Fri Aug 10 12:15:51 2012 +0000
@@ -0,0 +1,112 @@
+/*     $NetBSD: bus_space_a2x.S,v 1.2.2.2 2012/08/10 12:15:51 jdc Exp $        */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION 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>
+#include <machine/cpu.h>
+
+RCSID("$NetBSD: bus_space_a2x.S,v 1.2.2.2 2012/08/10 12:15:51 jdc Exp $")
+
+/*
+ * bus_space_read_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset);
+ */
+
+ENTRY(a2x_bs_r_1)
+       ldrb    r0, [r1, r2, lsl #1]
+       mov     pc, lr
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a2x_bs_r_2)
+       lsl     r2, r2, #1
+       ldrh    r0, [r1, r2]
+       mov     pc, lr
+#endif
+
+ENTRY(a2x_bs_r_4)
+       ldr     r0, [r1, r2, lsl #1]
+       mov     pc, lr
+
+/*
+ * bus_space_read_multi_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t *data, bus_size_t count);
+ */
+
+ENTRY(a2x_bs_rm_1)
+       lsl     r2, r2, #1
+       b       generic_bs_rm_1
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a2x_bs_rm_2)
+       lsl     r2, r2, #1
+       b       generic_armv4_bs_rm_2
+#endif
+
+ENTRY(a2x_bs_rm_4)
+       lsl     r2, r2, #1
+       b       generic_bs_rm_4
+
+/*
+ * bus_space_write_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t value);
+ */
+ENTRY(a2x_bs_w_1)
+       strb    r3, [r1, r2, lsl #1]
+       mov     pc, lr
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a2x_bs_w_2)
+       lsl     r2, r2, #1
+       strh    r3, [r1, r2]
+       mov     pc, lr
+#endif
+
+ENTRY(a2x_bs_w_4)
+       str     r3, [r1, r2, lsl #1]
+       mov     pc, lr
+
+/*
+ * bus_space_write_multi_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t *data, bus_size_t count);
+ */
+
+ENTRY(a2x_bs_wm_1)
+       lsl     r2, r2, #1
+       b       generic_bs_wm_1
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a2x_bs_wm_2)
+       lsl     r2, r2, #1
+       b       generic_armv4_bs_wm_2
+#endif
+
+ENTRY(a2x_bs_wm_4)
+       lsl     r2, r2, #1
+       b       generic_bs_wm_4
diff -r ceaebe15eb80 -r b9ab9c87f407 sys/arch/arm/arm/bus_space_a4x.S
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/arm/arm/bus_space_a4x.S  Fri Aug 10 12:15:51 2012 +0000
@@ -0,0 +1,112 @@
+/*     $NetBSD: bus_space_a4x.S,v 1.2.2.2 2012/08/10 12:15:51 jdc Exp $        */
+
+/*-
+ * Copyright (c) 2012 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``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 FOUNDATION 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>
+#include <machine/cpu.h>
+
+RCSID("$NetBSD: bus_space_a4x.S,v 1.2.2.2 2012/08/10 12:15:51 jdc Exp $")
+
+/*
+ * bus_space_read_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset);
+ */
+
+ENTRY(a4x_bs_r_1)
+       ldrb    r0, [r1, r2, lsl #2]
+       mov     pc, lr
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a4x_bs_r_2)
+       lsl     r2, r2, #2
+       ldrh    r0, [r1, r2]
+       mov     pc, lr
+#endif
+
+ENTRY(a4x_bs_r_4)
+       ldr     r0, [r1, r2, lsl #2]
+       mov     pc, lr
+
+/*
+ * bus_space_read_multi_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t *data, bus_size_t count);
+ */
+
+ENTRY(a4x_bs_rm_1)
+       lsl     r2, r2, #2
+       b       generic_bs_rm_1
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a4x_bs_rm_2)
+       lsl     r2, r2, #2
+       b       generic_armv4_bs_rm_2
+#endif
+
+ENTRY(a4x_bs_rm_4)
+       lsl     r2, r2, #2
+       b       generic_bs_rm_4
+
+/*
+ * bus_space_write_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t value);
+ */
+ENTRY(a4x_bs_w_1)
+       strb    r3, [r1, r2, lsl #2]
+       mov     pc, lr
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a4x_bs_w_2)
+       lsl     r2, r2, #2
+       strh    r3, [r1, r2]
+       mov     pc, lr
+#endif
+
+ENTRY(a4x_bs_w_4)
+       str     r3, [r1, r2, lsl #2]
+       mov     pc, lr
+
+/*
+ * bus_space_write_multi_[124](void *cookie, bus_space_handle_t handle,
+ *     bus_size_t offset, uint{8,16,32}_t *data, bus_size_t count);
+ */
+
+ENTRY(a4x_bs_wm_1)
+       lsl     r2, r2, #2
+       b       generic_bs_wm_1
+
+#if (ARM_ARCH_4 + ARM_ARCH_5 + ARM_ARCH_6 + ARM_ARCH_7) > 0
+ENTRY(a4x_bs_wm_2)
+       lsl     r2, r2, #2
+       b       generic_armv4_bs_wm_2
+#endif
+
+ENTRY(a4x_bs_wm_4)
+       lsl     r2, r2, #2
+       b       generic_bs_wm_4
diff -r ceaebe15eb80 -r b9ab9c87f407 sys/arch/arm/gemini/files.gemini
--- a/sys/arch/arm/gemini/files.gemini  Thu Aug 09 17:13:30 2012 +0000
+++ b/sys/arch/arm/gemini/files.gemini  Fri Aug 10 12:15:51 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.gemini,v 1.11 2011/03/11 03:16:13 bsh Exp $
+#      $NetBSD: files.gemini,v 1.11.10.1 2012/08/10 12:15:51 jdc Exp $
 #
 # Configuration info for GEMINI CPU support
 # Based on omap/files.omap2
@@ -29,7 +29,7 @@
 ##file arch/arm/gemini/gemini_a2x_space.c              obio
 ##file arch/arm/gemini/gemini_a2x_io.S         obio
 file   arch/arm/gemini/gemini_a4x_space.c              obio
-file   arch/arm/xscale/pxa2x0_a4x_io.S         obio
+file   arch/arm/arm/bus_space_a4x.S            obio
 file   arch/arm/gemini/gemini_dma.c
 
 # these bus space methods are not bus-specific ...
diff -r ceaebe15eb80 -r b9ab9c87f407 sys/arch/arm/mpcore/files.mpcore
--- a/sys/arch/arm/mpcore/files.mpcore  Thu Aug 09 17:13:30 2012 +0000
+++ b/sys/arch/arm/mpcore/files.mpcore  Fri Aug 10 12:15:51 2012 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.mpcore,v 1.1 2011/03/10 07:47:15 bsh Exp $
+#      $NetBSD: files.mpcore,v 1.1.14.1 2012/08/10 12:15:51 jdc Exp $
 #
 # Configuration info for the ARM11 MPCore
 #
@@ -10,9 +10,9 @@
 file   arch/arm/mpcore/mpcore_space.c
 #file  arch/arm/imx/imx_dma.c          bus_dma_generic needs-flag
 file   arch/arm/mpcore/mpcore_a2x_space.c      bus_space_a2x needs-flag
-file   arch/arm/mpcore/mpcore_a2x_io.S         bus_space_a2x
+file   arch/arm/arm/bus_space_a2x.S            bus_space_a2x
 file   arch/arm/mpcore/mpcore_a4x_space.c      bus_space_a4x needs-flag
-file   arch/arm/mpcore/mpcore_a4x_io.S         bus_space_a4x
+file   arch/arm/arm/bus_space_a4x.S            bus_space_a4x
 
 # AXI/AHB bus interface and SoC domains
 device axi { [addr=-1], [size=0], [irq=-1], [irqbase=-1]} : bus_space_generic
diff -r ceaebe15eb80 -r b9ab9c87f407 sys/arch/arm/mpcore/mpcore_a2x_io.S
--- a/sys/arch/arm/mpcore/mpcore_a2x_io.S       Thu Aug 09 17:13:30 2012 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/* $NetBSD: mpcore_a2x_io.S,v 1.1 2011/03/10 07:47:15 bsh Exp $ */
-
-/* derived from pxa2x0_a4x_io.S
-       NetBSD: pxa2x0_a4x_io.S,v 1.1 2002/10/19 19:31:39 bsh Exp */
-
-/*
- * Copyright (c) 2002, 2010, 2011 Genetec Corporation.  All rights reserved.
- * Written by Hiroyuki Bessho for Genetec Corporation.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY GENETEC CORPORATION ``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 GENETEC CORPORATION
- * 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



Home | Main Index | Thread Index | Old Index