card_if.m revision 59427
10SN/A# 20SN/A# Copyright (c) 1999 M. Warner Losh. 30SN/A# All rights reserved. 40SN/A# 50SN/A# Redistribution and use in source and binary forms, with or without 62362SN/A# modification, are permitted provided that the following conditions 70SN/A# are met: 82362SN/A# 1. Redistributions of source code must retain the above copyright 90SN/A# notice, this list of conditions and the following disclaimer. 100SN/A# 2. Redistributions in binary form must reproduce the above copyright 110SN/A# notice, this list of conditions and the following disclaimer in the 120SN/A# documentation and/or other materials provided with the distribution. 130SN/A# 140SN/A# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 150SN/A# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 160SN/A# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 170SN/A# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 180SN/A# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 190SN/A# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 202362SN/A# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 212362SN/A# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 222362SN/A# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 230SN/A# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 240SN/A# SUCH DAMAGE. 250SN/A# 260SN/A# $FreeBSD: head/sys/dev/pccard/card_if.m 59427 2000-04-20 07:54:59Z imp $ 270SN/A# 280SN/A 290SN/A#include <sys/bus.h> 300SN/A 310SN/AINTERFACE card; 320SN/A 330SN/A# 340SN/A# Companion interface for pccard. We need to set attributes for memory 350SN/A# and i/o port mappings (as well as other types of attributes) that have 360SN/A# a well defined meaning inside the pccard/cardbus system. The bus 370SN/A# methods are inadequate for this because this must be done at the time the 381693SN/A# resources are set for the device, which predates their activation. Also, 391693SN/A# the driver activating the resources doesn't necessarily know or need to know 406936SN/A# these attributes. 410SN/A# 426936SN/AMETHOD int set_res_flags { 430SN/A device_t dev; 446936SN/A device_t child; 4513529Saivanov int restype; 466936SN/A int rid; 476936SN/A u_long value; 486936SN/A}; 496936SN/A 500SN/AMETHOD int get_res_flags { 510SN/A device_t dev; 526936SN/A device_t child; 530SN/A int restype; 546936SN/A int rid; 550SN/A u_long *value; 566936SN/A}; 5713529Saivanov 586936SN/AMETHOD int set_memory_offset { 596936SN/A device_t dev; 606936SN/A device_t child; 616936SN/A int rid; 620SN/A u_int32_t offset; 630SN/A} 646936SN/A 650SN/AMETHOD int attach_card { 666936SN/A device_t dev; 670SN/A} 686936SN/A 696936SN/AMETHOD int detach_card { 709124SN/A device_t dev; 710SN/A int flags; 721693SN/A} 731693SN/A 74METHOD int get_type { 75 device_t dev; 76 int *type; 77} 78