Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips (TX39) switch from TX local I/O manager to ...



details:   https://anonhg.NetBSD.org/src/rev/cbb878ef3da2
branches:  trunk
changeset: 511173:cbb878ef3da2
user:      uch <uch%NetBSD.org@localhost>
date:      Wed Jun 13 19:09:07 2001 +0000

description:
(TX39) switch from TX local I/O manager to hpcio

diffstat:

 sys/arch/hpcmips/conf/TX3912        |   60 ++++---
 sys/arch/hpcmips/conf/TX3922        |   56 ++++---
 sys/arch/hpcmips/conf/files.hpcmips |   15 +-
 sys/arch/hpcmips/dev/ucbio.c        |   94 ++++++------
 sys/arch/hpcmips/tx/tx39.c          |   11 +-
 sys/arch/hpcmips/tx/tx39io.c        |  256 ++++++++++++++++++++++-------------
 sys/arch/hpcmips/tx/tx39iovar.h     |    8 +-
 sys/arch/hpcmips/tx/tx39var.h       |   37 +----
 sys/arch/hpcmips/tx/txcom.c         |    4 +-
 sys/arch/hpcmips/tx/txioman.c       |  104 +++++---------
 sys/arch/hpcmips/tx/txioman_in.c    |  155 ---------------------
 sys/arch/hpcmips/tx/txioman_out.c   |  104 --------------
 sys/arch/hpcmips/tx/txiomanvar.h    |   57 --------
 13 files changed, 323 insertions(+), 638 deletions(-)

diffs (truncated from 1412 to 300 lines):

diff -r d4161e7b6cb4 -r cbb878ef3da2 sys/arch/hpcmips/conf/TX3912
--- a/sys/arch/hpcmips/conf/TX3912      Wed Jun 13 19:02:13 2001 +0000
+++ b/sys/arch/hpcmips/conf/TX3912      Wed Jun 13 19:09:07 2001 +0000
@@ -2,7 +2,7 @@
 # Distribution kernel (TOSHIBA TX3912 based model) kernel config file
 
 #
-#      $NetBSD: TX3912,v 1.29 2001/01/04 05:20:37 sato Exp $
+#      $NetBSD: TX3912,v 1.30 2001/06/13 19:09:07 uch Exp $
 #
 include                "arch/hpcmips/conf/std.hpcmips"
 
@@ -120,39 +120,47 @@
 #
 options USE_POLL       # keyboard / touchpanel device  requires this
 
-# unified IO module manager
-# group 0 MFIO
-#      1 IO
-#      2 BETTY IO
+# IO module manager (virtual bridge) DO NOT DELETE
+txioman* at txsim?
+# iochip 0 TX39 internal IO
+#       1 TX39 internal MFIO
+#       2 BETTY IO
 #      (3 ITE IO notyet)
 # edge  0 no interrupt.
 # edge  1 positive edge
 # edge  2 negative edge
 # edge  3 both edge
 # initial ... set initial state (on/off)
-txioman3 at txsim? platform COMPAQ_C
-txout* at txioman3 id PWCTL_LED        evtype POWER group 0 port 3 initial 0
-txin*  at txioman3 id BTN_REC          evtype BUTTON group 1 port 6 edge 1
-txin*  at txioman3 id BTN_APP0         evtype BUTTON group 1 port 5 edge 1
-txin*  at txioman3 id PME_AC           evtype EVENT group 0 port 28 edge 1
-txin*  at txioman3 id COM0_DCD         evtype EVENT group 0 port 30 edge 3
-txin*  at txioman3 id COM0_CTS         evtype EVENT group 0 port 5  edge 3
-txout* at txioman3 id COM0_DTR         evtype SET   group 0 port 31
-txout* at txioman3 id COM0_RTS         evtype SET   group 0 port 6
-txioman30 at txsim? platform COMPAQ_C_810
-txout* at txioman30 id BTN_LIGHT       evtype BUTTON group 2 port 5
+hpcioman3 at txioman? platform COMPAQ_C_2010
+hpcout*        at hpcioman3 iochip 1 evtype POWER  id PWCTL_LED        port 3  initvalue 0
+hpcin* at hpcioman3 iochip 0 evtype BUTTON id BTN_REC          port 6  edge 1
+hpcin* at hpcioman3 iochip 0 evtype BUTTON id BTN_APP0         port 5  edge 1
+hpcin* at hpcioman3 iochip 1 evtype EVENT  id PME_AC           port 28 edge 1
+hpcin* at hpcioman3 iochip 1 evtype EVENT  id COM0_DCD         port 30 edge 3
+hpcin* at hpcioman3 iochip 1 evtype EVENT  id COM0_CTS         port 5  edge 3
+hpcout*        at hpcioman3 iochip 1 evtype SET    id COM0_DTR         port 31
+hpcout*        at hpcioman3 iochip 1 evtype SET    id COM0_RTS         port 6
 
