1139749Simp/*-
274534Scokane * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org>
361931Scokane * All rights reserved.
461931Scokane *
561931Scokane * Redistribution and use in source and binary forms, with or without
661931Scokane * modification, are permitted provided that the following conditions
761931Scokane * are met:
861931Scokane * 1. Redistributions of source code must retain the above copyright
961931Scokane *    notice, this list of conditions and the following disclaimer.
1061931Scokane * 2. Redistributions in binary form must reproduce the above copyright
1161931Scokane *    notice, this list of conditions and the following disclaimer in the
1261931Scokane *    documentation and/or other materials provided with the distribution.
1361931Scokane * 3. All advertising materials mentioning features or use of this software
1461931Scokane *    must display the following acknowledgement:
1561931Scokane *      This product includes software developed by Gardner Buchanan.
1661931Scokane * 4. The name of Gardner Buchanan may not be used to endorse or promote
1761931Scokane *    products derived from this software without specific prior written
1861931Scokane *    permission.
1961931Scokane *
2061931Scokane * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2161931Scokane * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2261931Scokane * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2361931Scokane * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2461931Scokane * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
2561931Scokane * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2661931Scokane * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2761931Scokane * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2861931Scokane * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2961931Scokane * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3061931Scokane *
3161931Scokane *   $FreeBSD$
3261931Scokane */
3361931Scokane
3461911Scokane/* tdfx_pci.h -- Prototypes for tdfx device methods */
3574534Scokane/* Copyright (C) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> */
3661911Scokane#include <sys/proc.h>
3761911Scokane#include <sys/conf.h>
3861911Scokane
3961911Scokane/* Driver functions */
4061911Scokanestatic int tdfx_probe(device_t dev);
4161911Scokanestatic int tdfx_attach(device_t dev);
4261911Scokanestatic int tdfx_setmtrr(device_t dev);
4361911Scokanestatic int tdfx_clrmtrr(device_t dev);
4461911Scokanestatic int tdfx_detach(device_t dev);
4561911Scokanestatic int tdfx_shutdown(device_t dev);
4661911Scokane
4761911Scokane/* CDEV file ops */
4861911Scokanestatic d_open_t tdfx_open;
4961911Scokanestatic d_close_t tdfx_close;
5061911Scokanestatic d_mmap_t tdfx_mmap;
5161911Scokanestatic d_ioctl_t tdfx_ioctl;
5261911Scokane
5361911Scokane/* Card Queries */
5461911Scokanestatic int tdfx_do_query(u_int cmd, struct tdfx_pio_data *piod);
5561911Scokanestatic int tdfx_query_boards(void);
5661911Scokanestatic int tdfx_query_fetch(u_int cmd, struct tdfx_pio_data *piod);
5761911Scokanestatic int tdfx_query_update(u_int cmd, struct tdfx_pio_data *piod);
5861911Scokane
5961911Scokane/* Card PIO funcs */
6061911Scokanestatic int tdfx_do_pio(u_int cmd, struct tdfx_pio_data *piod);
6161911Scokanestatic int tdfx_do_pio_wt(struct tdfx_pio_data *piod);
6261911Scokanestatic int tdfx_do_pio_rd(struct tdfx_pio_data *piod);
63