diff --git a/sys/dev/pcf/envctrl.c b/sys/dev/pcf/envctrl.c index 7b5f0649a6d8..25a163c77902 100644 --- a/sys/dev/pcf/envctrl.c +++ b/sys/dev/pcf/envctrl.c @@ -110,7 +110,7 @@ envctrl_attach(device_t dev) bzero(sc, sizeof(struct pcf_softc)); /* IO port is mandatory */ - sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid_ioport, RF_ACTIVE); if (sc->res_ioport == 0) { device_printf(dev, "cannot reserve I/O port range\n"); @@ -157,9 +157,9 @@ envctrl_attach(device_t dev) sc->res_irq); } if (sc->res_ioport != 0) { - bus_deactivate_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_deactivate_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); - bus_release_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); } return (rv); @@ -186,8 +186,8 @@ envctrl_detach(device_t dev) bus_release_resource(dev, SYS_RES_IRQ, sc->rid_irq, sc->res_irq); } - bus_deactivate_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, sc->res_ioport); - bus_release_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, sc->res_ioport); + bus_deactivate_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); return (0); } diff --git a/sys/dev/pcf/pcf_ebus.c b/sys/dev/pcf/pcf_ebus.c index b23c8dd5b5b8..3ea2051b9ff5 100644 --- a/sys/dev/pcf/pcf_ebus.c +++ b/sys/dev/pcf/pcf_ebus.c @@ -151,7 +151,7 @@ pcf_ebus_attach(device_t dev) } /* IO port is mandatory */ - sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + sc->res_ioport = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->rid_ioport, RF_ACTIVE); if (sc->res_ioport == 0) { device_printf(dev, "cannot reserve I/O port range\n"); @@ -218,9 +218,9 @@ pcf_ebus_attach(device_t dev) sc->res_irq); } if (sc->res_ioport != 0) { - bus_deactivate_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_deactivate_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); - bus_release_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); } return (rv); @@ -249,9 +249,9 @@ pcf_ebus_detach(device_t dev) sc->res_irq); } - bus_deactivate_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_deactivate_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); - bus_release_resource(dev, SYS_RES_IOPORT, sc->rid_ioport, + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid_ioport, sc->res_ioport); return (0); diff --git a/sys/dev/puc/puc_ebus.c b/sys/dev/puc/puc_ebus.c index 12ac8766c8b8..1e6696ce0da9 100644 --- a/sys/dev/puc/puc_ebus.c +++ b/sys/dev/puc/puc_ebus.c @@ -71,7 +71,7 @@ puc_ebus_attach(device_t dev) dd.ports[i].bar = 0; dd.ports[i].offset = 0x40 * i; dd.ports[i].serialfreq = 0; - dd.ports[i].flags = 0; + dd.ports[i].flags = PUC_FLAGS_MEMORY; } return (puc_attach(dev, &dd)); } diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c index 230fde55bcf5..a41d3282f9a4 100644 --- a/sys/dev/sab/sab.c +++ b/sys/dev/sab/sab.c @@ -247,7 +247,7 @@ sab_probe(device_t dev) if (strcmp(name, "se") != 0 && strcmp(name, "serial") != 0) return (ENXIO); rid = 0; - res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, + res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); if (res == NULL) return (ENXIO); @@ -268,7 +268,7 @@ sab_probe(device_t dev) device_set_desc(dev, "Siemens SAB 82532 ???"); break; } - bus_release_resource(dev, SYS_RES_IOPORT, rid, res); + bus_release_resource(dev, SYS_RES_MEMORY, rid, res); return (0); } @@ -287,7 +287,7 @@ sab_attach(device_t dev) irqrid = 0; irqres = NULL; sc = device_get_softc(dev); - iores = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &iorid, + iores = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &iorid, RF_ACTIVE); if (iores == NULL) goto error; @@ -350,7 +350,7 @@ sab_detach(device_t dev) sc = device_get_softc(dev); bus_generic_detach(dev); if (sc->sc_iores != NULL) - bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_iorid, + bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_iorid, sc->sc_iores); return (0); }