-txioman4 at txsim? platform PHILIPS_NINO
+hpcioman4 at txioman? platform COMPAQ_C_810
+hpcout*        at hpcioman4 iochip 1 evtype POWER  id PWCTL_LED        port 3  initvalue 0
+hpcin* at hpcioman4 iochip 0 evtype BUTTON id BTN_REC          port 6  edge 1
+hpcin* at hpcioman4 iochip 0 evtype BUTTON id BTN_APP0         port 5  edge 1
+hpcin* at hpcioman4 iochip 1 evtype EVENT  id PME_AC           port 28 edge 1
+hpcin* at hpcioman4 iochip 1 evtype EVENT  id COM0_DCD         port 30 edge 3
+hpcin* at hpcioman4 iochip 1 evtype EVENT  id COM0_CTS         port 5  edge 3
+hpcout*        at hpcioman4 iochip 1 evtype SET    id COM0_DTR         port 31
+hpcout*        at hpcioman4 iochip 1 evtype SET    id COM0_RTS         port 6
+hpcout*        at hpcioman4 iochip 2 evtype BUTTON id BTN_LIGHT        port 5
 
-txioman5 at txsim? platform SHARP_MOBILON
-txout* at txioman5 id PWCTL_LCDLIGHT   evtype POWER  group 0 port 14
-txin*  at txioman5 id BTN_REC          evtype BUTTON group 1 port 0 edge 1
-txin*  at txioman5 id BTN_APP0         evtype BUTTON group 0 port 31 edge 1
-txin*  at txioman5 id BTN_COVER        evtype BUTTON group 0 port 29 edge 1
-#txin* at txioman5 id COM0_CTS         evtype EVENT  group 1 port 4 edge 3 # DANGER
-#txin* at txioman5 id COM0_DCD         evtype EVENT  group 1 port 6 edge 3 # DANGER
-txout* at txioman5 id COM0_RTS         evtype SET    group 1 port 5
-txout* at txioman5 id COM0_DTR         evtype SET    group 0 port 15
+hpcioman5 at txioman? platform SHARP_MOBILON
+hpcout*        at hpcioman5 iochip 1 evtype POWER  id PWCTL_LCDLIGHT   port 14
+hpcin* at hpcioman5 iochip 0 evtype BUTTON id BTN_REC          port 0  edge 1
+hpcin* at hpcioman5 iochip 1 evtype BUTTON id BTN_APP0         port 31 edge 1
+hpcin* at hpcioman5 iochip 1 evtype BUTTON id BTN_COVER        port 29 edge 1
+#hpcin*        at hpcioman5 iochip 0 evtype EVENT  id COM0_CTS         port 4  edge 3 # DANGER
+#hpcin*        at hpcioman5 iochip 0 evtype EVENT  id COM0_DCD         port 6  edge 3 # DANGER
+hpcout*        at hpcioman5 iochip 0 evtype SET    id COM0_RTS         port 5
+hpcout*        at hpcioman5 iochip 1 evtype SET    id COM0_DTR         port 15
 
 # Chip select manager
 txcsbus3       at tx39biu? platform COMPAQ_C
