Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Maintanance for Ricoh RL5C475. VAIO 505TX uses ...



details:   https://anonhg.NetBSD.org/src/rev/b9d516a88e6b
branches:  trunk
changeset: 479725:b9d516a88e6b
user:      haya <haya%NetBSD.org@localhost>
date:      Mon Dec 20 08:11:42 1999 +0000

description:
Maintanance for Ricoh RL5C475.  VAIO 505TX uses this chip.

diffstat:

 sys/dev/pci/pccbb.c |  17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diffs (53 lines):

diff -r e807404aaca8 -r b9d516a88e6b sys/dev/pci/pccbb.c
--- a/sys/dev/pci/pccbb.c       Mon Dec 20 06:48:11 1999 +0000
+++ b/sys/dev/pci/pccbb.c       Mon Dec 20 08:11:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccbb.c,v 1.8 1999/11/15 16:19:03 joda Exp $   */
+/*     $NetBSD: pccbb.c,v 1.9 1999/12/20 08:11:42 haya Exp $   */
 
 /*
  * Copyright (c) 1998 and 1999 HAYAKAWA Koichi.  All rights reserved.
@@ -523,7 +523,7 @@
                         0, /* address: I don't mind where it is mapped */
                         0x1000, /* size */
                         0x0fff, /* mask */
-                        0x1000, /* align */
+                        (sc->sc_chipset == CB_RX5C47X || sc->sc_chipset == CB_TI113X) ? 0x10000 : 0x1000, /* align */
                         0, /* flags */
                         &sockbase, &sc->sc_base_memh)) {
       return;
@@ -700,7 +700,9 @@
 
   switch (sc->sc_chipset) {
   case CB_RX5C46X:             /* fallthrogh */
+#if 0
   case CB_RX5C47X:
+#endif
     /*
      * The legacy pcic io-port on Ricoh CardBus bridges cannot be
      * disabled by substituting 0 into PCI_LEGACY register.  Ricoh
@@ -1278,16 +1280,21 @@
 cb_reset(sc)
      struct pccbb_softc *sc;
 {
+  /*
+   * Reset Assert at least 20 ms 
+   * Some machines request longer duration.
+   */
+  int reset_duration = (sc->sc_chipset == CB_RX5C47X ? 400*1000 : 40*1000);
   u_int32_t bcr = pci_conf_read(sc->sc_pc, sc->sc_tag, PCI_BCR_INTR);
+
   bcr |= (0x40 << 16);         /* Reset bit Assert (bit 6 at 0x3E) */
   pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_BCR_INTR, bcr);
-  /* Reset Assert at least 20 ms */
-  delay(20*1000);
+  delay(reset_duration);
 
   if (CBB_CARDEXIST & sc->sc_flags) { /* A card exists.  Reset it! */
     bcr &= ~(0x40 << 16);      /* Reset bit Deassert (bit 6 at 0x3E) */
     pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_BCR_INTR, bcr);
-    delay(20*1000);
+    delay(reset_duration);
   }
                                /* No card found on the slot. Keep Reset. */
   return 1;



Home | Main Index | Thread Index | Old Index