Source-Changes-HG archive

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

[src/netbsd-1-5]: src/sys/arch/mvme68k/dev Pullup 1.9 - 1.10 (approved by tv)



details:   https://anonhg.NetBSD.org/src/rev/08d96b8cf23e
branches:  netbsd-1-5
changeset: 489802:08d96b8cf23e
user:      scw <scw%NetBSD.org@localhost>
date:      Tue Oct 17 19:52:04 2000 +0000

description:
Pullup 1.9 - 1.10 (approved by tv)
Bring support for MVME162 into the 1.5 branch.

diffstat:

 sys/arch/mvme68k/dev/zs_pcc.c |  33 ++++++++++++++++++++++++++-------
 1 files changed, 26 insertions(+), 7 deletions(-)

diffs (80 lines):

diff -r 8a70a6f22876 -r 08d96b8cf23e sys/arch/mvme68k/dev/zs_pcc.c
--- a/sys/arch/mvme68k/dev/zs_pcc.c     Tue Oct 17 19:51:31 2000 +0000
+++ b/sys/arch/mvme68k/dev/zs_pcc.c     Tue Oct 17 19:52:04 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs_pcc.c,v 1.8 2000/03/18 22:33:05 scw Exp $   */
+/*     $NetBSD: zs_pcc.c,v 1.8.4.1 2000/10/17 19:52:04 scw Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -123,6 +123,7 @@
 {
        struct zsc_softc *zsc = (void *) self;
        struct pcc_attach_args *pa = aux;
+       struct zsdevice zs;
        bus_space_handle_t bush;
        int zs_level, ir;
        static int didintr;
@@ -132,8 +133,19 @@
 
        zs_level = pa->pa_ipl;
 
-       /* Do common parts of SCC configuration. */
-       zs_config(zsc, pa->pa_bust, bush);
+       /* XXX: This is a gross hack. I need to bus-space zs.c ... */
+       zs.zs_chan_b.zc_csr = (volatile u_char *) bush;
+       zs.zs_chan_b.zc_data = (volatile u_char *) bush + 1;
+       zs.zs_chan_a.zc_csr = (volatile u_char *) bush + 2;
+       zs.zs_chan_a.zc_data = (volatile u_char *) bush + 3;
+
+       /*
+        * Do common parts of SCC configuration.
+        * Note that the vector is not actually used by the ZS chip on
+        * MVME-147. We set up the PCC so that it provides the vector.
+        * This is just here so the real vector is printed at config time.
+        */
+       zs_config(zsc, &zs, PCC_VECBASE + PCCV_ZS, PCLK_147);
 
        /*
         * Now safe to install interrupt handlers.  Note the arguments
@@ -142,7 +154,7 @@
         */
        if (didintr == 0) {
                didintr = 1;
-               pccintr_establish(PCCV_ZS, zshard, zs_level, zsc);
+               pccintr_establish(PCCV_ZS, zshard_shared, zs_level, zsc);
        }
 
        /* Sanity check the interrupt levels. */
@@ -152,11 +164,11 @@
                panic("zs_pcc_attach: zs configured at different IPLs");
 
        /*
-        * Set master interrupt enable.  Vector is programmed into
-        * the SCC by the PCC.
+        * Set master interrupt enable. Vector is supplied by the PCC.
         */
        pcc_reg_write(sys_pcc, PCCREG_SERIAL_INTR_CTRL,
            zs_level | PCC_IENABLE | PCC_ZSEXTERN);
+       zs_write_reg(zsc->zsc_cs[0], 2, PCC_VECBASE + PCCV_ZS);
        zs_write_reg(zsc->zsc_cs[0], 9, zs_init_reg[9]);
 }
 
@@ -187,9 +199,16 @@
 {
        bus_space_tag_t bust = MVME68K_INTIO_BUS_SPACE;
        bus_space_handle_t bush;
+       struct zsdevice zs;
 
        bus_space_map(bust, MAINBUS_PCC_OFFSET + PCC_ZS0_OFF, 4, 0, &bush);
 
+       /* XXX: This is a gross hack. I need to bus-space zs.c ... */
+       zs.zs_chan_b.zc_csr = (volatile u_char *) bush;
+       zs.zs_chan_b.zc_data = (volatile u_char *) bush + 1;
+       zs.zs_chan_a.zc_csr = (volatile u_char *) bush + 2;
+       zs.zs_chan_a.zc_data = (volatile u_char *) bush + 3;
+
        /* Do common parts of console init. */
-       zs_cnconfig(0, 0, bust, bush);
+       zs_cnconfig(0, 0, &zs, PCLK_147);
 }



Home | Main Index | Thread Index | Old Index