diff -r d4161e7b6cb4 -r cbb878ef3da2 sys/arch/hpcmips/conf/TX3922
--- a/sys/arch/hpcmips/conf/TX3922      Wed Jun 13 19:02:13 2001 +0000
+++ b/sys/arch/hpcmips/conf/TX3922      Wed Jun 13 19:09:07 2001 +0000
@@ -1,7 +1,7 @@
 #
 # Distribution kernel (TOSHIBA TX3922 based model) kernel config file
 #
-#      $NetBSD: TX3922,v 1.31 2001/01/16 03:38:22 augustss Exp $
+#      $NetBSD: TX3922,v 1.32 2001/06/13 19:09:07 uch Exp $
 #
 include                "arch/hpcmips/conf/std.hpcmips"
 
@@ -110,36 +110,38 @@
 txcsbus1       at tx39biu? platform SHARP_TELIOS
 txcsbus2       at tx39biu? platform VICTOR_INTERLINK
 
-# unified IO module manager
-# group 0 MFIO
-#      1 IO
-#      2 BETTY IO (
+# IO module manager (virtual bridge) DO NOT DELETE
+txioman* at txsim?
+# iochip 0 TX39 internal IO
+#       1 TX39 internal MFIO
+#       2 BETTY IO
 #      (3) ITE IO notyet
 #      (4) Plum2 IO (EXTPW[0:2]) notyet
-txioman1 at txsim? platform SHARP_TELIOS_HCAJ1
-txin*  at txioman1 id BTN_APP0         evtype BUTTON group 1 port 7 edge 1 # IE button 
-txin*  at txioman1 id BTN_APP1         evtype BUTTON group 1 port 8 edge 1 # Mail button 
-txin*  at txioman1 id PME_AC           evtype PMEVENT group 1 port 6 edge 1# AC-power
-txin*  at txioman1 id COM0_CTS         evtype EVENT group 0 port 27 edge 3
-txin*  at txioman1 id COM0_DCD         evtype EVENT group 0 port 29 edge 3
-txout* at txioman1 id PWCTL_LED        evtype POWER group 1 port 4  flags 3 #(blink)
+hpcioman1 at txioman? platform SHARP_TELIOS_HCAJ1
+hpcin* at hpcioman1 iochip 0 evtype BUTTON  id BTN_APP0   port 7  edge 1 # IE button 
+hpcin* at hpcioman1 iochip 0 evtype BUTTON  id BTN_APP1   port 8  edge 1 # Mail button 
+hpcin* at hpcioman1 iochip 0 evtype PMEVENT id PME_AC     port 6  edge 1 # AC-power
+hpcin* at hpcioman1 iochip 1 evtype EVENT   id COM0_CTS   port 27 edge 3
+hpcin* at hpcioman1 iochip 1 evtype EVENT   id COM0_DCD   port 29 edge 3
+hpcout*        at hpcioman1 iochip 0 evtype POWER   id PWCTL_LED  port 4  flags 3 #(blink)
 
