summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenric Jungheim <henric@cvs.openbsd.org>2003-02-14 21:05:13 +0000
committerHenric Jungheim <henric@cvs.openbsd.org>2003-02-14 21:05:13 +0000
commit3f43a031d4842409f9f809b810a4b8dd12787aba (patch)
tree473e7e87466f2f6419eeb2f6ef5b9f91ba738597
parent8e40bb6e0610f7e4ae2b4d8315d48e604e88181d (diff)
Do not do arithmetic on bus_space_handle_t.
ok jason@
-rw-r--r--sys/dev/pci/if_hme_pci.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/pci/if_hme_pci.c b/sys/dev/pci/if_hme_pci.c
index 55b8cadc7b0..f6679db70cc 100644
--- a/sys/dev/pci/if_hme_pci.c
+++ b/sys/dev/pci/if_hme_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_hme_pci.c,v 1.7 2003/02/10 22:31:01 jason Exp $ */
+/* $OpenBSD: if_hme_pci.c,v 1.8 2003/02/14 21:05:12 henric Exp $ */
/* $NetBSD: if_hme_pci.c,v 1.3 2000/12/28 22:59:13 sommerfeld Exp $ */
/*
@@ -250,10 +250,14 @@ hmeattach_pci(parent, self, aux)
return;
}
sc->sc_seb = hsc->hsc_memh;
- sc->sc_etx = hsc->hsc_memh + 0x2000;
- sc->sc_erx = hsc->hsc_memh + 0x4000;
- sc->sc_mac = hsc->hsc_memh + 0x6000;
- sc->sc_mif = hsc->hsc_memh + 0x7000;
+ bus_space_subregion(sc->sc_bustag, hsc->hsc_memh, 0x2000, 0x2000,
+ &sc->sc_etx);
+ bus_space_subregion(sc->sc_bustag, hsc->hsc_memh, 0x4000, 0x2000,
+ &sc->sc_erx);
+ bus_space_subregion(sc->sc_bustag, hsc->hsc_memh, 0x6000, 0x1000,
+ &sc->sc_mac);
+ bus_space_subregion(sc->sc_bustag, hsc->hsc_memh, 0x7000, 0x1000,
+ &sc->sc_mif);
if (hme_pci_enaddr(sc, pa) == 0)
gotenaddr = 1;