diff options
-rw-r--r-- | sys/arch/sparc64/dev/pci_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/include/pci_machdep.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index 61b0b29be2b..ec4436ace0c 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.26 2006/07/10 21:38:01 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.27 2007/04/01 12:26:15 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -367,7 +367,7 @@ pci_conf_read(pci_chipset_tag_t pc, pcitag_t tag, int reg) (long)PCITAG_OFFSET(tag), reg)); if (PCITAG_NODE(tag) != -1) { val = bus_space_read_4(pc->bustag, pc->bushandle, - PCITAG_OFFSET(tag) + reg); + (PCITAG_OFFSET(tag) << pc->tagshift) + reg); } else DPRINTF(SPDB_CONF, ("pci_conf_read: bogus pcitag %x\n", (int)PCITAG_OFFSET(tag))); @@ -389,7 +389,7 @@ pci_conf_write(pci_chipset_tag_t pc, pcitag_t tag, int reg, pcireg_t data) } bus_space_write_4(pc->bustag, pc->bushandle, - PCITAG_OFFSET(tag) + reg, data); + (PCITAG_OFFSET(tag) << pc->tagshift) + reg, data); } /* diff --git a/sys/arch/sparc64/include/pci_machdep.h b/sys/arch/sparc64/include/pci_machdep.h index ddbc74de461..edd8ed60e8d 100644 --- a/sys/arch/sparc64/include/pci_machdep.h +++ b/sys/arch/sparc64/include/pci_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.h,v 1.15 2006/03/19 02:43:38 brad Exp $ */ +/* $OpenBSD: pci_machdep.h,v 1.16 2007/04/01 12:26:15 kettenis Exp $ */ /* $NetBSD: pci_machdep.h,v 1.7 2001/07/20 00:07:14 eeh Exp $ */ /* @@ -63,10 +63,11 @@ typedef u_int pci_intr_handle_t; typedef u_int64_t pcitag_t; struct sparc_pci_chipset { - void *cookie; /* psycho_pbm, but sssh! */ + void *cookie; bus_space_tag_t bustag; bus_space_handle_t bushandle; int rootnode; /* PCI controller */ + int tagshift; int (*intr_map)(struct pci_attach_args *, pci_intr_handle_t *); }; |