-txioman2 at txsim? platform SHARP_TELIOS_HCVJ1C_JP
-txin*  at txioman2 id BTN_APP0         evtype BUTTON group 1 port 7 edge 1 # IE button 
-txin*  at txioman2 id BTN_APP1         evtype BUTTON group 1 port 8 edge 1 # Mail button 
-txin*  at txioman2 id BTN_APP2         evtype BUTTON group 1 port 11 edge 1 # Video button
-txin*  at txioman2 id BTN_APP3         evtype BUTTON group 1 port 12 edge 1 # Head phone button
-txin*  at txioman2 id PME_AC           evtype PMEVENT group 1 port 6
-txin*  at txioman2 id COM0_CTS         evtype EVENT  group 0 port 27 edge 3
-txin*  at txioman2 id COM0_DCD         evtype EVENT  group 1 port 13 edge 3
-txout* at txioman2 id PWCTL_COM0       evtype POWER  group 1 port 15
-txout* at txioman2 id PWCTL_LED        evtype POWER  group 1 port 4 flags 3 #(blink)
+hpcioman2 at txioman? platform SHARP_TELIOS_HCVJ1C_JP
+hpcin* at hpcioman2 iochip 0 evtype BUTTON  id BTN_APP0   port 7  edge 1 # IE button 
+hpcin* at hpcioman2 iochip 0 evtype BUTTON  id BTN_APP1   port 8  edge 1 # Mail button 
+hpcin* at hpcioman2 iochip 0 evtype BUTTON  id BTN_APP2   port 11 edge 1 # Video button
+hpcin* at hpcioman2 iochip 0 evtype BUTTON  id BTN_APP3   port 12 edge 1 # Head phone button
+hpcin* at hpcioman2 iochip 0 evtype PMEVENT id PME_AC     port 6
+hpcin* at hpcioman2 iochip 1 evtype EVENT   id COM0_CTS   port 27 edge 3
+hpcin* at hpcioman2 iochip 0 evtype EVENT   id COM0_DCD   port 13 edge 3
+hpcout*        at hpcioman2 iochip 0 evtype POWER   id PWCTL_COM0 port 15
+hpcout*        at hpcioman2 iochip 0 evtype POWER   id PWCTL_LED  port 4  flags 3 #(blink)
 
-txioman3 at txsim? platform VICTOR_INTERLINK_MPC101
-txin*  at txioman3 id BTN_COVER        evtype BUTTON group 1 port 4
-txin*  at txioman3 id BTN_REC          evtype BUTTON group 1 port 7
-txin*  at txioman3 id COM0_DCD         evtype EVENT group 0 port 29
-txin*  at txioman3 id COM0_CTS         evtype EVENT group 0 port 30
+# InterLink (not maintainanced.)
+hpcioman3 at txioman? platform VICTOR_INTERLINK
+hpcin* at hpcioman3 iochip 0 evtype BUTTON id BTN_COVER   port 4
+hpcin* at hpcioman3 iochip 0 evtype BUTTON id BTN_REC  port 7
+hpcin* at hpcioman3 iochip 1 evtype EVENT  id COM0_DCD port 29
+hpcin* at hpcioman3 iochip 1 evtype EVENT  id COM0_CTS port 30
 # kbd MFIO:7 ?
 
 options USE_POLL
diff -r d4161e7b6cb4 -r cbb878ef3da2 sys/arch/hpcmips/conf/files.hpcmips
--- a/sys/arch/hpcmips/conf/files.hpcmips       Wed Jun 13 19:02:13 2001 +0000
+++ b/sys/arch/hpcmips/conf/files.hpcmips       Wed Jun 13 19:09:07 2001 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hpcmips,v 1.58 2001/06/13 07:32:48 enami Exp $
+#      $NetBSD: files.hpcmips,v 1.59 2001/06/13 19:09:07 uch Exp $
 
 # maxpartitions must be first item in files.${ARCH}.
 maxpartitions 8
@@ -207,13 +207,12 @@
 defopt TX39UARTDEBUG
 defopt USE_POLL
 
-device txsim {[platform = -1]}
+device txsim { }
 device txcsbusif {[platform = -1]}
 device txcomif {[slot = -1]}
 device txsibif {[slot = -1]}
 device ucbif { }
 device irif { }
-device txiomanif {[evtype = -1], [id = -1], [group = -1], [port = -1], [edge = -1], [initial = -1]}
 
 attach txsim at mainbus
 file arch/hpcmips/tx/txsim.c           txsim
@@ -247,18 +246,10 @@
 attach tx39io at txsim
 file arch/hpcmips/tx/tx39io.c          tx39io
 
-device txioman: txiomanif
+device txioman: hpcioif
 attach txioman at txsim
 file arch/hpcmips/tx/txioman.c         txioman
 
-device txin
-attach txin at txiomanif
-file arch/hpcmips/tx/txioman_in.c      txin
-
-device txout
-attach txout at txiomanif
-file arch/hpcmips/tx/txioman_out.c     txout
-
 device tx39sib: txsibif
 attach tx39sib at txsim
 file arch/hpcmips/tx/tx39sib.c         tx39sib
