Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/cardbus Pick I/O before Memory space.



details:   https://anonhg.NetBSD.org/src/rev/f0910659b0cd
branches:  trunk
changeset: 483605:f0910659b0cd
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Mar 14 02:08:21 2000 +0000

description:
Pick I/O before Memory space.

diffstat:

 sys/dev/cardbus/if_tlp_cardbus.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (47 lines):

diff -r 0f735fb59370 -r f0910659b0cd sys/dev/cardbus/if_tlp_cardbus.c
--- a/sys/dev/cardbus/if_tlp_cardbus.c  Tue Mar 14 01:58:34 2000 +0000
+++ b/sys/dev/cardbus/if_tlp_cardbus.c  Tue Mar 14 02:08:21 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_cardbus.c,v 1.18 2000/03/10 07:26:41 thorpej Exp $      */
+/*     $NetBSD: if_tlp_cardbus.c,v 1.19 2000/03/14 02:08:21 thorpej Exp $      */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -244,7 +244,18 @@
         * Map the device.
         */
        csc->sc_csr = PCI_COMMAND_MASTER_ENABLE;
-       if (0 && Cardbus_mapreg_map(ct, TULIP_PCI_MMBA,
+       if (Cardbus_mapreg_map(ct, TULIP_PCI_IOBA,
+           PCI_MAPREG_TYPE_IO, 0, &sc->sc_st, &sc->sc_sh, &adr,
+           &csc->sc_mapsize) == 0) {
+#if rbus
+#else
+               (*ct->ct_cf->cardbus_io_open)(cc, 0, adr, adr+csc->sc_mapsize);
+#endif
+               csc->sc_cben = CARDBUS_IO_ENABLE;
+               csc->sc_csr |= PCI_COMMAND_IO_ENABLE;
+               csc->sc_bar_reg = TULIP_PCI_IOBA;
+               csc->sc_bar_val = adr | PCI_MAPREG_TYPE_IO;
+       } else if (Cardbus_mapreg_map(ct, TULIP_PCI_MMBA,
            PCI_MAPREG_TYPE_MEM|PCI_MAPREG_MEM_TYPE_32BIT, 0,
            &sc->sc_st, &sc->sc_sh, &adr, &csc->sc_mapsize) == 0) {
 #if rbus
@@ -255,17 +266,6 @@
                csc->sc_csr |= PCI_COMMAND_MEM_ENABLE;
                csc->sc_bar_reg = TULIP_PCI_MMBA;
                csc->sc_bar_val = adr | PCI_MAPREG_TYPE_MEM;
-       } else if (Cardbus_mapreg_map(ct, TULIP_PCI_IOBA,
-           PCI_MAPREG_TYPE_IO, 0, &sc->sc_st, &sc->sc_sh, &adr,
-           &csc->sc_mapsize) == 0) {
-#if rbus
-#else
-               (*ct->ct_cf->cardbus_io_open)(cc, 0, adr, adr+csc->sc_mapsize);
-#endif
-               csc->sc_cben = CARDBUS_IO_ENABLE;
-               csc->sc_csr |= PCI_COMMAND_IO_ENABLE;
-               csc->sc_bar_reg = TULIP_PCI_IOBA;
-               csc->sc_bar_val = adr | PCI_MAPREG_TYPE_IO;
        } else {
                printf("%s: unable to map device registers\n",
                    sc->sc_dev.dv_xname);



Home | Main Index | Thread Index | Old Index