Return to mpu_isapnp.c CVS log | Up to [local] / sys / dev / isa |
File: [local] / sys / dev / isa / mpu_isapnp.c (download)
Revision 1.1.1.1 (vendor branch), Tue Mar 4 16:11:24 2008 UTC (16 years, 2 months ago) by nbrk
Import of OpenBSD 4.2 release kernel tree with initial code to support Jornada 720/728, StrongARM 1110-based handheld PC. At this point kernel roots on NFS and boots into vfs_mountroot() and traps. What is supported: - glass console, Jornada framebuffer (jfb) works in 16bpp direct color mode (needs some palette tweaks for non black/white/blue colors, i think) - saic, SA11x0 interrupt controller (needs cleanup) - sacom, SA11x0 UART (supported only as boot console for now) - SA11x0 GPIO controller fully supported (but can't handle multiple interrupt handlers on one gpio pin) - sassp, SSP port on SA11x0 that attaches spibus - Jornada microcontroller (jmcu) to control kbd, battery, etc throught the SPI bus (wskbd attaches on jmcu, but not tested) - tod functions seem work - initial code for SA-1111 (chip companion) : this is TODO Next important steps, i think: - gpio and intc on sa1111 - pcmcia support for sa11x0 (and sa1111 help logic) - REAL root on nfs when we have PCMCIA support (we may use any of supported pccard NICs) - root on wd0! (using already supported PCMCIA-ATA) |
/* $OpenBSD: mpu_isapnp.c,v 1.6 2002/11/28 23:24:53 mickey Exp $ */ #include "midi.h" #include <sys/param.h> #include <sys/systm.h> #include <sys/errno.h> #include <sys/ioctl.h> #include <sys/syslog.h> #include <sys/device.h> #include <sys/proc.h> #include <machine/bus.h> #include <sys/audioio.h> #include <dev/audio_if.h> #include <dev/midi_if.h> #include <dev/mulaw.h> #include <dev/isa/isavar.h> #include <dev/isa/isadmavar.h> #include <dev/ic/mpuvar.h> int mpu_isapnp_match(struct device *, void *, void *); void mpu_isapnp_attach(struct device *, struct device *, void *); struct mpu_isapnp_softc { struct device sc_dev; void *sc_ih; struct mpu_softc sc_mpu; }; struct cfattach mpu_isapnp_ca = { sizeof(struct mpu_isapnp_softc), mpu_isapnp_match, mpu_isapnp_attach }; int mpu_isapnp_match(parent, match, aux) struct device *parent; void *match, *aux; { struct isa_attach_args *ipa = aux; if (ipa->ipa_nirq != 1) return 0; return 1; } void mpu_isapnp_attach(parent, self, aux) struct device *parent, *self; void *aux; { struct mpu_isapnp_softc *sc = (struct mpu_isapnp_softc *)self; struct isa_attach_args *ipa = aux; printf("\n"); sc->sc_mpu.iot = ipa->ia_iot; sc->sc_mpu.ioh = ipa->ipa_io[0].h; sc->sc_ih = isa_intr_establish(ipa->ia_ic, ipa->ipa_irq[0].num, ipa->ipa_irq[0].type, IPL_AUDIO, mpu_intr, &sc->sc_mpu, sc->sc_dev.dv_xname); if (!mpu_find(&sc->sc_mpu)) { printf("%s: find failed\n", sc->sc_dev.dv_xname); return; } printf("%s: %s %s\n", sc->sc_dev.dv_xname, ipa->ipa_devident, ipa->ipa_devclass); midi_attach_mi(&mpu_midi_hw_if, &sc->sc_mpu, &sc->sc_dev); }