diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-17 22:01:57 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2014-03-17 22:01:57 +0000 |
commit | f4dc22e0b89e7be895718e088fe9bacec26a3139 (patch) | |
tree | c9de07c8cd9f5fe668c86006e32f248a3e7fdc79 | |
parent | 6b20b663a5273ef75464feeb63b31e077da2b697 (diff) |
The AGP ioctl interface is gone; remove the header file as well.
ok matthieu@
-rw-r--r-- | sys/dev/pci/agp.c | 5 | ||||
-rw-r--r-- | sys/dev/pci/agp_ali.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agp_amd.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agp_apple.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agp_i810.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agp_sis.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agp_via.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/agpreg.h | 27 | ||||
-rw-r--r-- | sys/dev/pci/drm/drmP.h | 3 | ||||
-rw-r--r-- | sys/dev/pci/vga_pci.c | 3 | ||||
-rw-r--r-- | sys/sys/agpio.h | 132 |
11 files changed, 35 insertions, 153 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c index 8f079e27ab2..517e4b3b7ef 100644 --- a/sys/dev/pci/agp.c +++ b/sys/dev/pci/agp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp.c,v 1.41 2014/03/17 04:10:59 jsg Exp $ */ +/* $OpenBSD: agp.c,v 1.42 2014/03/17 22:01:56 kettenis Exp $ */ /*- * Copyright (c) 2000 Doug Rabson * All rights reserved. @@ -29,9 +29,6 @@ #include <sys/param.h> #include <sys/malloc.h> -#include <sys/agpio.h> -#include <sys/fcntl.h> -#include <sys/ioctl.h> #include <uvm/uvm.h> diff --git a/sys/dev/pci/agp_ali.c b/sys/dev/pci/agp_ali.c index e41091d7d02..21b0a64ae60 100644 --- a/sys/dev/pci/agp_ali.c +++ b/sys/dev/pci/agp_ali.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_ali.c,v 1.12 2010/08/07 18:15:38 oga Exp $ */ +/* $OpenBSD: agp_ali.c,v 1.13 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: agp_ali.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ @@ -37,7 +37,6 @@ #include <sys/conf.h> #include <sys/device.h> #include <sys/lock.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agp_amd.c b/sys/dev/pci/agp_amd.c index 2256fd2798e..1be5cff0bbc 100644 --- a/sys/dev/pci/agp_amd.c +++ b/sys/dev/pci/agp_amd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_amd.c,v 1.16 2010/08/07 19:32:44 oga Exp $ */ +/* $OpenBSD: agp_amd.c,v 1.17 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: agp_amd.c,v 1.6 2001/10/06 02:48:50 thorpej Exp $ */ /*- @@ -36,7 +36,6 @@ #include <sys/lock.h> #include <sys/conf.h> #include <sys/device.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agp_apple.c b/sys/dev/pci/agp_apple.c index 07662c72c86..ffb5db02336 100644 --- a/sys/dev/pci/agp_apple.c +++ b/sys/dev/pci/agp_apple.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_apple.c,v 1.2 2012/12/22 19:17:36 mpi Exp $ */ +/* $OpenBSD: agp_apple.c,v 1.3 2014/03/17 22:01:56 kettenis Exp $ */ /* * Copyright (c) 2012 Martin Pieuchot <mpi@openbsd.org> @@ -22,7 +22,6 @@ #include <sys/systm.h> #include <sys/conf.h> #include <sys/device.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c index 80a14c8cfac..fb7339a660a 100644 --- a/sys/dev/pci/agp_i810.c +++ b/sys/dev/pci/agp_i810.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_i810.c,v 1.83 2014/03/11 14:29:07 kettenis Exp $ */ +/* $OpenBSD: agp_i810.c,v 1.84 2014/03/17 22:01:56 kettenis Exp $ */ /*- * Copyright (c) 2000 Doug Rabson @@ -35,7 +35,6 @@ #include <sys/lock.h> #include <sys/device.h> #include <sys/conf.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agp_sis.c b/sys/dev/pci/agp_sis.c index 9cda91e0a14..5d6905ab898 100644 --- a/sys/dev/pci/agp_sis.c +++ b/sys/dev/pci/agp_sis.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_sis.c,v 1.15 2010/08/07 18:09:09 oga Exp $ */ +/* $OpenBSD: agp_sis.c,v 1.16 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: agp_sis.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -36,7 +36,6 @@ #include <sys/lock.h> #include <sys/conf.h> #include <sys/device.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agp_via.c b/sys/dev/pci/agp_via.c index 33fab817af4..eb60a6a0d44 100644 --- a/sys/dev/pci/agp_via.c +++ b/sys/dev/pci/agp_via.c @@ -1,4 +1,4 @@ -/* $OpenBSD: agp_via.c,v 1.17 2011/10/16 01:11:31 dhill Exp $ */ +/* $OpenBSD: agp_via.c,v 1.18 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: agp_via.c,v 1.2 2001/09/15 00:25:00 thorpej Exp $ */ /*- @@ -36,7 +36,6 @@ #include <sys/lock.h> #include <sys/conf.h> #include <sys/device.h> -#include <sys/agpio.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> diff --git a/sys/dev/pci/agpreg.h b/sys/dev/pci/agpreg.h index f8269c9292a..1d8924d58de 100644 --- a/sys/dev/pci/agpreg.h +++ b/sys/dev/pci/agpreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: agpreg.h,v 1.17 2012/12/22 19:17:36 mpi Exp $ */ +/* $OpenBSD: agpreg.h,v 1.18 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: agpreg.h,v 1.1 2001/09/10 10:01:02 fvdl Exp $ */ /*- @@ -33,6 +33,12 @@ #define _PCI_AGPREG_H_ /* + * The AGP gatt uses 4k pages irrespective of the host page size. + */ +#define AGP_PAGE_SIZE 4096 +#define AGP_PAGE_SHIFT 12 + +/* * Offsets for various AGP configuration registers. */ #define AGP_APBASE 0x10 @@ -50,6 +56,25 @@ #define AGP_COMMAND 0x8 /* + * Macros to manipulate AGP mode words. + */ +#define AGP_MODE_GET_RQ(x) (((x) & 0xff000000U) >> 24) +#define AGP_MODE_GET_SBA(x) (((x) & 0x00000200U) >> 9) +#define AGP_MODE_GET_AGP(x) (((x) & 0x00000100U) >> 8) +#define AGP_MODE_GET_4G(x) (((x) & 0x00000020U) >> 5) +#define AGP_MODE_GET_FW(x) (((x) & 0x00000010U) >> 4) +#define AGP_MODE_GET_RATE(x) ((x) & 0x00000007U) +#define AGP_MODE_SET_RQ(x,v) (((x) & ~0xff000000U) | ((v) << 24)) +#define AGP_MODE_SET_SBA(x,v) (((x) & ~0x00000200U) | ((v) << 9)) +#define AGP_MODE_SET_AGP(x,v) (((x) & ~0x00000100U) | ((v) << 8)) +#define AGP_MODE_SET_4G(x,v) (((x) & ~0x00000020U) | ((v) << 5)) +#define AGP_MODE_SET_FW(x,v) (((x) & ~0x00000010U) | ((v) << 4)) +#define AGP_MODE_SET_RATE(x,v) (((x) & ~0x00000007U) | (v)) +#define AGP_MODE_RATE_1x 0x00000001 +#define AGP_MODE_RATE_2x 0x00000002 +#define AGP_MODE_RATE_4x 0x00000004 + +/* * Config offsets for Intel AGP chipsets. */ /* i840/850/850E */ diff --git a/sys/dev/pci/drm/drmP.h b/sys/dev/pci/drm/drmP.h index 2de65ae06e6..fe97d0a8d87 100644 --- a/sys/dev/pci/drm/drmP.h +++ b/sys/dev/pci/drm/drmP.h @@ -1,4 +1,4 @@ -/* $OpenBSD: drmP.h,v 1.170 2014/03/13 12:45:04 kettenis Exp $ */ +/* $OpenBSD: drmP.h,v 1.171 2014/03/17 22:01:56 kettenis Exp $ */ /* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*- * Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com */ @@ -58,7 +58,6 @@ #include <sys/endian.h> #include <sys/mman.h> #include <sys/stdint.h> -#include <sys/agpio.h> #include <sys/memrange.h> #include <sys/extent.h> #include <sys/vnode.h> diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index cedad32b2df..e8ae8f734c1 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.74 2013/12/06 21:03:04 deraadt Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.75 2014/03/17 22:01:56 kettenis Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -73,7 +73,6 @@ #include <sys/kernel.h> #include <sys/device.h> #include <sys/malloc.h> -#include <sys/agpio.h> #include <uvm/uvm.h> diff --git a/sys/sys/agpio.h b/sys/sys/agpio.h deleted file mode 100644 index 350a68ca6d6..00000000000 --- a/sys/sys/agpio.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $OpenBSD: agpio.h,v 1.3 2008/07/09 23:33:07 oga Exp $ */ - -/*- - * Copyright (c) 2000 Doug Rabson - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/sys/agpio.h,v 1.1 2000/06/09 16:04:30 dfr Exp $ - */ - -#ifndef _SYS_AGPIO_H_ -#define _SYS_AGPIO_H_ - -#define AGP_DEVICE "/dev/agp0" - -/* - * The AGP gatt uses 4k pages irrespective of the host page size. - */ -#define AGP_PAGE_SIZE 4096 -#define AGP_PAGE_SHIFT 12 - -/* - * Macros to manipulate AGP mode words. - */ -#define AGP_MODE_GET_RQ(x) (((x) & 0xff000000U) >> 24) -#define AGP_MODE_GET_SBA(x) (((x) & 0x00000200U) >> 9) -#define AGP_MODE_GET_AGP(x) (((x) & 0x00000100U) >> 8) -#define AGP_MODE_GET_4G(x) (((x) & 0x00000020U) >> 5) -#define AGP_MODE_GET_FW(x) (((x) & 0x00000010U) >> 4) -#define AGP_MODE_GET_RATE(x) ((x) & 0x00000007U) -#define AGP_MODE_SET_RQ(x,v) (((x) & ~0xff000000U) | ((v) << 24)) -#define AGP_MODE_SET_SBA(x,v) (((x) & ~0x00000200U) | ((v) << 9)) -#define AGP_MODE_SET_AGP(x,v) (((x) & ~0x00000100U) | ((v) << 8)) -#define AGP_MODE_SET_4G(x,v) (((x) & ~0x00000020U) | ((v) << 5)) -#define AGP_MODE_SET_FW(x,v) (((x) & ~0x00000010U) | ((v) << 4)) -#define AGP_MODE_SET_RATE(x,v) (((x) & ~0x00000007U) | (v)) -#define AGP_MODE_RATE_1x 0x00000001 -#define AGP_MODE_RATE_2x 0x00000002 -#define AGP_MODE_RATE_4x 0x00000004 - -#define AGPIOC_BASE 'A' -#define AGPIOC_INFO _IOR (AGPIOC_BASE, 0, agp_info) -#define AGPIOC_ACQUIRE _IO (AGPIOC_BASE, 1) -#define AGPIOC_RELEASE _IO (AGPIOC_BASE, 2) -#define AGPIOC_SETUP _IOW (AGPIOC_BASE, 3, agp_setup) -#if 0 -#define AGPIOC_RESERVE _IOW (AGPIOC_BASE, 4, agp_region) -#define AGPIOC_PROTECT _IOW (AGPIOC_BASE, 5, agp_region) -#endif -#define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, agp_allocate) -#define AGPIOC_DEALLOCATE _IOW (AGPIOC_BASE, 7, int) -#define AGPIOC_BIND _IOW (AGPIOC_BASE, 8, agp_bind) -#define AGPIOC_UNBIND _IOW (AGPIOC_BASE, 9, agp_unbind) - -typedef struct _agp_version { - u_int16_t major; - u_int16_t minor; -} agp_version; - -typedef struct _agp_info { - agp_version version; /* version of the driver */ - u_int32_t bridge_id; /* bridge vendor/device */ - u_int32_t agp_mode; /* mode info of bridge */ - off_t aper_base; /* base of aperture */ - size_t aper_size; /* size of aperture */ - size_t pg_total; /* max pages (swap + system) */ - size_t pg_system; /* max pages (system) */ - size_t pg_used; /* current pages used */ -} agp_info; - -typedef struct _agp_setup { - u_int32_t agp_mode; /* mode info of bridge */ -} agp_setup; - -#if 0 -/* - * The "prot" down below needs still a "sleep" flag somehow ... - */ -typedef struct _agp_segment { - off_t pg_start; /* starting page to populate */ - size_t pg_count; /* number of pages */ - int prot; /* prot flags for mmap */ -} agp_segment; - -typedef struct _agp_region { - pid_t pid; /* pid of process */ - size_t seg_count; /* number of segments */ - struct _agp_segment *seg_list; -} agp_region; -#endif - -typedef struct _agp_allocate { - int key; /* tag of allocation */ - size_t pg_count; /* number of pages */ - u_int32_t type; /* 0 == normal, other devspec */ - u_int32_t physical; /* device specific (some devices - * need a phys address of the - * actual page behind the gatt - * table) */ -} agp_allocate; - -typedef struct _agp_bind { - int key; /* tag of allocation */ - off_t pg_start; /* starting page to populate */ -} agp_bind; - -typedef struct _agp_unbind { - int key; /* tag of allocation */ - u_int32_t priority; /* priority for paging out */ -} agp_unbind; - -#endif /* !_SYS_AGPIO_H_ */ |