diff -r d4161e7b6cb4 -r cbb878ef3da2 sys/arch/hpcmips/dev/ucbio.c
--- a/sys/arch/hpcmips/dev/ucbio.c      Wed Jun 13 19:02:13 2001 +0000
+++ b/sys/arch/hpcmips/dev/ucbio.c      Wed Jun 13 19:09:07 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ucbio.c,v 1.2 2000/10/22 10:42:32 uch Exp $    */
+/*     $NetBSD: ucbio.c,v 1.3 2001/06/13 19:09:08 uch Exp $    */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -56,6 +56,8 @@
 #include <hpcmips/dev/ucb1200var.h>
 #include <hpcmips/dev/ucb1200reg.h>
 
+#include <dev/hpc/hpciovar.h>  /* I/O manager */
+
 int ucbio_match(struct device*, struct cfdata *, void *);
 void ucbio_attach(struct device*, struct device *, void *);
 
@@ -69,7 +71,7 @@
        tx_chipset_tag_t sc_tc;
 
        struct betty_port_status sc_stat, sc_ostat;
-       struct txio_ops sc_betty_ops;
+       struct hpcio_chip sc_hc;
 };
 
 struct cfattach ucbio_ca = {
@@ -77,20 +79,20 @@
 };
 
 /* I/O */
-static int betty_in(void *, int);
-static void betty_out(void *, int, int);
+static int betty_in(hpcio_chip_t, int);
+static void betty_out(hpcio_chip_t, int, int);
 /* interrupt */
-static void betty_intr_map(void *, int, int *, int *);
-static void *betty_intr_establish(void *, int, int (*)(void *), void *);
-static void betty_intr_disestablish(void *, void *);
+static hpcio_intr_handle_t betty_intr_establish(hpcio_chip_t, int, int,
+    int (*)(void *), void *);
+static void betty_intr_disestablish(hpcio_chip_t, void *);
 /* debug */
-static void betty_update(void *);
-static void betty_dump(void *);
+static void betty_update(hpcio_chip_t);
+static void betty_dump(hpcio_chip_t);
 
 int
 ucbio_match(struct device *parent, struct cfdata *cf, void *aux)
 {
-       return 1;
+       return (1);
 }
 
 void
@@ -98,32 +100,32 @@
 {
        struct ucb1200_attach_args *ucba = aux;
        struct ucbio_softc *sc = (void *)self;
-       struct txio_ops *ops = &sc->sc_betty_ops;
+       struct hpcio_chip *hc = &sc->sc_hc;
 
        sc->sc_tc = ucba->ucba_tc;
        printf("\n");
 
-       ops->_v                 = sc;
-       ops->_group             = BETTY;
-       ops->_in                = betty_in;
-       ops->_out               = betty_out;
-       ops->_intr_map          = betty_intr_map;
-       ops->_intr_establish    = betty_intr_establish;
-       ops->_intr_disestablish = betty_intr_disestablish;
-       ops->_update            = betty_update;
-       ops->_dump              = betty_dump;
+       hc->hc_sc                = sc;
+       hc->hc_chipid            = 2;
+       hc->hc_name              = "UCB1200";
+       hc->hc_portread          = betty_in;
+       hc->hc_portwrite         = betty_out;
+       hc->hc_intr_establish    = betty_intr_establish;
+       hc->hc_intr_disestablish = betty_intr_disestablish;
+       hc->hc_update            = betty_update;
+       hc->hc_dump              = betty_dump;
 
-       tx_conf_register_ioman(sc->sc_tc, ops);
+       tx_conf_register_ioman(sc->sc_tc, hc);
 
-       tx_ioman_update(BETTY);
-       tx_ioman_dump(BETTY);
+       hpcio_update(hc);
+       hpcio_dump(hc);
 }
 



Home | Main Index | Thread Index | Old Index