summaryrefslogtreecommitdiffstats
path: root/sys/dev/atkbdc/atkbd.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1999-04-16 21:22:55 +0000
committerpeter <peter@FreeBSD.org>1999-04-16 21:22:55 +0000
commit087d4857e56f150a8f549600150404f273efb895 (patch)
treecf4e27432c59d956f4e5784207180115ee8fef9d /sys/dev/atkbdc/atkbd.c
parentc5fe612b8411a32a8e6e426fc1a70cba0cca3d31 (diff)
downloadFreeBSD-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/atkbd.c')
-rw-r--r--sys/dev/atkbdc/atkbd.c19
1 files changed, 9 insertions, 10 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();
OpenPOWER on IntegriCloud