diff options
author | peter <peter@FreeBSD.org> | 1999-04-16 21:22:55 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-04-16 21:22:55 +0000 |
commit | 087d4857e56f150a8f549600150404f273efb895 (patch) | |
tree | cf4e27432c59d956f4e5784207180115ee8fef9d /sys/dev/atkbdc | |
parent | c5fe612b8411a32a8e6e426fc1a70cba0cca3d31 (diff) | |
download | FreeBSD-src-087d4857e56f150a8f549600150404f273efb895.zip FreeBSD-src-087d4857e56f150a8f549600150404f273efb895.tar.gz |
Bring the 'new-bus' to the i386. This extensively changes the way the
i386 platform boots, it is no longer ISA-centric, and is fully dynamic.
Most old drivers compile and run without modification via 'compatability
shims' to enable a smoother transition. eisa, isapnp and pccard* are
not yet using the new resource manager. Once fully converted, all drivers
will be loadable, including PCI and ISA.
(Some other changes appear to have snuck in, including a port of Soren's
ATA driver to the Alpha. Soren, back this out if you need to.)
This is a checkpoint of work-in-progress, but is quite functional.
The bulk of the work was done over the last few years by Doug Rabson and
Garrett Wollman.
Approved by: core
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r-- | sys/dev/atkbdc/atkbd.c | 19 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbd_atkbdc.c | 15 | ||||
-rw-r--r-- | sys/dev/atkbdc/atkbd_isa.c | 15 | ||||
-rw-r--r-- | sys/dev/atkbdc/psm.c | 9 |
4 files changed, 30 insertions, 28 deletions
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c index f9e28fe..80c81a5 100644 --- a/sys/dev/atkbdc/atkbd.c +++ b/sys/dev/atkbdc/atkbd.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd.c,v 1.4 1999/01/28 10:55:55 yokota Exp $ + * $Id: atkbd.c,v 1.5 1999/03/10 10:36:52 yokota Exp $ */ #include "atkbd.h" @@ -46,7 +46,7 @@ #include <dev/kbd/atkbdreg.h> #include <dev/kbd/atkbdcreg.h> -#ifndef __i386__ +#if 1 #include <sys/bus.h> #include <isa/isareg.h> @@ -89,6 +89,7 @@ static struct cdevsw atkbd_cdevsw = { #endif /* KBD_INSTALL_CDEV */ +#if 0 #ifdef __i386__ atkbd_softc_t @@ -110,6 +111,7 @@ atkbd_softc_t } #endif /* __i386__ */ +#endif int atkbd_probe_unit(int unit, int port, int irq, int flags) @@ -376,16 +378,14 @@ atkbd_configure(int flags) { keyboard_t *kbd; int arg[2]; -#ifdef __i386__ - struct isa_device *dev; int i; /* XXX: a kludge to obtain the device configuration flags */ - dev = find_isadev(isa_devtab_tty, &atkbddriver, 0); - if (dev != NULL) { - flags |= dev->id_flags; + if (resource_int_value("atkbd", 0, "flags", &i) == 0) { + flags |= i; /* if the driver is disabled, unregister the keyboard if any */ - if (!dev->id_enabled) { + if (resource_int_value("atkbd", 0, "disabled", &i) == 0 + && i != 0) { i = kbd_find_keyboard(ATKBD_DRIVER_NAME, ATKBD_DEFAULT); if (i >= 0) { kbd = kbd_get_keyboard(i); @@ -395,8 +395,7 @@ atkbd_configure(int flags) } } } -#endif - + /* probe the keyboard controller */ atkbdc_configure(); diff --git a/sys/dev/atkbdc/atkbd_atkbdc.c b/sys/dev/atkbdc/atkbd_atkbdc.c index ade1ba0..1d7ee62 100644 --- a/sys/dev/atkbdc/atkbd_atkbdc.c +++ b/sys/dev/atkbdc/atkbd_atkbdc.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd_isa.c,v 1.1 1999/01/23 16:53:27 dfr Exp $ + * $Id: atkbd_isa.c,v 1.2 1999/03/10 10:36:49 yokota Exp $ */ #include "atkbd.h" @@ -37,6 +37,7 @@ #include <sys/conf.h> #include <sys/tty.h> #include <sys/bus.h> +#include <machine/bus.h> #include <sys/rman.h> #include <machine/resource.h> @@ -70,9 +71,9 @@ static driver_t atkbd_driver = { static int atkbdprobe(device_t dev) { - u_long port; - u_long irq; - u_long flags; + uintptr_t port; + uintptr_t irq; + uintptr_t flags; device_set_desc(dev, "AT Keyboard"); @@ -89,9 +90,9 @@ static int atkbdattach(device_t dev) { atkbd_softc_t *sc; - u_long port; - u_long irq; - u_long flags; + uintptr_t port; + uintptr_t irq; + uintptr_t flags; struct resource *res; void *ih; int zero = 0; diff --git a/sys/dev/atkbdc/atkbd_isa.c b/sys/dev/atkbdc/atkbd_isa.c index ade1ba0..1d7ee62 100644 --- a/sys/dev/atkbdc/atkbd_isa.c +++ b/sys/dev/atkbdc/atkbd_isa.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: atkbd_isa.c,v 1.1 1999/01/23 16:53:27 dfr Exp $ + * $Id: atkbd_isa.c,v 1.2 1999/03/10 10:36:49 yokota Exp $ */ #include "atkbd.h" @@ -37,6 +37,7 @@ #include <sys/conf.h> #include <sys/tty.h> #include <sys/bus.h> +#include <machine/bus.h> #include <sys/rman.h> #include <machine/resource.h> @@ -70,9 +71,9 @@ static driver_t atkbd_driver = { static int atkbdprobe(device_t dev) { - u_long port; - u_long irq; - u_long flags; + uintptr_t port; + uintptr_t irq; + uintptr_t flags; device_set_desc(dev, "AT Keyboard"); @@ -89,9 +90,9 @@ static int atkbdattach(device_t dev) { atkbd_softc_t *sc; - u_long port; - u_long irq; - u_long flags; + uintptr_t port; + uintptr_t irq; + uintptr_t flags; struct resource *res; void *ih; int zero = 0; diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index e7eb469..b3dc1d0 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/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.2 1998/11/15 18:25:17 dfr Exp $ + * $Id: psm.c,v 1.3 1999/01/23 16:53:28 dfr Exp $ */ /* @@ -76,6 +76,7 @@ #include <sys/poll.h> #include <sys/syslog.h> #include <sys/malloc.h> +#include <machine/bus.h> #include <sys/rman.h> #ifdef DEVFS #include <sys/devfsext.h> @@ -740,8 +741,8 @@ psmprobe(device_t dev) { int unit = device_get_unit(dev); struct psm_softc *sc = device_get_softc(dev); - u_long port; - u_long flags; + uintptr_t port; + uintptr_t flags; int stat[3]; int command_byte; int mask; @@ -991,7 +992,7 @@ psmattach(device_t dev) struct psm_softc *sc = device_get_softc(dev); void *ih; struct resource *res; - u_long irq; + uintptr_t irq; int zero = 0; if (sc == NULL) /* shouldn't happen */ |