aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/psm.c
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
committerDoug Rabson <dfr@FreeBSD.org>1998-11-15 18:25:17 +0000
commit08b6a4cbee427b68518039a35579f86d2e646bb9 (patch)
treefd54512c9c731113c4672699fae373a27076692f /sys/isa/psm.c
parent128d4f3960c20175f0c33050be82862db5378087 (diff)
downloadsrc-08b6a4cbee427b68518039a35579f86d2e646bb9.tar.gz
src-08b6a4cbee427b68518039a35579f86d2e646bb9.zip
* 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.
Notes
Notes: svn path=/head/; revision=41181
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 68eb46a69b30..5b999e1b36af 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);
}