diff options
Diffstat (limited to 'sys/arch/sgi/pci')
-rw-r--r-- | sys/arch/sgi/pci/ioc.c | 11 | ||||
-rw-r--r-- | sys/arch/sgi/pci/iocvar.h | 15 |
2 files changed, 12 insertions, 14 deletions
diff --git a/sys/arch/sgi/pci/ioc.c b/sys/arch/sgi/pci/ioc.c index a19240806f4..f4d9dcf083e 100644 --- a/sys/arch/sgi/pci/ioc.c +++ b/sys/arch/sgi/pci/ioc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ioc.c,v 1.18 2009/07/01 21:56:37 miod Exp $ */ +/* $OpenBSD: ioc.c,v 1.19 2009/07/26 19:58:51 miod Exp $ */ /* * Copyright (c) 2008 Joel Sing. @@ -158,13 +158,13 @@ ioc_attach(struct device *parent, struct device *self, void *aux) data = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG); data |= PCI_COMMAND_MEM_ENABLE | PCI_COMMAND_PARITY_ENABLE | PCI_COMMAND_SERR_ENABLE; + data &= ~PCI_COMMAND_INTERRUPT_DISABLE; pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, data); printf("\n"); /* - * Build a suitable bus_space_handle by rebasing the xbridge - * inherited one to our BAR, and restoring the original + * Build a suitable bus_space_handle by restoring the original * non-swapped subword access methods. * * XXX This is horrible and will need to be rethought if @@ -179,7 +179,6 @@ ioc_attach(struct device *parent, struct device *self, void *aux) } bcopy(memt, sc->sc_mem_bus_space, sizeof(*sc->sc_mem_bus_space)); - sc->sc_mem_bus_space->bus_base = memh; sc->sc_mem_bus_space->_space_read_1 = xbow_read_1; sc->sc_mem_bus_space->_space_read_2 = xbow_read_2; sc->sc_mem_bus_space->_space_read_raw_2 = xbow_read_raw_2; @@ -187,9 +186,6 @@ ioc_attach(struct device *parent, struct device *self, void *aux) sc->sc_mem_bus_space->_space_write_2 = xbow_write_2; sc->sc_mem_bus_space->_space_write_raw_2 = xbow_write_raw_2; - /* XXX undo xbridge mapping games */ - sc->sc_mem_bus_space->_space_map = xbow_space_map; - sc->sc_memt = sc->sc_mem_bus_space; sc->sc_memh = memh; @@ -407,6 +403,7 @@ ioc_attach_child(struct device *ioc, const char *name, bus_addr_t base, int dev) iaa.iaa_name = name; iaa.iaa_memt = sc->sc_memt; + iaa.iaa_memh = sc->sc_memh; iaa.iaa_dmat = sc->sc_dmat; iaa.iaa_base = base; iaa.iaa_dev = dev; diff --git a/sys/arch/sgi/pci/iocvar.h b/sys/arch/sgi/pci/iocvar.h index e59a2ac783d..a5c314f6084 100644 --- a/sys/arch/sgi/pci/iocvar.h +++ b/sys/arch/sgi/pci/iocvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iocvar.h,v 1.2 2009/04/12 17:56:58 miod Exp $ */ +/* $OpenBSD: iocvar.h,v 1.3 2009/07/26 19:58:51 miod Exp $ */ /* * Copyright (c) 2008 Miodrag Vallat. @@ -17,15 +17,16 @@ */ struct ioc_attach_args { - const char *iaa_name; + const char *iaa_name; - bus_space_tag_t iaa_memt; - bus_dma_tag_t iaa_dmat; + bus_space_tag_t iaa_memt; + bus_space_handle_t iaa_memh; + bus_dma_tag_t iaa_dmat; - bus_addr_t iaa_base; - int iaa_dev; + bus_addr_t iaa_base; + int iaa_dev; - uint8_t iaa_enaddr[6]; + uint8_t iaa_enaddr[6]; }; void *ioc_intr_establish(void *, u_long, int, int (*)(void *), |