Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/macppc/macppc Don't try to change subordinate bus n...



details:   https://anonhg.NetBSD.org/src/rev/bc7dfc08fdfe
branches:  trunk
changeset: 495635:bc7dfc08fdfe
user:      tsubai <tsubai%NetBSD.org@localhost>
date:      Wed Aug 02 09:02:46 2000 +0000

description:
Don't try to change subordinate bus number if pchb != grackle (for now).

diffstat:

 sys/arch/macppc/macppc/rbus_machdep.c |  14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diffs (28 lines):

diff -r 3fba7f1422c4 -r bc7dfc08fdfe sys/arch/macppc/macppc/rbus_machdep.c
--- a/sys/arch/macppc/macppc/rbus_machdep.c     Wed Aug 02 08:57:15 2000 +0000
+++ b/sys/arch/macppc/macppc/rbus_machdep.c     Wed Aug 02 09:02:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rbus_machdep.c,v 1.6 2000/06/29 08:10:45 mrg Exp $     */
+/*     $NetBSD: rbus_machdep.c,v 1.7 2000/08/02 09:02:46 tsubai Exp $  */
 
 /*
  * Copyright (c) 1999
@@ -143,10 +143,14 @@
                x |= 0x02;
                pci_conf_write(pc, tag, 0x8c, x);
 
-               /* Set Subordinate bus number to 1 */
                tag = pci_make_tag(pc, 0, 0, 0);
-               x = pci_conf_read(pc, tag, 0x40);
-               x |= 1 << 8;
-               pci_conf_write(pc, tag, 0x40, x);
+               x = pci_conf_read(pc, tag, PCI_ID_REG);
+               if (PCI_VENDOR(x) == PCI_VENDOR_MOT &&
+                   PCI_PRODUCT(x) == PCI_PRODUCT_MOT_MPC106) {
+                       /* Set subordinate bus number to 1. */
+                       x = pci_conf_read(pc, tag, 0x40);
+                       x |= 1 << 8;
+                       pci_conf_write(pc, tag, 0x40, x);
+               }
        }
 }



Home | Main Index | Thread Index | Old Index