Deleted Added
full compact
adlink.c (171717) adlink.c (201223)
1/*-
2 * Copyright (c) 2003-2004 Poul-Henning Kamp
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

38 * Tested with 10MHz external clock, divisor of 2 (ie: 5MHz sampling),
39 * One channel active (ie: 2 bytes per sample = 10MB/sec) on a 660MHz
40 * Celeron PC.
41 *
42 */
43
44#ifdef _KERNEL
45#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2003-2004 Poul-Henning Kamp
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

38 * Tested with 10MHz external clock, divisor of 2 (ie: 5MHz sampling),
39 * One channel active (ie: 2 bytes per sample = 10MB/sec) on a 660MHz
40 * Celeron PC.
41 *
42 */
43
44#ifdef _KERNEL
45#include <sys/cdefs.h>
46__FBSDID("$FreeBSD: head/sys/dev/adlink/adlink.c 171717 2007-08-04 17:43:11Z kib $");
46__FBSDID("$FreeBSD: head/sys/dev/adlink/adlink.c 201223 2009-12-29 21:51:28Z rnoland $");
47
48#include <sys/param.h>
49#include <sys/systm.h>
50#include <sys/malloc.h>
51#include <sys/kernel.h>
52#include <sys/module.h>
53#include <sys/kthread.h>
54#include <sys/conf.h>

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

156 *(pg->sample) = 0;
157 bus_write_4(sc->res[0], 0x24, pg->phys);
158 bus_write_4(sc->res[0], 0x28, sc->p0->chunksize);
159 wakeup(sc);
160 return (FILTER_HANDLED);
161}
162
163static int
47
48#include <sys/param.h>
49#include <sys/systm.h>
50#include <sys/malloc.h>
51#include <sys/kernel.h>
52#include <sys/module.h>
53#include <sys/kthread.h>
54#include <sys/conf.h>

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

156 *(pg->sample) = 0;
157 bus_write_4(sc->res[0], 0x24, pg->phys);
158 bus_write_4(sc->res[0], 0x28, sc->p0->chunksize);
159 wakeup(sc);
160 return (FILTER_HANDLED);
161}
162
163static int
164adlink_mmap(struct cdev *dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
164adlink_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr,
165 int nprot, vm_memattr_t *memattr)
165{
166 struct softc *sc;
167 vm_offset_t o;
168 int i;
169 struct pgstat *pg;
170
171 sc = dev->si_drv1;
172 if (nprot != VM_PROT_READ)

--- 250 unchanged lines hidden ---
166{
167 struct softc *sc;
168 vm_offset_t o;
169 int i;
170 struct pgstat *pg;
171
172 sc = dev->si_drv1;
173 if (nprot != VM_PROT_READ)

--- 250 unchanged lines hidden ---