Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/amiga add files which deal with the gayle chip



details:   https://anonhg.NetBSD.org/src/rev/1903b828936f
branches:  trunk
changeset: 481130:1903b828936f
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Sun Jan 23 20:53:18 2000 +0000

description:
add files which deal with the gayle chip

diffstat:

 sys/arch/amiga/amiga/gayle.c |  27 ++++++++++++++++++++++
 sys/arch/amiga/amiga/gayle.h |  54 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 0 deletions(-)

diffs (89 lines):

diff -r f0a7375cb364 -r 1903b828936f sys/arch/amiga/amiga/gayle.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/amiga/gayle.c      Sun Jan 23 20:53:18 2000 +0000
@@ -0,0 +1,27 @@
+/*     $NetBSD: gayle.c,v 1.1 2000/01/23 20:53:18 aymeric Exp $        */
+
+/*
+ * Gayle management routines
+ *
+ *   Any module that uses gayle should call gayle_init() before using anything
+ *   related to gayle. gayle_init() can be called multiple times.
+ */
+
+#include <amiga/amiga/gayle.h>
+#include <amiga/dev/zbusvar.h>
+
+struct gayle_struct *gayle_base_virtual_address;
+
+#define GAYLE_PHYS_ADDRESS      0xda8000
+
+void
+gayle_init(void) {
+       static int did_init = 0;
+
+       if (did_init)
+               return;
+       did_init = 1;
+
+       gayle_base_virtual_address =
+               (struct gayle_struct *) ztwomap(GAYLE_PHYS_ADDRESS);
+}
diff -r f0a7375cb364 -r 1903b828936f sys/arch/amiga/amiga/gayle.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/amiga/amiga/gayle.h      Sun Jan 23 20:53:18 2000 +0000
@@ -0,0 +1,54 @@
+/*     $NetBSD: gayle.h,v 1.1 2000/01/23 20:53:18 aymeric Exp $        */
+
+#include <sys/types.h>
+
+struct gayle_struct {
+       volatile u_int8_t       pcc_status;
+/* Depending on the mode the card is in, most of the bits have different
+   meanings */
+#define GAYLE_CCMEM_DETECT     0x40
+#define GAYLE_CCMEM_BVD1       0x20
+#define GAYLE_CCMEM_BVD2       0x10
+#define GAYLE_CCMEM_WP         0x08
+#define GAYLE_CCMEM_BUSY       0x04
+
+#define GAYLE_CCIO_STSCHG      0x20
+#define GAYLE_CCIO_SPKR                0x10
+#define GAYLE_CCIO_IREQ                0x04
+
+       u_int8_t __pad0[0xfff];
+       volatile u_int8_t       intreq;
+
+       u_int8_t __pad1[0xfff];
+       volatile u_int8_t       intena;
+#define GAYLE_INT_IDE          0x80
+#define GAYLE_INT_DETECT       0x40
+#define GAYLE_INT_BVD1         0x20
+#define GAYLE_INT_STSCHG       0x20
+#define GAYLE_INT_BVD2         0x10
+#define GAYLE_INT_SPKR         0x10
+#define GAYLE_INT_WP           0x08
+#define GAYLE_INT_BUSY         0x04
+#define GAYLE_INT_IREQ         0x04
+#define GAYLE_INT_IDEACK0      0x02
+#define GAYLE_INT_IDEACK1      0x01
+
+       u_int8_t __pad2[0xfff];
+       volatile u_int8_t       pcc_config;
+};
+
+#define GAYLE_PCMCIA_START     0xa00000
+#define GAYLE_PCMCIA_ATTR_START        0xa00000
+#define GAYLE_PCMCIA_ATTR_END  0xa20000
+
+#define GAYLE_PCMCIA_IO_START  0xa20000
+#define GAYLE_PCMCIA_IO_END    0xa40000
+
+#define GAYLE_PCMCIA_RESET     0xa40000
+#define GAYLE_PCMCIA_END       0xa42000
+#define NPCMCIAPG              btoc(GAYLE_PCMCIA_END - GAYLE_PCMCIA_START)
+
+extern struct gayle_struct *gayle_base_virtual_address;
+#define gayle (*gayle_base_virtual_address)
+
+void gayle_init __P((void));



Home | Main Index | Thread Index | Old Index