Source-Changes-HG archive

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

[src/trunk]: src/sys Add dummy "podloader" functions on arm32, and move their...



details:   https://anonhg.NetBSD.org/src/rev/8a9827dfd83a
branches:  trunk
changeset: 512055:8a9827dfd83a
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Wed Jul 04 13:58:04 2001 +0000

description:
Add dummy "podloader" functions on arm32, and move their declarations to the MI
header file.  This should allow MI drivers to use the podloader functions,
though obviously they'll have to be able to cope if podulebus_initloader()
fails.

diffstat:

 sys/arch/arm26/include/podulebus_machdep.h |   7 +---
 sys/arch/arm32/podulebus/podulebus.c       |  48 +++++++++++++++++++++++++++++-
 sys/dev/podulebus/podulebus.h              |   9 +++++-
 3 files changed, 56 insertions(+), 8 deletions(-)

diffs (102 lines):

diff -r 754e04ac83aa -r 8a9827dfd83a sys/arch/arm26/include/podulebus_machdep.h
--- a/sys/arch/arm26/include/podulebus_machdep.h        Wed Jul 04 13:49:24 2001 +0000
+++ b/sys/arch/arm26/include/podulebus_machdep.h        Wed Jul 04 13:58:04 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus_machdep.h,v 1.3 2001/03/24 00:10:42 bjh21 Exp $ */
+/* $NetBSD: podulebus_machdep.h,v 1.4 2001/07/04 13:58:04 bjh21 Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -104,11 +104,6 @@
 
 extern void *podulebus_irq_establish(podulebus_intr_handle_t, int,
     int (*)(void *), void *, struct evcnt *);
-extern int podulebus_initloader(struct podulebus_attach_args *);
-extern int podloader_readbyte(struct podulebus_attach_args *, u_int);
-extern void podloader_writebyte(struct podulebus_attach_args *, u_int, int);
-void podloader_reset(struct podulebus_attach_args *);
-int podloader_callloader(struct podulebus_attach_args *, u_int, u_int);
 
 #endif
 
diff -r 754e04ac83aa -r 8a9827dfd83a sys/arch/arm32/podulebus/podulebus.c
--- a/sys/arch/arm32/podulebus/podulebus.c      Wed Jul 04 13:49:24 2001 +0000
+++ b/sys/arch/arm32/podulebus/podulebus.c      Wed Jul 04 13:58:04 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus.c,v 1.45 2001/07/04 13:38:36 bjh21 Exp $ */
+/* $NetBSD: podulebus.c,v 1.46 2001/07/04 13:58:04 bjh21 Exp $ */
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -585,4 +585,50 @@
        (*tagp)->bs_cookie = (void *)shift;
 }
 
+int
+podulebus_initloader(struct podulebus_attach_args *pa)
+{
+
+       /* No loader support at present on arm32, so always fail. */
+       return -1;
+}
+
+int
+podloader_readbyte(struct podulebus_attach_args *pa, u_int addr)
+{
+
+       panic("podloader_readbyte");
+}
+
+void
+podloader_writebyte(struct podulebus_attach_args *pa, u_int addr, int val)
+{
+
+       panic("podloader_writebyte");
+}
+
+void
+podloader_reset(struct podulebus_attach_args *pa)
+{
+
+       panic("podloader_reset");
+}
+
+int
+podloader_callloader(struct podulebus_attach_args *pa, u_int r0, u_int r1)
+{
+
+       panic("podloader_callloader");
+}
+
+void
+podloader_read_region(struct podulebus_attach_args *pa, u_int src,
+    u_int8_t *dest, size_t length)
+{
+
+       while (length--)
+               *dest++ = podloader_readbyte(pa, src++);
+       podloader_reset(pa);
+}
+
 /* End of podulebus.c */
diff -r 754e04ac83aa -r 8a9827dfd83a sys/dev/podulebus/podulebus.h
--- a/sys/dev/podulebus/podulebus.h     Wed Jul 04 13:49:24 2001 +0000
+++ b/sys/dev/podulebus/podulebus.h     Wed Jul 04 13:58:04 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: podulebus.h,v 1.3 2001/03/20 23:27:04 bjh21 Exp $ */
+/* $NetBSD: podulebus.h,v 1.4 2001/07/04 13:58:04 bjh21 Exp $ */
 
 /*
  * Copyright (c) 1995 Mark Brinicombe.
@@ -59,4 +59,11 @@
 
 #include <machine/podulebus_machdep.h>
 
+/* Podule loader functions. */
+extern int podulebus_initloader(struct podulebus_attach_args *);
+extern int podloader_readbyte(struct podulebus_attach_args *, u_int);
+extern void podloader_writebyte(struct podulebus_attach_args *, u_int, int);
+void podloader_reset(struct podulebus_attach_args *);
+int podloader_callloader(struct podulebus_attach_args *, u_int, u_int);
+
 #endif



Home | Main Index | Thread Index | Old Index