1/*-
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 14 unchanged lines hidden (view full) ---
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * from: FreeBSD: src/sys/isa/atkbdc_isa.c,v 1.31 2005/05/29 04:42:28 nyan
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc_ebus.c 207354 2010-04-29 06:16:00Z sobomax $");
32
33#include "opt_kbd.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>
38#include <sys/module.h>
39#include <sys/bus.h>
--- 157 unchanged lines hidden (view full) ---
197 }
198
199 rid = 0;
200 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count) != 0) {
201 device_printf(dev,
202 "cannot determine command/data port resource\n");
203 return (ENXIO);
204 }
205 sc->retry = 5000;
206 sc->port0 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, start,
207 1, RF_ACTIVE);
208 if (sc->port0 == NULL) {
209 device_printf(dev,
210 "cannot allocate command/data port resource\n");
211 return (ENXIO);
212 }
213
--- 92 unchanged lines hidden ---
2 * Copyright (c) 1999 Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
3 * Copyright (c) 2005 Marius Strobl <marius@FreeBSD.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
--- 14 unchanged lines hidden (view full) ---
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * from: FreeBSD: src/sys/isa/atkbdc_isa.c,v 1.31 2005/05/29 04:42:28 nyan
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/atkbdc/atkbdc_ebus.c 207354 2010-04-29 06:16:00Z sobomax $");
32
33#include "opt_kbd.h"
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/kernel.h>
38#include <sys/module.h>
39#include <sys/bus.h>
--- 157 unchanged lines hidden (view full) ---
197 }
198
199 rid = 0;
200 if (bus_get_resource(dev, SYS_RES_MEMORY, rid, &start, &count) != 0) {
201 device_printf(dev,
202 "cannot determine command/data port resource\n");
203 return (ENXIO);
204 }
205 sc->retry = 5000;
206 sc->port0 = bus_alloc_resource(dev, SYS_RES_MEMORY, &rid, start, start,
207 1, RF_ACTIVE);
208 if (sc->port0 == NULL) {
209 device_printf(dev,
210 "cannot allocate command/data port resource\n");
211 return (ENXIO);
212 }
213
--- 92 unchanged lines hidden ---