Deleted Added
full compact
pcii.c (202898) pcii.c (203360)
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp <phk@FreeBSD.org>
3 * Copyright (c) 2010 Joerg Wunsch <joerg@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:

--- 26 unchanged lines hidden (view full) ---

35 * Tested and known working:
36 * "B&C Microsystems PC488A-0"
37 * "National Instruments GPIB-PCII/PCIIA" (in PCIIa mode)
38 * "Axiom AX5488"
39 *
40 */
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Poul-Henning Kamp <phk@FreeBSD.org>
3 * Copyright (c) 2010 Joerg Wunsch <joerg@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:

--- 26 unchanged lines hidden (view full) ---

35 * Tested and known working:
36 * "B&C Microsystems PC488A-0"
37 * "National Instruments GPIB-PCII/PCIIA" (in PCIIa mode)
38 * "Axiom AX5488"
39 *
40 */
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/sys/dev/ieee488/pcii.c 202898 2010-01-23 21:33:33Z joerg $");
43__FBSDID("$FreeBSD: head/sys/dev/ieee488/pcii.c 203360 2010-02-01 21:21:10Z joerg $");
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/kernel.h>
50#include <sys/module.h>
51#include <sys/bus.h>

--- 181 unchanged lines hidden (view full) ---

233 return (error);
234 }
235
236 for (rid = 0; rid < 8; rid++) {
237 sc->upd7210.reg_res[rid] = sc->res[2 + rid];
238 sc->upd7210.reg_offset[rid] = 0;
239 }
240 sc->upd7210.irq_clear_res = sc->res[10];
44
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/lock.h>
48#include <sys/mutex.h>
49#include <sys/kernel.h>
50#include <sys/module.h>
51#include <sys/bus.h>

--- 181 unchanged lines hidden (view full) ---

233 return (error);
234 }
235
236 for (rid = 0; rid < 8; rid++) {
237 sc->upd7210.reg_res[rid] = sc->res[2 + rid];
238 sc->upd7210.reg_offset[rid] = 0;
239 }
240 sc->upd7210.irq_clear_res = sc->res[10];
241 sc->upd7210.use_fifo = 0;
241
242 if (sc->res[1] == NULL)
243 sc->upd7210.dmachan = -1;
244 else
245 sc->upd7210.dmachan = rman_get_start(sc->res[1]);
246
247 upd7210attach(&sc->upd7210);
242
243 if (sc->res[1] == NULL)
244 sc->upd7210.dmachan = -1;
245 else
246 sc->upd7210.dmachan = rman_get_start(sc->res[1]);
247
248 upd7210attach(&sc->upd7210);
248 return (error);
249 device_printf(dev, "attached gpib%d\n", sc->upd7210.unit);
250
251 return (0);
249}
250
251DRIVER_MODULE(pcii, isa, pcii_driver, pcii_devclass, 0, 0);
252DRIVER_MODULE(pcii, acpi, pcii_driver, pcii_devclass, 0, 0);
252}
253
254DRIVER_MODULE(pcii, isa, pcii_driver, pcii_devclass, 0, 0);
255DRIVER_MODULE(pcii, acpi, pcii_driver, pcii_devclass, 0, 0);