Home | History | Annotate | Line # | Download | only in cardbus
cardbusvar.h revision 1.28
      1  1.28  drochner /*	$NetBSD: cardbusvar.h,v 1.28 2004/08/23 17:52:45 drochner Exp $	*/
      2   1.1      haya 
      3   1.1      haya /*
      4  1.14      haya  * Copyright (c) 1998, 1999 and 2000
      5   1.1      haya  *       HAYAKAWA Koichi.  All rights reserved.
      6   1.1      haya  *
      7   1.1      haya  * Redistribution and use in source and binary forms, with or without
      8   1.1      haya  * modification, are permitted provided that the following conditions
      9   1.1      haya  * are met:
     10   1.1      haya  * 1. Redistributions of source code must retain the above copyright
     11   1.1      haya  *    notice, this list of conditions and the following disclaimer.
     12   1.1      haya  * 2. Redistributions in binary form must reproduce the above copyright
     13   1.1      haya  *    notice, this list of conditions and the following disclaimer in the
     14   1.1      haya  *    documentation and/or other materials provided with the distribution.
     15   1.1      haya  * 3. All advertising materials mentioning features or use of this software
     16   1.1      haya  *    must display the following acknowledgement:
     17   1.1      haya  *	This product includes software developed by the author.
     18   1.1      haya  * 4. The name of the author may not be used to endorse or promote products
     19   1.1      haya  *    derived from this software without specific prior written permission.
     20   1.1      haya  *
     21   1.1      haya  *
     22   1.1      haya  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23   1.1      haya  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     24   1.1      haya  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     25   1.1      haya  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     26   1.1      haya  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     27   1.1      haya  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     28   1.1      haya  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     29   1.1      haya  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     30   1.1      haya  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     31   1.1      haya  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     32   1.1      haya  * POSSIBILITY OF SUCH DAMAGE.
     33   1.1      haya  */
     34   1.1      haya 
     35  1.11    kleink #ifndef _DEV_CARDBUS_CARDBUSVAR_H_
     36  1.11    kleink #define _DEV_CARDBUS_CARDBUSVAR_H_
     37   1.1      haya 
     38  1.22      haya #include <dev/cardbus/cardbusreg.h>
     39   1.1      haya #if 1
     40   1.1      haya #include <dev/cardbus/rbus.h>
     41   1.1      haya #endif
     42   1.1      haya 
     43   1.1      haya 
     44   1.1      haya 
     45   1.1      haya typedef void *cardbus_chipset_tag_t;
     46   1.1      haya typedef int cardbus_intr_handle_t;
     47   1.1      haya 
     48   1.1      haya 
     49   1.1      haya #if rbus
     50  1.21      haya /*
     51  1.21      haya  * struct cardbus_functions contains the pointers for basic cardbus
     52  1.21      haya  * functions.  Those functions must be provided by cardbus bridge.
     53  1.21      haya  * The child devices can use those functions.  The contained functions
     54  1.21      haya  * are: cardbus_space_alloc, cardbus_space_free,
     55  1.21      haya  * cardbus_intr_establish, cardbus_intr_disestablish, cardbus_ctrl,
     56  1.21      haya  * cardbus_power, cardbus_make_tag, cardbus_free_tag and
     57  1.21      haya  * cardbus_conf_write.
     58  1.21      haya  *
     59  1.21      haya  *	int (*cardbus_space_alloc)(cardbus_chipset_tag_t ct, rbus_tag_t rb,
     60  1.21      haya  *	    bus_addr_t addr, bus_size_t size,
     61  1.21      haya  *	    bus_addr_t mask, bus_size_t align,
     62  1.21      haya  *	    int flags, bus_addr_t *addrp,
     63  1.21      haya  *	    bus_space_handle_t *bshp);
     64  1.21      haya  *
     65  1.21      haya  *	int (*cardbus_space_free)(cardbus_chipset_tag_t ct, rbus_tag_t rb,
     66  1.21      haya  *	    bus_space_handle_t, bus_size_t);
     67  1.21      haya  *
     68  1.21      haya  * cardbus_space_alloc and cardbus_space_free allocates and
     69  1.21      haya  * disallocate bus space for the requesters.
     70  1.21      haya  *
     71  1.21      haya  *	void *(*cardbus_intr_establish)(cardbus_chipset_tag_t ct, int irq,
     72  1.21      haya  *	     int level, int (*ih)(void *), void *sc);
     73  1.21      haya  *
     74  1.21      haya  *	void (*cardbus_intr_disestablish)(cardbus_chipset_tag_t ct, void *ih);
     75  1.21      haya  *	int (*cardbus_ctrl)(cardbus_chipset_tag_t ct, int command);
     76  1.21      haya  *	int (*cardbus_power)(cardbus_chipset_tag_t ct, int voltage);
     77  1.21      haya  *
     78  1.21      haya  *	cardbustag_t (*cardbus_make_tag)(cardbus_chipset_tag_t ct,
     79  1.21      haya  *	    int busno, int devno, int functionno);
     80  1.21      haya  *	void (*cardbus_free_tag)(cardbus_chipset_tag_t ct, cardbustag_t tag);
     81  1.21      haya  *	cardbusreg_t (*cardbus_conf_read)(cardbus_chipset_tag_t ct,
     82  1.21      haya  *	    cardbustag_t tag, int offs);
     83  1.21      haya  *	void (*cardbus_conf_write)(cardbus_chipset_tag_t ct,
     84  1.21      haya  *	    cardbustag_t tag, int offs, cardbusreg_t val);
     85  1.21      haya  */
     86   1.1      haya typedef struct cardbus_functions {
     87  1.21      haya 	int (*cardbus_space_alloc) __P((cardbus_chipset_tag_t, rbus_tag_t,
     88  1.21      haya 	    bus_addr_t, bus_size_t, bus_addr_t, bus_size_t,
     89  1.21      haya 	    int, bus_addr_t *, bus_space_handle_t *));
     90  1.21      haya 	int (*cardbus_space_free) __P((cardbus_chipset_tag_t, rbus_tag_t,
     91  1.21      haya 	    bus_space_handle_t, bus_size_t));
     92  1.21      haya 	void *(*cardbus_intr_establish) __P((cardbus_chipset_tag_t, int, int,
     93  1.21      haya 	    int (*)(void *), void *));
     94  1.25    itojun 	void (*cardbus_intr_disestablish) __P((cardbus_chipset_tag_t, void *));
     95  1.21      haya 	int (*cardbus_ctrl) __P((cardbus_chipset_tag_t, int));
     96  1.21      haya 	int (*cardbus_power) __P((cardbus_chipset_tag_t, int));
     97  1.21      haya 
     98  1.25    itojun 	cardbustag_t (*cardbus_make_tag) __P((cardbus_chipset_tag_t, int, int,
     99  1.25    itojun 	    int));
    100  1.21      haya 	void (*cardbus_free_tag) __P((cardbus_chipset_tag_t, cardbustag_t));
    101  1.25    itojun 	cardbusreg_t (*cardbus_conf_read) __P((cardbus_chipset_tag_t,
    102  1.25    itojun 	    cardbustag_t, int));
    103  1.25    itojun 	void (*cardbus_conf_write) __P((cardbus_chipset_tag_t, cardbustag_t,
    104  1.25    itojun 	    int, cardbusreg_t));
    105   1.1      haya } cardbus_function_t, *cardbus_function_tag_t;
    106   1.1      haya 
    107   1.1      haya #else
    108   1.1      haya 
    109   1.1      haya typedef struct cardbus_functions {
    110  1.25    itojun 	int (*cardbus_ctrl) __P((cardbus_chipset_tag_t, int));
    111  1.25    itojun 	int (*cardbus_power) __P((cardbus_chipset_tag_t, int));
    112  1.25    itojun 	int (*cardbus_mem_open) __P((cardbus_chipset_tag_t, int, u_int32_t,
    113  1.25    itojun 	    u_int32_t));
    114  1.25    itojun 	int (*cardbus_mem_close) __P((cardbus_chipset_tag_t, int));
    115  1.25    itojun 	int (*cardbus_io_open) __P((cardbus_chipset_tag_t, int, u_int32_t,
    116  1.25    itojun 	    u_int32_t));
    117  1.25    itojun 	int (*cardbus_io_close) __P((cardbus_chipset_tag_t, int));
    118  1.25    itojun 	void *(*cardbus_intr_establish) __P((cardbus_chipset_tag_t, int, int,
    119  1.25    itojun 	    int (*)(void *), void *));
    120  1.25    itojun 	void (*cardbus_intr_disestablish) __P((cardbus_chipset_tag_t, void *));
    121   1.1      haya 
    122  1.25    itojun 	cardbustag_t (*cardbus_make_tag) __P((cardbus_chipset_tag_t, int, int,
    123  1.25    itojun 	    int));
    124  1.25    itojun 	cardbusreg_t (*cardbus_conf_read) __P((cardbus_chipset_tag_t,
    125  1.25    itojun 	    cardbustag_t, int));
    126  1.25    itojun 	void (*cardbus_conf_write) __P((cardbus_chipset_tag_t, cardbustag_t,
    127  1.25    itojun 	    int, cardbusreg_t));
    128   1.1      haya } cardbus_function_t, *cardbus_function_tag_t;
    129   1.1      haya #endif /* rbus */
    130   1.1      haya 
    131   1.7      haya /*
    132   1.7      haya  * struct cbslot_attach_args is the attach argument for cardbus card.
    133   1.7      haya  */
    134   1.1      haya struct cbslot_attach_args {
    135  1.21      haya 	char *cba_busname;
    136  1.21      haya 	bus_space_tag_t cba_iot;	/* cardbus i/o space tag */
    137  1.21      haya 	bus_space_tag_t cba_memt;	/* cardbus mem space tag */
    138  1.21      haya 	bus_dma_tag_t cba_dmat;		/* DMA tag */
    139  1.21      haya 
    140  1.21      haya 	int cba_bus;			/* cardbus bus number */
    141  1.21      haya 
    142  1.21      haya 	cardbus_chipset_tag_t cba_cc;	/* cardbus chipset */
    143  1.21      haya 	cardbus_function_tag_t cba_cf; /* cardbus functions */
    144  1.21      haya 	int cba_intrline;		/* interrupt line */
    145   1.1      haya 
    146   1.1      haya #if rbus
    147  1.21      haya 	rbus_tag_t cba_rbus_iot;	/* CardBus i/o rbus tag */
    148  1.21      haya 	rbus_tag_t cba_rbus_memt;	/* CardBus mem rbus tag */
    149   1.1      haya #endif
    150   1.1      haya 
    151  1.21      haya 	int cba_cacheline;		/* cache line size */
    152  1.21      haya 	int cba_lattimer;		/* latency timer */
    153   1.1      haya };
    154   1.1      haya 
    155   1.1      haya 
    156   1.1      haya #define cbslotcf_dev  cf_loc[0]
    157   1.1      haya #define cbslotcf_func cf_loc[1]
    158   1.1      haya #define CBSLOT_UNK_DEV -1
    159   1.1      haya #define CBSLOT_UNK_FUNC -1
    160   1.1      haya 
    161   1.1      haya 
    162   1.1      haya struct cardbus_devfunc;
    163   1.1      haya 
    164   1.7      haya /*
    165   1.7      haya  * struct cardbus_softc is the softc for cardbus card.
    166   1.7      haya  */
    167   1.1      haya struct cardbus_softc {
    168  1.21      haya 	struct device sc_dev;		/* fundamental device structure */
    169   1.1      haya 
    170  1.21      haya 	int sc_bus;			/* cardbus bus number */
    171  1.21      haya 	int sc_device;			/* cardbus device number */
    172  1.21      haya 	int sc_intrline;		/* CardBus intrline */
    173   1.1      haya 
    174  1.21      haya 	bus_space_tag_t sc_iot;		/* CardBus I/O space tag */
    175  1.21      haya 	bus_space_tag_t sc_memt;	/* CardBus MEM space tag */
    176  1.21      haya 	bus_dma_tag_t sc_dmat;		/* DMA tag */
    177   1.1      haya 
    178  1.21      haya 	cardbus_chipset_tag_t sc_cc;	/* CardBus chipset */
    179  1.21      haya 	cardbus_function_tag_t sc_cf;	/* CardBus function */
    180   1.1      haya 
    181   1.1      haya #if rbus
    182  1.21      haya 	rbus_tag_t sc_rbus_iot;		/* CardBus i/o rbus tag */
    183  1.21      haya 	rbus_tag_t sc_rbus_memt;	/* CardBus mem rbus tag */
    184   1.1      haya #endif
    185   1.1      haya 
    186  1.21      haya 	int sc_cacheline;		/* cache line size */
    187  1.21      haya 	int sc_lattimer;		/* latency timer */
    188  1.21      haya 	int sc_volt;			/* applied Vcc voltage */
    189   1.1      haya #define PCCARD_33V  0x02
    190   1.1      haya #define PCCARD_XXV  0x04
    191   1.1      haya #define PCCARD_YYV  0x08
    192  1.21      haya 	int sc_poweron_func;
    193  1.28  drochner   struct cardbus_devfunc *sc_funcs[8];	/* list of cardbus device functions */
    194   1.1      haya };
    195   1.1      haya 
    196   1.1      haya 
    197   1.7      haya /*
    198   1.1      haya  * struct cardbus_devfunc:
    199   1.1      haya  *
    200   1.1      haya  *   This is the data deposit for each function of a CardBus device.
    201   1.1      haya  *   This structure is used for memory or i/o space allocation and
    202   1.1      haya  *   disallocation.
    203   1.7      haya  */
    204   1.1      haya typedef struct cardbus_devfunc {
    205  1.21      haya 	cardbus_chipset_tag_t ct_cc;
    206  1.21      haya 	cardbus_function_tag_t ct_cf;
    207  1.21      haya 	struct cardbus_softc *ct_sc;	/* pointer to the parent */
    208  1.21      haya 	int ct_bus;			/* bus number */
    209  1.21      haya 	int ct_dev;			/* device number */
    210  1.21      haya 	int ct_func;			/* function number */
    211   1.1      haya 
    212   1.1      haya #if rbus
    213  1.21      haya 	rbus_tag_t ct_rbus_iot;		/* CardBus i/o rbus tag */
    214  1.21      haya 	rbus_tag_t ct_rbus_memt;	/* CardBus mem rbus tag */
    215   1.1      haya #endif
    216   1.1      haya 
    217  1.21      haya 	u_int32_t ct_bar[6];		/* Base Address Regs 0 to 6 */
    218  1.21      haya 	u_int32_t ct_lc;		/* Latency timer and cache line size */
    219  1.21      haya 	/* u_int32_t ct_cisreg; */	/* CIS reg: is it needed??? */
    220   1.1      haya 
    221  1.21      haya 	struct device *ct_device;	/* pointer to the device */
    222   1.1      haya 
    223  1.21      haya 	/* some data structure needed for tuple??? */
    224   1.1      haya } *cardbus_devfunc_t;
    225   1.1      haya 
    226   1.1      haya 
    227   1.8      joda /* XXX various things extracted from CIS */
    228   1.8      joda struct cardbus_cis_info {
    229  1.21      haya 	int32_t		manufacturer;
    230  1.21      haya 	int32_t		product;
    231  1.21      haya 	char		cis1_info_buf[256];
    232  1.21      haya 	char*		cis1_info[4];
    233  1.21      haya 	struct cb_bar_info {
    234  1.21      haya 		unsigned int flags;
    235  1.21      haya 		unsigned int size;
    236  1.21      haya 	} bar[7];
    237  1.21      haya 	unsigned int	funcid;
    238  1.21      haya 	union {
    239  1.21      haya 		struct {
    240  1.21      haya 			int uart_type;
    241  1.21      haya 			int uart_present;
    242  1.21      haya 		} serial;
    243  1.21      haya 		struct {
    244  1.21      haya 			char netid[6];
    245  1.21      haya 			char netid_present;
    246  1.21      haya 			char __filler;
    247  1.21      haya 		} network;
    248  1.21      haya 	} funce;
    249   1.8      joda };
    250   1.8      joda 
    251   1.1      haya struct cardbus_attach_args {
    252  1.21      haya 	cardbus_devfunc_t ca_ct;
    253   1.1      haya 
    254  1.21      haya 	bus_space_tag_t ca_iot;		/* CardBus I/O space tag */
    255  1.21      haya 	bus_space_tag_t ca_memt;	/* CardBus MEM space tag */
    256  1.21      haya 	bus_dma_tag_t ca_dmat;		/* DMA tag */
    257  1.21      haya 
    258  1.24  augustss 	u_int ca_bus;
    259  1.21      haya 	u_int ca_device;
    260  1.21      haya 	u_int ca_function;
    261  1.21      haya 	cardbustag_t ca_tag;
    262  1.21      haya 	cardbusreg_t ca_id;
    263  1.21      haya 	cardbusreg_t ca_class;
    264   1.1      haya 
    265  1.21      haya 	/* interrupt information */
    266  1.21      haya 	cardbus_intr_line_t ca_intrline;
    267   1.1      haya 
    268   1.1      haya #if rbus
    269  1.21      haya 	rbus_tag_t ca_rbus_iot;		/* CardBus i/o rbus tag */
    270  1.21      haya 	rbus_tag_t ca_rbus_memt;	/* CardBus mem rbus tag */
    271   1.1      haya #endif
    272   1.8      joda 
    273  1.21      haya 	struct cardbus_cis_info ca_cis;
    274   1.1      haya };
    275   1.1      haya 
    276   1.1      haya 
    277   1.1      haya #define CARDBUS_ENABLE  1	/* enable the channel */
    278   1.1      haya #define CARDBUS_DISABLE 2	/* disable the channel */
    279   1.1      haya #define CARDBUS_RESET   4
    280   1.1      haya #define CARDBUS_CD      7
    281   1.1      haya #  define CARDBUS_NOCARD 0
    282   1.1      haya #  define CARDBUS_5V_CARD 0x01	/* XXX: It must not exist */
    283   1.1      haya #  define CARDBUS_3V_CARD 0x02
    284   1.1      haya #  define CARDBUS_XV_CARD 0x04
    285   1.1      haya #  define CARDBUS_YV_CARD 0x08
    286   1.1      haya #define CARDBUS_IO_ENABLE    100
    287   1.1      haya #define CARDBUS_IO_DISABLE   101
    288   1.1      haya #define CARDBUS_MEM_ENABLE   102
    289   1.1      haya #define CARDBUS_MEM_DISABLE  103
    290   1.1      haya #define CARDBUS_BM_ENABLE    104 /* bus master */
    291   1.1      haya #define CARDBUS_BM_DISABLE   105
    292   1.1      haya 
    293   1.1      haya #define CARDBUS_VCC_UC  0x0000
    294   1.1      haya #define CARDBUS_VCC_3V  0x0001
    295   1.1      haya #define CARDBUS_VCC_XV  0x0002
    296   1.1      haya #define CARDBUS_VCC_YV  0x0003
    297   1.1      haya #define CARDBUS_VCC_0V  0x0004
    298   1.1      haya #define CARDBUS_VCC_5V  0x0005	/* ??? */
    299   1.1      haya #define CARDBUS_VCCMASK 0x000f
    300   1.1      haya #define CARDBUS_VPP_UC  0x0000
    301   1.1      haya #define CARDBUS_VPP_VCC 0x0010
    302   1.1      haya #define CARDBUS_VPP_12V 0x0030
    303   1.1      haya #define CARDBUS_VPP_0V  0x0040
    304   1.1      haya #define CARDBUS_VPPMASK 0x00f0
    305   1.1      haya 
    306   1.1      haya 
    307   1.1      haya #include "locators.h"
    308   1.1      haya 
    309   1.1      haya /*
    310  1.23       wiz  * Locators devices that attach to 'cardbus', as specified to config.
    311   1.1      haya  */
    312   1.1      haya #define cardbuscf_dev cf_loc[CARDBUSCF_DEV]
    313   1.1      haya #define CARDBUS_UNK_DEV CARDBUSCF_DEV_DEFAULT
    314   1.1      haya 
    315   1.1      haya #define cardbuscf_function cf_loc[CARDBUSCF_FUNCTION]
    316   1.1      haya #define CARDBUS_UNK_FUNCTION CARDBUSCF_FUNCTION_DEFAULT
    317   1.1      haya 
    318   1.1      haya int cardbus_attach_card __P((struct cardbus_softc *));
    319  1.14      haya void cardbus_detach_card __P((struct cardbus_softc *));
    320  1.21      haya void *cardbus_intr_establish __P((cardbus_chipset_tag_t, cardbus_function_tag_t,
    321  1.25    itojun     cardbus_intr_handle_t, int, int (*) (void *), void *arg));
    322  1.21      haya void cardbus_intr_disestablish __P((cardbus_chipset_tag_t,
    323  1.25    itojun     cardbus_function_tag_t, void *));
    324   1.1      haya 
    325   1.4      haya int cardbus_mapreg_map __P((struct cardbus_softc *, int, int, cardbusreg_t,
    326  1.15      haya     int, bus_space_tag_t *, bus_space_handle_t *, bus_addr_t *, bus_size_t *));
    327  1.15      haya int cardbus_mapreg_unmap __P((struct cardbus_softc *, int, int,
    328  1.15      haya     bus_space_tag_t, bus_space_handle_t, bus_size_t));
    329   1.1      haya 
    330   1.1      haya int cardbus_save_bar __P((cardbus_devfunc_t));
    331   1.1      haya int cardbus_restore_bar __P((cardbus_devfunc_t));
    332   1.1      haya 
    333  1.25    itojun int cardbus_function_enable __P((struct cardbus_softc *, int));
    334  1.25    itojun int cardbus_function_disable __P((struct cardbus_softc *, int));
    335  1.10   thorpej 
    336  1.10   thorpej int cardbus_get_capability __P((cardbus_chipset_tag_t, cardbus_function_tag_t,
    337  1.15      haya     cardbustag_t, int, int *, cardbusreg_t *));
    338  1.26  christos int cardbus_powerstate __P((cardbus_devfunc_t, pcitag_t, const int *, int *));
    339  1.26  christos int cardbus_setpowerstate __P((const char *, cardbus_devfunc_t, pcitag_t, int));
    340   1.7      haya 
    341   1.7      haya #define Cardbus_function_enable(ct) cardbus_function_enable((ct)->ct_sc, (ct)->ct_func)
    342   1.7      haya #define Cardbus_function_disable(ct) cardbus_function_disable((ct)->ct_sc, (ct)->ct_func)
    343   1.7      haya 
    344   1.7      haya 
    345   1.1      haya 
    346   1.4      haya #define Cardbus_mapreg_map(ct, reg, type, busflags, tagp, handlep, basep, sizep) \
    347   1.4      haya 	cardbus_mapreg_map((ct)->ct_sc, (ct->ct_func), (reg), (type),\
    348   1.4      haya 			   (busflags), (tagp), (handlep), (basep), (sizep))
    349  1.15      haya #define Cardbus_mapreg_unmap(ct, reg, tag, handle, size) \
    350  1.15      haya 	cardbus_mapreg_unmap((ct)->ct_sc, (ct->ct_func), (reg), (tag), (handle), (size))
    351   1.4      haya 
    352   1.1      haya #define Cardbus_make_tag(ct) (*(ct)->ct_cf->cardbus_make_tag)((ct)->ct_cc, (ct)->ct_bus, (ct)->ct_dev, (ct)->ct_func)
    353   1.1      haya #define cardbus_make_tag(cc, cf, bus, device, function) ((cf)->cardbus_make_tag)((cc), (bus), (device), (function))
    354   1.1      haya 
    355   1.1      haya #define Cardbus_free_tag(ct, tag) (*(ct)->ct_cf->cardbus_free_tag)((ct)->ct_cc, (tag))
    356   1.4      haya #define cardbus_free_tag(cc, cf, tag) (*(cf)->cardbus_free_tag)(cc, (tag))
    357   1.1      haya 
    358   1.1      haya #define Cardbus_conf_read(ct, tag, offs) (*(ct)->ct_cf->cardbus_conf_read)((ct)->ct_cf, (tag), (offs))
    359   1.1      haya #define cardbus_conf_read(cc, cf, tag, offs) ((cf)->cardbus_conf_read)((cc), (tag), (offs))
    360  1.12       abs #define Cardbus_conf_write(ct, tag, offs, val) (*(ct)->ct_cf->cardbus_conf_write)((ct)->ct_cf, (tag), (offs), (val))
    361  1.12       abs #define cardbus_conf_write(cc, cf, tag, offs, val) ((cf)->cardbus_conf_write)((cc), (tag), (offs), (val))
    362  1.12       abs 
    363  1.11    kleink #endif /* !_DEV_CARDBUS_CARDBUSVAR_H_ */
    364