Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Put back PCI_HME_BASEADDR.



details:   https://anonhg.NetBSD.org/src/rev/b8dc4529dfd9
branches:  trunk
changeset: 753359:b8dc4529dfd9
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Tue Mar 23 21:51:39 2010 +0000

description:
Put back PCI_HME_BASEADDR.

diffstat:

 sys/dev/pci/if_hme_pci.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 06b58d73eea6 -r b8dc4529dfd9 sys/dev/pci/if_hme_pci.c
--- a/sys/dev/pci/if_hme_pci.c  Tue Mar 23 21:22:25 2010 +0000
+++ b/sys/dev/pci/if_hme_pci.c  Tue Mar 23 21:51:39 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hme_pci.c,v 1.33 2010/03/23 21:22:25 dyoung Exp $   */
+/*     $NetBSD: if_hme_pci.c,v 1.34 2010/03/23 21:51:39 dyoung Exp $   */
 
 /*
  * Copyright (c) 2000 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.33 2010/03/23 21:22:25 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hme_pci.c,v 1.34 2010/03/23 21:51:39 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -56,6 +56,8 @@
 
 #include <dev/ic/hmevar.h>
 
+#define PCI_HME_BASEADDR       0x10
+
 struct hme_pci_softc {
        struct  hme_softc       hsc_hme;        /* HME device */
        bus_space_tag_t         hsc_memt;
@@ -145,7 +147,7 @@
        aprint_naive(": Ethernet controller\n");
 
        csr = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
-       type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_BAR(0));
+       type = pci_mapreg_type(pa->pa_pc, pa->pa_tag, PCI_HME_BASEADDR);
 
        /*
         * enable io/memory-space accesses.  this is kinda of gross; but
@@ -180,7 +182,7 @@
         *
         */
 
-       if (pci_mapreg_map(pa, PCI_BAR(0), type, 0,
+       if (pci_mapreg_map(pa, PCI_HME_BASEADDR, type, 0,
            &hsc->hsc_memt, &hsc->hsc_memh, NULL, NULL) != 0) {
                aprint_error_dev(self, "unable to map device registers\n");
                return;



Home | Main Index | Thread Index | Old Index