Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm32/podulebus Quick hack implementation of region...
details: https://anonhg.NetBSD.org/src/rev/a998c1da88a1
branches: trunk
changeset: 507316:a998c1da88a1
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Mon Mar 19 23:56:45 2001 +0000
description:
Quick hack implementation of region ops. Not very pretty, but good enough
to get ei(4) working on arm32.
diffstat:
sys/arch/arm32/podulebus/podulebus_io.c | 78 ++++++++++++++++++++++++++++++--
1 files changed, 71 insertions(+), 7 deletions(-)
diffs (110 lines):
diff -r 8dca1153903e -r a998c1da88a1 sys/arch/arm32/podulebus/podulebus_io.c
--- a/sys/arch/arm32/podulebus/podulebus_io.c Mon Mar 19 23:03:59 2001 +0000
+++ b/sys/arch/arm32/podulebus/podulebus_io.c Mon Mar 19 23:56:45 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus_io.c,v 1.8 2000/04/17 17:39:18 drochner Exp $ */
+/* $NetBSD: podulebus_io.c,v 1.9 2001/03/19 23:56:45 bjh21 Exp $ */
/*
* Copyright (c) 1997 Mark Brinicombe.
@@ -79,8 +79,8 @@
bs_notimpl_bs_rm_8,
/* read region */
- bs_notimpl_bs_rr_1,
- bs_notimpl_bs_rr_2,
+ podulebus_bs_rr_1,
+ podulebus_bs_rr_2,
bs_notimpl_bs_rr_4,
bs_notimpl_bs_rr_8,
@@ -97,8 +97,8 @@
bs_notimpl_bs_wm_8,
/* write region */
- bs_notimpl_bs_wr_1,
- bs_notimpl_bs_wr_2,
+ podulebus_bs_wr_1,
+ podulebus_bs_wr_2,
bs_notimpl_bs_wr_4,
bs_notimpl_bs_wr_8,
@@ -109,8 +109,8 @@
bs_notimpl_bs_sm_8,
/* set region */
- bs_notimpl_bs_sr_1,
- bs_notimpl_bs_sr_2,
+ podulebus_bs_sr_1,
+ podulebus_bs_sr_2,
bs_notimpl_bs_sr_4,
bs_notimpl_bs_sr_8,
@@ -197,3 +197,67 @@
int flags;
{
}
+
+/* Rough-and-ready implementations from arm26 */
+
+void
+podulebus_bs_rr_1(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int8_t *datap, bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ datap[i] = podulebus_bs_r_1(cookie, bsh, offset + i);
+}
+
+void
+podulebus_bs_rr_2(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int16_t *datap, bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ datap[i] = podulebus_bs_r_2(cookie, bsh, offset + i);
+}
+
+void
+podulebus_bs_wr_1(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int8_t const *datap,
+ bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ podulebus_bs_w_1(cookie, bsh, offset + i, datap[i]);
+}
+
+void
+podulebus_bs_wr_2(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int16_t const *datap,
+ bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ podulebus_bs_w_2(cookie, bsh, offset + i, datap[i]);
+}
+
+void
+podulebus_bs_sr_1(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int8_t value, bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ podulebus_bs_w_1(cookie, bsh, offset + i, value);
+}
+
+void
+podulebus_bs_sr_2(void *cookie, bus_space_handle_t bsh,
+ bus_size_t offset, u_int16_t value, bus_size_t count)
+{
+ int i;
+
+ for (i = 0; i < count; i++)
+ podulebus_bs_w_2(cookie, bsh, offset + i, value);
+}
Home |
Main Index |
Thread Index |
Old Index