summaryrefslogtreecommitdiffstats
path: root/sys/isa/psm.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
committerdfr <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
commit3331f029dcf961b9a0c91921698fab3803776e51 (patch)
tree8e5245e8023a95c64c3eaa73287b1b208e40849a /sys/isa/psm.c
parent3c5010b4ae34919c54feb47ed85143578ae236cb (diff)
downloadFreeBSD-src-3331f029dcf961b9a0c91921698fab3803776e51.zip
FreeBSD-src-3331f029dcf961b9a0c91921698fab3803776e51.tar.gz
* Add hooks to allow the X server to access I/O ports and memory.
* Update drivers to the latest version of the bus interface. The ISA drivers' use of the new resource api is minimal. Garrett has some much cleaner drivers which should be more easily shared between i386 and alpha. This has only been tested on cia based machines. It should work on lca and apecs but I might have broken something.
Diffstat (limited to 'sys/isa/psm.c')
-rw-r--r--sys/isa/psm.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/isa/psm.c b/sys/isa/psm.c
index 68eb46a..5b999e1 100644
--- a/sys/isa/psm.c
+++ b/sys/isa/psm.c
@@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: psm.c,v 1.56 1998/10/22 05:58:40 bde Exp $
+ * $Id: psm.c,v 1.1 1998/11/08 18:43:03 dfr Exp $
*/
/*
@@ -76,6 +76,7 @@
#include <sys/poll.h>
#include <sys/syslog.h>
#include <sys/malloc.h>
+#include <sys/rman.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif
@@ -85,6 +86,7 @@
#include <machine/clock.h>
#include <machine/limits.h>
#include <machine/mouse.h>
+#include <machine/resource.h>
#include <isa/isareg.h>
#include <isa/isavar.h>
@@ -981,6 +983,8 @@ psmattach(device_t dev)
int unit = device_get_unit(dev);
struct psm_softc *sc = device_get_softc(dev);
void *ih;
+ struct resource *res;
+ int zero = 0;
if (sc == NULL) /* shouldn't happen */
return (ENXIO);
@@ -1023,14 +1027,11 @@ psmattach(device_t dev)
if (bootverbose)
--verbose;
- ih = BUS_CREATE_INTR(device_get_parent(dev), dev,
- isa_get_irq(dev),
- psmintr, sc);
- if (!ih)
- return ENXIO;
+ res = bus_alloc_resource(dev, SYS_RES_IRQ, &zero, 0ul, ~0ul, 1,
+ RF_SHAREABLE | RF_ACTIVE);
+ BUS_SETUP_INTR(device_get_parent(dev), dev, res, psmintr, sc,
+ &ih);
- BUS_CONNECT_INTR(device_get_parent(dev), ih);
-
return (0);
}
OpenPOWER on IntegriCloud