linux/drivers/pcmcia/bcm63xx_pcmcia.c
<<
val val vo/spa 2 vospa class="lxr_search"> val ="+search" method="post" onsubmit="return do_search(this);"> val 2 "> val val typ 2 submit">Search 2 val vo/spa 2al ="ajax+*" method="post" onsubmit="return false;"> voinput typ 2 hidden" nam 2 ajax_lookup" id2 ajax_lookup" 2> 2 "> al
2 odiv id2 file_contents"
/ /1o/a>ospa  class="comment">/*o/spa 
2/ /2o/a>ospa  class="comment"> * This file is subject to the terms and condi2>  s of the GNU General Publico/spa 
2/ /3o/a>ospa  class="comment"> * License.  See the file "COPYING" in the main directory of this archiveo/spa 
2/ /4o/a>ospa  class="comment"> * for more details.o/spa 
2/ /5o/a>ospa  class="comment"> *o/spa 
2/ /6o/a>ospa  class="comment"> * Copyright (C) 2008 Maxime Bizn>
<mbizn>@freebox.fr>o/spa 
2/ /7o/a>ospa  class="comment"> */o/spa 
2/ /8o/a> / /9o/a>#include
<linux/kernel.ho/a>> / 
	  a>#include
<linux/module.ho/a>> / 11  a>#include
<linux/ioport.ho/a>> / 12  a>#include
<linux/timer.ho/a>> / 13  a>#include
<linux/platform_device.ho/a>> / 14  a>#include
<linux/slab.ho/a>> / 15  a>#include
<linux/delay.ho/a>> / 16  a>#include
<linux/pci.ho/a>> / 17  a>#include
<linux/gpio.ho/a>> / 18o/a> / 19o/a>#include
<bcm63xx_regs.ho/a>> / 2	  a>#include
<bcm63xx_io.ho/a>> / 21  a>#include
"bcm63xx_pcmcia.ho/a>" / 22o/a> / 23  a>#define/oa href="+code=PFX" class="sref">PFX  a>l"bcm63xx_pcmcia:
"/ 24o/a> / 25  a>#ifdef/oa href="+code=CONFIG_CARDBUS" class="sref">CONFIG_CARDBUSo/a> / 26o/a>ospa  class="comment">/* if cardbus is used, platform device needs reference to actual pci/ 27o/a>ospa  class="comment"> * device */o/spa 
2/ 28o/a>static struct oa href="+code=pci_dev" class="sref">pci_dev  a>l*oa href="+code=bcm63xx_cb_dev" class="sref">bcm63xx_cb_dev  a>; / 29o/a>#endif2/ 30o/a> / 31o/a>ospa  class="comment">/*o/spa 
2/ 32o/a>ospa  class="comment"> * read/write helper for pcmcia regso/spa 
2/ 33o/a>ospa  class="comment"> */o/spa 
2/ 34o/a>static oa href="+code=inline" class="sref">inline  a>loa href="+code=u32" class="sref">u32o/a> oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(struct oa href="+code=bcm63xx_pcmcia_socket" class="sref">bcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>,loa href="+code=u32" class="sref">u32o/a> oa href="+code=off" class="sref">offo/a>)2/ 35  a>{2/ 36  a>lbcm_readlo/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=base" class="sref">base  a>l+ oa href="+code=off" class="sref">offo/a>); / 37o/a>} / 38o/a> / 39o/a>static oa href="+code=inline" class="sref">inline  a>lvoid oa href="+code=pcmcia_writel" class="sref">pcmcia_writelo/a>(struct oa href="+code=bcm63xx_pcmcia_socket" class="sref">bcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>,2/ 40  a>lu32o/a> oa href="+code=val" class="sref">val  a>,loa href="+code=u32" class="sref">u32o/a> oa href="+code=off" class="sref">offo/a>)2/ 41  a>{2/ 42  a>lbcm_writelo/a>(oa href="+code=val" class="sref">val  a>,loa href="+code=skt" class="sref">skt  a>->oa href="+code=base" class="sref">base  a>l+ oa href="+code=off" class="sref">offo/a>); / 43o/a>} / 44o/a> / 45o/a>ospa  class="comment">/*o/spa 
2/ 46o/a>ospa  class="comment"> * This callback should (re-)initialise the socket, turn on statuso/spa 
2/ 47o/a>ospa  class="comment"> * interrupts and PCMCIA bus, and wait for power to stabilise so thato/spa 
2/ 48o/a>ospa  class="comment"> * the card status signals report correctly.o/spa 
2/ 49o/a>ospa  class="comment"> *o/spa 
2/ 50o/a>ospa  class="comment"> * Hardware cannot do that.o/spa 
2/ 51o/a>ospa  class="comment"> */o/spa 
2/ 52o/a>static int oa href="+code=bcm63xx_pcmcia_sock_init" class="sref">bcm63xx_pcmcia_sock_inito/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>)2/ 53  a>{2/ 54  a>l/ 55o/a>} / 56o/a> / 57o/a>ospa  class="comment">/*o/spa 
2/ 58o/a>ospa  class="comment"> * This callback should remove power on the socket, disable IRQs fromo/spa 
2/ 59o/a>ospa  class="comment"> * the card, turn off status interrupts, and disable the PCMCIA bus.o/spa 
2/ 60o/a>ospa  class="comment"> *o/spa 
2/ 61o/a>ospa  class="comment"> * Hardware cannot do that.o/spa 
2/ 62o/a>ospa  class="comment"> */o/spa 
2/ 63o/a>static int oa href="+code=bcm63xx_pcmcia_suspend" class="sref">bcm63xx_pcmcia_suspendo/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>)2/ 64  a>{2/ 65  a>l/ 66o/a>} / 67o/a> / 68o/a>ospa  class="comment">/*o/spa 
2/ 69o/a>ospa  class="comment"> * Implements the set_socket() operaion>
for the in-kernel PCMCIAo/spa 
2/ 70o/a>ospa  class="comment"> * service (formerly SS_SetSocket in Card Services). We more oro/spa 
2/ 71o/a>ospa  class="comment"> * less punt all of this work and let the kernel handle the detailso/spa 
2/ 72o/a>ospa  class="comment"> * of power configuraion>,/reset, &c. We also/record the 2>  
 ofo/spa 
2/ 73o/a>ospa  class="comment"> * `state' in order to regurgitate it to the PCMCIA core later.o/spa 
2/ 74o/a>ospa  class="comment"> */o/spa 
2/ 75o/a>static int oa href="+code=bcm63xx_pcmcia_set_socket" class="sref">bcm63xx_pcmcia_set_socketo/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>,2/ 76  a>lsocket_state_t  a>l*oa href="+code=state" class="sref">stateo/a>)2/ 77  a>{2/ 78  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; / 79  a>lflags  a>; / 80  a>lu32o/a> oa href="+code=val" class="sref">val  a>; / 81o/a> / 82  a>lskt  a> =/oa href="+code=sock" class="sref">socko/a>->oa href="+code=driver_data" class="sref">driver_data  a>; / 83o/a> / 84  a>lspin_lock_irqsaveo/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>, oa href="+code=flags" class="sref">flags  a>); / 85o/a> / 86  a>l/* note: hardware cannot control socket power, so we willo/spa 
2/ 87o/a>ospa  class="comment">         * always report SS_POWERON */o/spa 
2/ 88o/a> / 89  a>l/* apply socket reset */o/spa 
2/ 90  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); / 91  a>lstateo/a>->oa href="+code=flags" class="sref">flags  a> &loa href="+code=SS_RESET" class="sref">SS_RESETo/a>)2/ 92  a>lval  a> |=/oa href="+code=PCMCIA_C1_RESET_MASK" class="sref">PCMCIA_C1_RESET_MASK  a>; / 93  a>l/ 94  a>lval  a> &= ~oa href="+code=PCMCIA_C1_RESET_MASK" class="sref">PCMCIA_C1_RESET_MASK  a>; / 95o/a> / 96  a>l/* reverse reset logic for cardbus card */o/spa 
2/ 97  a>lskt  a>->oa href="+code=card_detected" class="sref">card_detected  a> &&l(oa href="+code=skt" class="sref">skt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> &loa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a>))2/ 98  a>lval  a> ^=/oa href="+code=PCMCIA_C1_RESET_MASK" class="sref">PCMCIA_C1_RESET_MASK  a>; / 99o/a> /100  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=val" class="sref">val  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /101o/a> /102  a>l/* keep requested state for event reporting */o/spa 
2/103  a>lskt  a>->oa href="+code=requested_state" class="sref">requested_state  a> =/*oa href="+code=state" class="sref">stateo/a>; /104o/a> /105  a>lspin_unlock_irqrestoreo/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>, oa href="+code=flags" class="sref">flags  a>); /106o/a> /107  a>l/108o/a>} /109o/a> /110o/a>ospa  class="comment">/*o/spa 
2/111o/a>ospa  class="comment"> * identity cardtyp
 from VS[12] input, CD[12] input while only VS2 iso/spa 
2/112o/a>ospa  class="comment"> * floating, and CD[12] input while only VS1 is floatingo/spa 
2/113o/a>ospa  class="comment"> */o/spa 
2/114  a>enum {2/115  a>lIN_VS1  a> =/(1
<< 0),2/116  a>lIN_VS2  a> =/(1
<< 1),2/117  a>lIN_CD1_VS2H  a> =/(1
<< 2),2/118  a>lIN_CD2_VS2H  a> =/(1
<< 3),2/119  a>lIN_CD1_VS1H  a> =/(1
<< 4),2/120  a>lIN_CD2_VS1H  a> =/(1
<< 5),2/121  a>}; /122o/a> /123o/a>static const oa href="+code=u8" class="sref">u8o/a> oa href="+code=vscd_to_cardtyp
" class="sref">vscd_to_cardtyp
o/a>[] =/{2/124o/a> /125  a>l/* VS1 float, VS2 float */o/spa 
2/126  a>lIN_VS1  a> |/oa href="+code=IN_VS2" class="sref">IN_VS2  a>] =/(oa href="+code=CARD_PCCARD" class="sref">CARD_PCCARD  a> |/oa href="+code=CARD_5V" class="sref">CARD_5V  a>),2/127o/a> /128  a>l/* VS1 grounded, VS2 float */o/spa 
2/129  a>lIN_VS2  a>] =/(oa href="+code=CARD_PCCARD" class="sref">CARD_PCCARD  a> |/oa href="+code=CARD_5V" class="sref">CARD_5V  a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a>),2/130o/a> /131  a>l/* VS1 grounded, VS2 grounded */o/spa 
2/132  a>lCARD_PCCARD  a> |/oa href="+code=CARD_5V" class="sref">CARD_5V  a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a> |/oa href="+code=CARD_XV" class="sref">CARD_XV  a>),2/133o/a> /134  a>l/* VS1 tied to CD1, VS2 float */o/spa 
2/135  a>lIN_VS1  a> |/oa href="+code=IN_VS2" class="sref">IN_VS2  a> |/oa href="+code=IN_CD1_VS1H" class="sref">IN_CD1_VS1H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a>),2/136o/a> /137  a>l/* VS1 grounded, VS2 tied to CD2 */o/spa 
2/138  a>lIN_VS2  a> |/oa href="+code=IN_CD2_VS2H" class="sref">IN_CD2_VS2H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a> |/oa href="+code=CARD_XV" class="sref">CARD_XV  a>),2/139o/a> /140  a>l/* VS1 tied to CD2, VS2 grounded */o/spa 
2/141  a>lIN_VS1  a> |/oa href="+code=IN_CD2_VS1H" class="sref">IN_CD2_VS1H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a> |/oa href="+code=CARD_XV" class="sref">CARD_XV  a> |/oa href="+code=CARD_YV" class="sref">CARD_YV  a>),2/142o/a> /143  a>l/* VS1 float, VS2 grounded */o/spa 
2/144  a>lIN_VS1  a>] =/(oa href="+code=CARD_PCCARD" class="sref">CARD_PCCARD  a> |/oa href="+code=CARD_XV" class="sref">CARD_XV  a>),2/145o/a> /146  a>l/* VS1 float, VS2 tied to CD2 */o/spa 
2/147  a>lIN_VS1  a> |/oa href="+code=IN_VS2" class="sref">IN_VS2  a> |/oa href="+code=IN_CD2_VS2H" class="sref">IN_CD2_VS2H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_3V" class="sref">CARD_3V  a>),2/148o/a> /149  a>l/* VS1 float, VS2 tied to CD1 */o/spa 
2/150  a>lIN_VS1  a> |/oa href="+code=IN_VS2" class="sref">IN_VS2  a> |/oa href="+code=IN_CD1_VS2H" class="sref">IN_CD1_VS2H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_XV" class="sref">CARD_XV  a> |/oa href="+code=CARD_YV" class="sref">CARD_YV  a>),2/151o/a> /152  a>l/* VS1 tied to CD2, VS2 float */o/spa 
2/153  a>lIN_VS1  a> |/oa href="+code=IN_VS2" class="sref">IN_VS2  a> |/oa href="+code=IN_CD2_VS1H" class="sref">IN_CD2_VS1H  a>] =/(oa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a> |/oa href="+code=CARD_YV" class="sref">CARD_YV  a>),2/154o/a> /155  a>l/* VS2 grounded, VS1 is tied to CD1, CD2 is grounded */o/spa 
2/156  a>lIN_VS1  a> |/oa href="+code=IN_CD1_VS1H" class="sref">IN_CD1_VS1H  a>] =/0,/ospa  class="comment">/* ignore cardbay */o/spa 
2/157o/a>}; /158o/a> /159o/a>ospa  class="comment">/*o/spa 
2/160o/a>ospa  class="comment"> * poll hardware to check card inserion>
statuso/spa 
2/161o/a>ospa  class="comment"> */o/spa 
2/162o/a>static unsigned int oa href="+code=__get_socket_status" class="sref">__get_socket_statuso/a>(struct oa href="+code=bcm63xx_pcmcia_socket" class="sref">bcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>)2/163  a>{2/164  a>lstato/a>; /165  a>lu32o/a> oa href="+code=val" class="sref">val  a>; /166o/a> /167  a>lstato/a> =/0; /168o/a> /169  a>l/* check CD for card presence */o/spa 
2/170  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /171o/a> /172  a>lval  a> &loa href="+code=PCMCIA_C1_CD1_MASK" class="sref">PCMCIA_C1_CD1_MASK  a>) &&l!(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_CD2_MASK" class="sref">PCMCIA_C1_CD2_MASK  a>))2/173  a>lstato/a> |=/oa href="+code=SS_DETECT" class="sref">SS_DETECT  a>; /174o/a> /175  a>l/* if new inserion>, detect cardtyp
 */o/spa 
2/176  a>lstato/a> &loa href="+code=SS_DETECT" class="sref">SS_DETECT  a>) &&l!oa href="+code=skt" class="sref">skt  a>->oa href="+code=card_detected" class="sref">card_detected  a>)/{2/177  a>lstato/a> =/0; /178o/a> /179  a>l/* float VS1, float VS2 */o/spa 
2/180  a>lval  a> |=/oa href="+code=PCMCIA_C1_VS1OE_MASK" class="sref">PCMCIA_C1_VS1OE_MASK  a>; /181  a>lval  a> |=/oa href="+code=PCMCIA_C1_VS2OE_MASK" class="sref">PCMCIA_C1_VS2OE_MASK  a>; /182  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=val" class="sref">val  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /183o/a> /184  a>l/* wait for output to stabilize and read VS[12] */o/spa 
2/185  a>ludelayo/a>(10); /186  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /187  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_VS1_MASK" class="sref">PCMCIA_C1_VS1_MASK  a>) ?/oa href="+code=IN_VS1" class="sref">IN_VS1  a> :/0; /188  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_VS2_MASK" class="sref">PCMCIA_C1_VS2_MASK  a>) ?/oa href="+code=IN_VS2" class="sref">IN_VS2  a> :/0; /189o/a> /190  a>l/* drive VS1 low, float VS2 */o/spa 
2/191  a>lval  a> &= ~oa href="+code=PCMCIA_C1_VS1OE_MASK" class="sref">PCMCIA_C1_VS1OE_MASK  a>; /192  a>lval  a> |=/oa href="+code=PCMCIA_C1_VS2OE_MASK" class="sref">PCMCIA_C1_VS2OE_MASK  a>; /193  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=val" class="sref">val  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /194o/a> /195  a>l/* wait for output to stabilize and read CD[12] */o/spa 
2/196  a>ludelayo/a>(10); /197  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /198  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_CD1_MASK" class="sref">PCMCIA_C1_CD1_MASK  a>) ?/oa href="+code=IN_CD1_VS2H" class="sref">IN_CD1_VS2H  a> :/0; /199  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_CD2_MASK" class="sref">PCMCIA_C1_CD2_MASK  a>) ?/oa href="+code=IN_CD2_VS2H" class="sref">IN_CD2_VS2H  a> :/0; /200o/a> /201  a>l/* float VS1, drive VS2 low */o/spa 
2/202  a>lval  a> |=/oa href="+code=PCMCIA_C1_VS1OE_MASK" class="sref">PCMCIA_C1_VS1OE_MASK  a>; /203  a>lval  a> &= ~oa href="+code=PCMCIA_C1_VS2OE_MASK" class="sref">PCMCIA_C1_VS2OE_MASK  a>; /204  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=val" class="sref">val  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /205o/a> /206  a>l/* wait for output to stabilize and read CD[12] */o/spa 
2/207  a>ludelayo/a>(10); /208  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /209  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_CD1_MASK" class="sref">PCMCIA_C1_CD1_MASK  a>) ?/oa href="+code=IN_CD1_VS1H" class="sref">IN_CD1_VS1H  a> :/0; /210  a>lstato/a> |=/(oa href="+code=val" class="sref">val  a> &loa href="+code=PCMCIA_C1_CD2_MASK" class="sref">PCMCIA_C1_CD2_MASK  a>) ?/oa href="+code=IN_CD2_VS1H" class="sref">IN_CD2_VS1H  a> :/0; /211o/a> /212  a>l/* guess cardtyp
 from all this */o/spa 
2/213  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> =/oa href="+code=vscd_to_cardtyp
" class="sref">vscd_to_cardtyp
o/a>[oa href="+code=stat" class="sref">stato/a>]; /214  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a>)2/215  a>ldev_erro/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=socket" class="sref">socket  a>.oa href="+code=dev" class="sref">dev  a>,lospa  class="string">"unsupported card typ
\n"o/spa 
); /216o/a> /217  a>l/* drive both VS pin to 0 again */o/spa 
2/218  a>lval  a> &= ~(oa href="+code=PCMCIA_C1_VS1OE_MASK" class="sref">PCMCIA_C1_VS1OE_MASK  a> |/oa href="+code=PCMCIA_C1_VS2OE_MASK" class="sref">PCMCIA_C1_VS2OE_MASK  a>); /219o/a> /220  a>l/* enable correct logic */o/spa 
2/221  a>lval  a> &= ~(oa href="+code=PCMCIA_C1_EN_PCMCIA_MASK" class="sref">PCMCIA_C1_EN_PCMCIA_MASK  a> |/oa href="+code=PCMCIA_C1_EN_CARDBUS_MASK" class="sref">PCMCIA_C1_EN_CARDBUS_MASK  a>); /222  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> &loa href="+code=CARD_PCCARD" class="sref">CARD_PCCARD  a>)2/223  a>lval  a> |=/oa href="+code=PCMCIA_C1_EN_PCMCIA_MASK" class="sref">PCMCIA_C1_EN_PCMCIA_MASK  a>; /224  a>l/225  a>lval  a> |=/oa href="+code=PCMCIA_C1_EN_CARDBUS_MASK" class="sref">PCMCIA_C1_EN_CARDBUS_MASK  a>; /226o/a> /227  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>,loa href="+code=val" class="sref">val  a>,loa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /228  a>l/229  a>lskt  a>->oa href="+code=card_detected" class="sref">card_detected  a> =/(oa href="+code=stat" class="sref">stato/a> &loa href="+code=SS_DETECT" class="sref">SS_DETECT  a>) ? 1 :/0; /230o/a> /231  a>l/* report card typ
/voltag
 */o/spa 
2/232  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> &loa href="+code=CARD_CARDBUS" class="sref">CARD_CARDBUSo/a>)2/233  a>lstato/a> |=/oa href="+code=SS_CARDBUS" class="sref">SS_CARDBUS  a>; /234  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> &loa href="+code=CARD_3V" class="sref">CARD_3V  a>) /235  a>lstato/a> |=/oa href="+code=SS_3VCARD" class="sref">SS_3VCARD  a>; /236  a>lskt  a>->oa href="+code=card_typ
" class="sref">card_typ
  a> &loa href="+code=CARD_XV" class="sref">CARD_XV  a>) /237  a>lstato/a> |=/oa href="+code=SS_XVCARD" class="sref">SS_XVCARD  a>; /238  a>lstato/a> |=/oa href="+code=SS_POWERON" class="sref">SS_POWERON  a>; /239o/a> /240  a>l  
" class="sref">gpio_get_2>  
o/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=pd" class="sref">pd  a>->oa href="+code=ready_gpio" class="sref">ready_gpio  a>)) /241  a>lstato/a> |=/oa href="+code=SS_READY" class="sref">SS_READY  a>; /242o/a> /243  a>lstato/a>; /244  a>} /245o/a> /246  a>ospa  class="comment">/*o/spa 
2/247o/a>ospa  class="comment"> * core request to get current socket statuso/spa 
2/248o/a>ospa  class="comment"> */o/spa 
2/249  a>static int oa href="+code=bcm63xx_pcmcia_get_status" class="sref">bcm63xx_pcmcia_get_statuso/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>,2/250  a>lstatuso/a>) /251o/a>{2/252  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; /253o/a> /254  a>lskt  a> =/oa href="+code=sock" class="sref">socko/a>->oa href="+code=driver_data" class="sref">driver_data  a>; /255o/a> /256  a>lspin_lock_bho/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>); /257  a>lstatuso/a> =/oa href="+code=__get_socket_status" class="sref">__get_socket_statuso/a>(oa href="+code=skt" class="sref">skt  a>); /258  a>lspin_unlock_bho/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>); /259o/a> /260  a>l/261o/a>} /262o/a> /263o/a>ospa  class="comment">/*o/spa 
2/264  a>ospa  class="comment"> * socket polling timer callbacko/spa 
2/265  a>ospa  class="comment"> */o/spa 
2/266o/a>static void oa href="+code=bcm63xx_pcmcia_poll" class="sref">bcm63xx_pcmcia_pollo/a>(unsigned long oa href="+code=data" class="sref">data  a>) /267  a>{2/268  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; /269  a>lstato/a>,loa href="+code=events" class="sref">events  a>; /270o/a> /271  a>lskt  a> =/(struct oa href="+code=bcm63xx_pcmcia_socket" class="sref">bcm63xx_pcmcia_socket  a>l*)oa href="+code=data" class="sref">data  a>; /272o/a> /273  a>lspin_lock_bho/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>); /274o/a> /275  a>lstato/a> =/oa href="+code=__get_socket_status" class="sref">__get_socket_statuso/a>(oa href="+code=skt" class="sref">skt  a>); /276o/a> /277  a>l/* keep only changed bits, and mask with required on
 from theo/spa 
2/278o/a>ospa  class="comment"> l/279  a>levents  a> =/(oa href="+code=stat" class="sref">stato/a> ^/oa href="+code=skt" class="sref">skt  a>->oa href="+code=old_status" class="sref">old_status  a>) &loa href="+code=skt" class="sref">skt  a>->oa href="+code=requested_stat
" class="sref">requested_stat
  a>.oa href="+code=csc_mask" class="sref">csc_mask  a>; /280  a>lskt  a>->oa href="+code=old_status" class="sref">old_status  a> =/oa href="+code=stat" class="sref">stato/a>; /281  a>lspin_unlock_bho/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>); /282o/a> /283  a>levents  a>) /284  a>lpcmcia_parse_eventso/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=socket" class="sref">socket  a>,loa href="+code=events" class="sref">events  a>); /285o/a> /286  a>lmod_timero/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=timer" class="sref">timero/a>,2/287  a>ljiffies  a>l+/oa href="+code=msecs_to_jiffies" class="sref">msecs_to_jiffieso/a>(oa href="+code=BCM63XX_PCMCIA_POLL_RATE" class="sref">BCM63XX_PCMCIA_POLL_RATE  a>)); /288  a>} /289o/a> /290  a>static int oa href="+code=bcm63xx_pcmcia_set_io_map" class="sref">bcm63xx_pcmcia_set_io_mapo/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>,2/291  a>lpccard_io_map  a>l*oa href="+code=map" class="sref">map  a>) /292  a>{2/293  a>l/* this doesn't seem to be called by pcmcia layer/if statico/spa 
2/294  a>ospa  class="comment"> l/295  a>l/296  a>} /297  a> /298  a>static int oa href="+code=bcm63xx_pcmcia_set_mem_map" class="sref">bcm63xx_pcmcia_set_mem_mapo/a>(struct oa href="+code=pcmcia_socket" class="sref">pcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>,2/299  a>lpccard_mem_map  a>l*oa href="+code=map" class="sref">map  a>) /300o/a>{2/301  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; /302  a>lresourc
  a>l*oa href="+code=res" class="sref">res  a>; /303o/a> /304  a>lskt  a> =/oa href="+code=sock" class="sref">socko/a>->oa href="+code=driver_data" class="sref">driver_data  a>; /305  a>lmap  a>->oa href="+code=flags" class="sref">flags  a>l&loa href="+code=MAP_ATTRIB" class="sref">MAP_ATTRIB  a>) /306  a>lres  a> =/oa href="+code=skt" class="sref">skt  a>->oa href="+code=attr_res" class="sref">attr_res  a>; /307  a>l/308  a>lres  a> =/oa href="+code=skt" class="sref">skt  a>->oa href="+code=common_res" class="sref">common_res  a>; /309o/a> /310  a>lmap  a>->oa href="+code=static_start" class="sref">static_start  a> =/oa href="+code=res" class="sref">res  a>->oa href="+code=start" class="sref">start  a> +/oa href="+code=map" class="sref">map  a>->oa href="+code=card_start" class="sref">card_start  a>; /311  a>l/312  a>} /313o/a> /314  a>static struct oa href="+code=pccard_operaion>s" class="sref">pccard_operaion>s  a>loa href="+code=bcm63xx_pcmcia_operaion>s" class="sref">bcm63xx_pcmcia_operaion>s  a> =/{2/315  a>linit  a>lbcm63xx_pcmcia_sock_inito/a>,2/316  a>lsuspend  a>lbcm63xx_pcmcia_suspendo/a>,2/317  a>lget_statuso/a> ////lbcm63xx_pcmcia_get_statuso/a>,2/318  a>lset_socketo/a> ////lbcm63xx_pcmcia_set_socketo/a>,2/319  a>lset_io_mapo/a> ////lbcm63xx_pcmcia_set_io_mapo/a>,2/320  a>lset_mem_mapo/a>////lbcm63xx_pcmcia_set_mem_mapo/a>,2/321  a>}; /322o/a> /323o/a>ospa  class="comment">/*o/spa 
2/324  a>ospa  class="comment"> * register pcmcia socket to coreo/spa 
2/325  a>ospa  class="comment"> */o/spa 
2/326o/a>static int oa href="+code=bcm63xx_drv_pcmcia_prob
" class="sref">bcm63xx_drv_pcmcia_prob
o/a>(struct oa href="+code=platform_devic
" class="sref">platform_devic
  a>l*oa href="+code=pdev" class="sref">pdev  a>) /327  a>{2/328  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; /329  a>lpcmcia_socket  a>l*oa href="+code=sock" class="sref">socko/a>; /330  a>lresourc
  a>l*oa href="+code=res" class="sref">res  a>,l*oa href="+code=irq_res" class="sref">irq_reso/a>; /331  a>lregmem_siz
  a> =/0,loa href="+code=iomem_siz
" class="sref">iomem_siz
  a> =/0; /332  a>lu32o/a> oa href="+code=val" class="sref">val  a>; /333  a>lret  a>; /334o/a> /335  a>lskt  a> =/oa href="+code=kzalloc" class="sref">kzalloco/a>(siz
of(*oa href="+code=skt" class="sref">skt  a>),loa href="+code=GFP_KERNEL" class="sref">GFP_KERNEL  a>); /336  a>lskt  a>) /337  a>lENOMEM  a>; /338  a>lspin_lock_inito/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=lock" class="sref">locko/a>); /339  a>lsocko/a> =/&oa href="+code=skt" class="sref">skt  a>->oa href="+code=socket" class="sref">socket  a>; /340  a>lsocko/a>->oa href="+code=driver_data" class="sref">driver_data  a> =/oa href="+code=skt" class="sref">skt  a>; /341o/a> /342  a>l/* make sure we have all resourc
s we need */o/spa 
2/343  a>lskt  a>->oa href="+code=common_res" class="sref">common_res  a> =/oa href="+code=platform_get_resourc
" class="sref">platform_get_resourc
o/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM  a>,l1); /344  a>lskt  a>->oa href="+code=attr_res" class="sref">attr_res  a> =/oa href="+code=platform_get_resourc
" class="sref">platform_get_resourc
o/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM  a>,l2); /345  a>lirq_reso/a> =/oa href="+code=platform_get_resourc
" class="sref">platform_get_resourc
o/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=IORESOURCE_IRQ" class="sref">IORESOURCE_IRQ  a>,l0); /346  a>lskt  a>->oa href="+code=pd" class="sref">pd  a> =/oa href="+code=pdev" class="sref">pdev  a>->oa href="+code=dev" class="sref">dev  a>.oa href="+code=platform_data" class="sref">platform_data  a>; /347  a>lskt  a>->oa href="+code=common_res" class="sref">common_res  a> || !oa href="+code=skt" class="sref">skt  a>->oa href="+code=attr_res" class="sref">attr_res  a> || !oa href="+code=irq_res" class="sref">irq_reso/a> || !oa href="+code=skt" class="sref">skt  a>->oa href="+code=pd" class="sref">pd  a>)/{2/348  a>lret  a> =/-oa href="+code=EINVAL" class="sref">EINVAL  a>; /349  a>lerro/a>; /350  a>l/351o/a> /352  a>l/* remap pcmcia registers */o/spa 
2/353  a>lres  a> =/oa href="+code=platform_get_resourc
" class="sref">platform_get_resourc
o/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM  a>,l0); /354  a>lregmem_siz
  a> =/oa href="+code=resourc
_siz
" class="sref">resourc
_siz
o/a>(oa href="+code=res" class="sref">res  a>); /355  a>lrequest_mem_regiono/a>(oa href="+code=res" class="sref">res  a>->oa href="+code=start" class="sref">start  a>,loa href="+code=regmem_siz
" class="sref">regmem_siz
  a>,lospa  class="string">"bcm63xx_pcmcia"o/spa 
))/{2/356  a>lret  a> =/-oa href="+code=EINVAL" class="sref">EINVAL  a>; /357  a>lerro/a>; /358  a>l/359  a>lskt  a>->oa href="+code=reg_res" class="sref">reg_res  a> =/oa href="+code=res" class="sref">res  a>; /360o/a> /361  a>lskt  a>->oa href="+code=bas
" class="sref">bas
  a> =/oa href="+code=ioremap" class="sref">ioremapo/a>(oa href="+code=res" class="sref">res  a>->oa href="+code=start" class="sref">start  a>,loa href="+code=regmem_siz
" class="sref">regmem_siz
  a>); /362  a>lskt  a>->oa href="+code=bas
" class="sref">bas
  a>)/{2/363  a>lret  a> =/-oa href="+code=ENOMEM" class="sref">ENOMEM  a>; /364  a>lerro/a>; /365  a>l/366o/a> /367  a>l/* remap io registers */o/spa 
2/368  a>lres  a> =/oa href="+code=platform_get_resourc
" class="sref">platform_get_resourc
o/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=IORESOURCE_MEM" class="sref">IORESOURCE_MEM  a>,l3); /369  a>liomem_siz
  a> =/oa href="+code=resourc
_siz
" class="sref">resourc
_siz
o/a>(oa href="+code=res" class="sref">res  a>); /370  a>lskt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a> =/oa href="+code=ioremap" class="sref">ioremapo/a>(oa href="+code=res" class="sref">res  a>->oa href="+code=start" class="sref">start  a>,loa href="+code=iomem_siz
" class="sref">iomem_siz
  a>); /371  a>lskt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a>)/{2/372  a>lret  a> =/-oa href="+code=ENOMEM" class="sref">ENOMEM  a>; /373  a>lerro/a>; /374  a>l/375o/a> /376  a>l/* resourc
s are static */o/spa 
2/377  a>lsocko/a>->oa href="+code=resourc
_ops" class="sref">resourc
_opso/a> =/&oa href="+code=pccard_static_ops" class="sref">pccard_static_opso/a>; /378  a>lsocko/a>->oa href="+code=ops" class="sref">opso/a> =/&oa href="+code=bcm63xx_pcmcia_operaion>s" class="sref">bcm63xx_pcmcia_operaion>s  a>; /379  a>lsocko/a>->oa href="+code=owner" class="sref">owner  a> =/oa href="+code=THIS_MODULE" class="sref">THIS_MODULE  a>; /380  a>lsocko/a>->oa href="+code=dev" class="sref">dev  a>.oa href="+code=parent" class="sref">parento/a> =/&oa href="+code=pdev" class="sref">pdev  a>->oa href="+code=dev" class="sref">dev  a>; /381  a>lsocko/a>->oa href="+code=features" class="sref">features  a> =/oa href="+code=SS_CAP_STATIC_MAP" class="sref">SS_CAP_STATIC_MAPo/a> |/oa href="+code=SS_CAP_PCCARD" class="sref">SS_CAP_PCCARD  a>; /382  a>lsocko/a>->oa href="+code=io_offset" class="sref">io_offset  a> =/(unsigned long)oa href="+code=skt" class="sref">skt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a>; /383  a>lsocko/a>->oa href="+code=pci_irq" class="sref">pci_irq  a> =/oa href="+code=irq_res" class="sref">irq_reso/a>->oa href="+code=start" class="sref">start  a>; /384o/a> /385o/a>#ifdef/oa href="+code=CONFIG_CARDBUS" class="sref">CONFIG_CARDBUSo/a> /386  a>lsocko/a>->oa href="+code=cb_dev" class="sref">cb_dev  a> =/oa href="+code=bcm63xx_cb_dev" class="sref">bcm63xx_cb_dev  a>; /387  a>lbcm63xx_cb_dev  a>) /388  a>lsocko/a>->oa href="+code=features" class="sref">features  a> |=/oa href="+code=SS_CAP_CARDBUS" class="sref">SS_CAP_CARDBUS  a>; /389o/a>#endif /390o/a> /391  a>l/* assume commonl&lattribute memory have the sam
 siz
 */o/spa 
2/392  a>lsocko/a>->oa href="+code=map_siz
" class="sref">map_siz
  a> =/oa href="+code=resourc
_siz
" class="sref">resourc
_siz
o/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=common_res" class="sref">common_res  a>); /393o/a> /394  a>l/* initializ
 polling timer */o/spa 
2/395  a>lsetup_timero/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=timer" class="sref">timero/a>, oa href="+code=bcm63xx_pcmcia_poll" class="sref">bcm63xx_pcmcia_pollo/a>,/(unsigned long)oa href="+code=skt" class="sref">skt  a>); /396o/a> /397  a>l/* initializ
  pcmcia  control register,  drive  VS[12] to  0,o/spa 
2/398o/a>ospa  class="comment"> l  
 since it is set by the PCIo/spa 
2/399  a>ospa  class="comment"> l/400  a>lval  a> =/oa href="+code=pcmcia_readl" class="sref">pcmcia_readlo/a>(oa href="+code=skt" class="sref">skt  a>, oa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /401  a>lval  a> &=/oa href="+code=PCMCIA_C1_CBIDSEL_MASK" class="sref">PCMCIA_C1_CBIDSEL_MASK  a>; /402  a>lval  a> |=/oa href="+code=PCMCIA_C1_EN_PCMCIA_GPIO_MASK" class="sref">PCMCIA_C1_EN_PCMCIA_GPIO_MASK  a>; /403  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>, oa href="+code=val" class="sref">val  a>, oa href="+code=PCMCIA_C1_REG" class="sref">PCMCIA_C1_REG  a>); /404o/a> /405  a>l/*o/spa 
2/406  a>ospa  class="comment"> l/407o/a>ospa  class="comment"> l/408o/a>ospa  class="comment"> l/409  a>ospa  class="comment"> l/410  a>lval  a> =/oa href="+code=PCMCIA_C2_DATA16_MASK" class="sref">PCMCIA_C2_DATA16_MASK  a>; /411  a>lval  a> |=/10 <</oa href="+code=PCMCIA_C2_RWCOUNT_SHIFT" class="sref">PCMCIA_C2_RWCOUNT_SHIFT  a>; /412  a>lval  a> |=/6 <</oa href="+code=PCMCIA_C2_INACTIVE_SHIFT" class="sref">PCMCIA_C2_INACTIVE_SHIFT  a>; /413  a>lval  a> |=/3 <</oa href="+code=PCMCIA_C2_SETUP_SHIFT" class="sref">PCMCIA_C2_SETUP_SHIFT  a>; /414  a>lval  a> |=/3 <</oa href="+code=PCMCIA_C2_HOLD_SHIFT" class="sref">PCMCIA_C2_HOLD_SHIFT  a>; /415  a>lpcmcia_writelo/a>(oa href="+code=skt" class="sref">skt  a>, oa href="+code=val" class="sref">val  a>, oa href="+code=PCMCIA_C2_REG" class="sref">PCMCIA_C2_REG  a>); /416o/a> /417  a>lret  a> =/oa href="+code=pcmcia_register_socket" class="sref">pcmcia_register_socketo/a>(oa href="+code=sock" class="sref">socko/a>); /418  a>lret  a>) /419  a>lerro/a>; /420o/a> /421  a>l/* start polling socket */o/spa 
2/422  a>lmod_timero/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=timer" class="sref">timero/a>,2/423  a>ljiffies  a>l+/oa href="+code=msecs_to_jiffies" class="sref">msecs_to_jiffieso/a>(oa href="+code=BCM63XX_PCMCIA_POLL_RATE" class="sref">BCM63XX_PCMCIA_POLL_RATE  a>)); /424o/a> /425  a>lplatform_set_drvdatao/a>(oa href="+code=pdev" class="sref">pdev  a>,loa href="+code=skt" class="sref">skt  a>); /426  a>l/427  a> /428  a>oa href="+code=err" class="sref">erro/a>: /429  a>lskt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a>) /430  a>liounmapo/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a>); /431  a>lskt  a>->oa href="+code=bas
" class="sref">bas
  a>) /432  a>liounmapo/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=bas
" class="sref">bas
  a>); /433  a>lskt  a>->oa href="+code=reg_res" class="sref">reg_res  a>) /434  a>lreleas
_mem_regiono/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=reg_res" class="sref">reg_res  a>->oa href="+code=start" class="sref">start  a>,loa href="+code=regmem_siz
" class="sref">regmem_siz
  a>); /435  a>lkfre
o/a>(oa href="+code=skt" class="sref">skt  a>); /436  a>lret  a>; /437  a>} /438  a> /439  a>static int oa href="+code=bcm63xx_drv_pcmcia_remov
" class="sref">bcm63xx_drv_pcmcia_remov
o/a>(struct oa href="+code=platform_devic
" class="sref">platform_devic
  a>l*oa href="+code=pdev" class="sref">pdev  a>) /440o/a>{2/441  a>lbcm63xx_pcmcia_socket  a>l*oa href="+code=skt" class="sref">skt  a>; /442  a>lresourc
  a>l*oa href="+code=res" class="sref">res  a>; /443o/a> /444  a>lskt  a> =/oa href="+code=platform_get_drvdata" class="sref">platform_get_drvdatao/a>(oa href="+code=pdev" class="sref">pdev  a>); /445  a>ldel_timer_synco/a>(&oa href="+code=skt" class="sref">skt  a>->oa href="+code=timer" class="sref">timero/a>); /446  a>liounmapo/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=bas
" class="sref">bas
  a>); /447  a>liounmapo/a>(oa href="+code=skt" class="sref">skt  a>->oa href="+code=io_bas
" class="sref">io_bas
  a>); /448  a>lres  a> =/oa href="+code=skt" class="sref">skt  a>->oa href="+code=reg_res" class="sref">reg_res  a>; /449  a>lreleas
_mem_regiono/a>(oa href="+code=res" class="sref">res  a>->oa href="+code=start" class="sref">start  a>,loa href="+code=resourc
_siz
" class="sref">resourc
_siz
o/a>(oa href="+code=res" class="sref">res  a>)); /450  a>lkfre
o/a>(oa href="+code=skt" class="sref">skt  a>); /451  a>l/452  a>} /453o/a> /454  a>struct oa href="+code=platform_driver" class="sref">platform_driver  a>loa href="+code=bcm63xx_pcmcia_driver" class="sref">bcm63xx_pcmcia_driver  a> =/{2/455  a>lprob
o/a>//=/oa href="+code=bcm63xx_drv_pcmcia_prob
" class="sref">bcm63xx_drv_pcmcia_prob
o/a>,2/456  a>lremov
o/a>/=/oa href="+code=bcm63xx_drv_pcmcia_remov
" class="sref">bcm63xx_drv_pcmcia_remov
o/a>,2/457  a>ldriver  a> =/{2/458  a>lnam
  a>l"bcm63xx_pcmcia"o/spa 
,2/459  a>lowner  a>  =/oa href="+code=THIS_MODULE" class="sref">THIS_MODULE  a>,2/460  a>l/461  a>}; /462o/a> /463  a>#ifdef/oa href="+code=CONFIG_CARDBUS" class="sref">CONFIG_CARDBUSo/a> /464  a>static int oa href="+code=bcm63xx_cb_prob
" class="sref">bcm63xx_cb_prob
o/a>(struct oa href="+code=pci_dev" class="sref">pci_dev  a>l*oa href="+code=dev" class="sref">dev  a>,2/465  a>lpci_devic
_id  a>l*oa href="+code=id" class="sref">id  a>) /466o/a>{2/467  a>l/* keep pci devic
 */o/spa 
2/468  a>lbcm63xx_cb_dev  a> =/oa href="+code=dev" class="sref">dev  a>; /469  a>lplatform_driver_registero/a>(&oa href="+code=bcm63xx_pcmcia_driver" class="sref">bcm63xx_pcmcia_driver  a>); /470  a>} /471o/a> /472  a>static void/oa href="+code=bcm63xx_cb_exit" class="sref">bcm63xx_cb_exito/a>(struct oa href="+code=pci_dev" class="sref">pci_dev  a>l*oa href="+code=dev" class="sref">dev  a>) /473  a>{2/474  a>lplatform_driver_unregistero/a>(&oa href="+code=bcm63xx_pcmcia_driver" class="sref">bcm63xx_pcmcia_driver  a>); /475  a>lbcm63xx_cb_dev  a> =/oa href="+code=NULL" class="sref">NULL  a>; /476  a>} /477  a> /478  a>static oa href="+code=DEFINE_PCI_DEVICE_TABLE" class="sref">DEFINE_PCI_DEVICE_TABLEo/a>(oa href="+code=bcm63xx_cb_tabl
" class="sref">bcm63xx_cb_tabl
  a>) =/{2/479  a>l/480  a>lvendor  a>lPCI_VENDOR_ID_BROADCOM  a>,2/481  a>ldevic
  a>lBCM6348_CPU_ID  a>,2/482  a>lsubvendor  a>lPCI_VENDOR_ID_BROADCOM  a>,2/483  a>lsubdevic
  a>lPCI_ANY_ID  a>,2/484  a>lclass  a>lPCI_CLASS_BRIDGE_CARDBUS  a>l<</8,2/485  a>lclass_mask  a>llparento/a> =/&oa href="+1g :1mcia/bcm63xx_pcmcia.c#L487" id2 L487" class="line" nam
2 L487">/487  a> /488  a>l/489  a>lvendor  a>lPCI_VENDOR_ID_BROADCOM  a>,2/490  a>ldevic
  a>lBCM6358_CPU_ID  a>,2/491  a>lsubvendor  a>lPCI_VENDOR_ID_BROADCOM  a>,2/492  a>lsubdevic
  a>lPCI_ANY_ID  a>,2/493  a>lclass  a>lPCI_CLASS_BRIDGE_CARDBUS  a>l<</8,2/494  a>lclass_mask  a>l/495  a>l/496o/a> /497  a>l/498o/a>}; /499  a> /500  a>oa href="+code=MODULE_DEVICE_TABLE" class="sref">MODULE_DEVICE_TABLEo/a>(oa href="+code=pci" class="sref">pci  a>,loa href="+code=bcm63xx_cb_tabl
" class="sref">bcm63xx_cb_tabl
  a>); /501o/a> /502  a>static struct oa href="+code=pci_driver" class="sref">pci_driver  a>loa href="+code=bcm63xx_cardbus_driver" class="sref">bcm63xx_cardbus_driver  a> =/{2/503  a>lnam
  a>l"bcm63xx_cardbus"o/spa 
,2/504  a>lid_tabl
  a>lbcm63xx_cb_tabl
  a>,2/505  a>lprob
o/a>/// ////l<=/oa href="+code=bcm63xx_cb_prob
" class="sref">bcm63xx_cb_prob
o/a>,2/506  a>lremov
o/a>// ////l<=/oa href="+code=bcm63xx_cb_exit" class="sref">bcm63xx_cb_exito/a>,2/507o/a>}; /508o/a>#endif /509  a> /510  a>ospa  class="comment">/*o/spa 
2/511  a>ospa  class="comment"> */if cardbus support is enabl
d, register our platform devic
 aftero/spa 
2/512  a>ospa  class="comment"> */our fake cardbus bridge has been registeredo/spa 
2/513  a>ospa  class="comment"> */o/spa 
2/514  a>static int oa href="+code=__init" class="sref">__init  a>loa href="+code=bcm63xx_pcmcia_init" class="sref">bcm63xx_pcmcia_inito/a>(void) /515  a>{2/516o/a>#ifdef/oa href="+code=CONFIG_CARDBUS" class="sref">CONFIG_CARDBUSo/a> /517  a>lpci_register_drivero/a>(&oa href="+code=bcm63xx_cardbus_driver" class="sref">bcm63xx_cardbus_driver  a>); /518o/a>#else /519  a>lplatform_driver_registero/a>(&oa href="+code=bcm63xx_pcmcia_driver" class="sref">bcm63xx_pcmcia_driver  a>); /520o/a>#endif /521  a>} /522o/a> /523  a>static void/oa href="+code=__exit" class="sref">__exito/a>loa href="+code=bcm63xx_pcmcia_exit" class="sref">bcm63xx_pcmcia_exito/a>(void) /524o/a>{2/525o/a>#ifdef/oa href="+code=CONFIG_CARDBUS" class="sref">CONFIG_CARDBUSo/a> /526  a>lpci_unregister_drivero/a>(&oa href="+code=bcm63xx_cardbus_driver" class="sref">bcm63xx_cardbus_driver  a>); /527  a>#else /528  a>lplatform_driver_unregistero/a>(&oa href="+code=bcm63xx_pcmcia_driver" class="sref">bcm63xx_pcmcia_driver  a>); /529o/a>#endif /530  a>} /531o/a> /532  a>oa href="+code=module_init" class="sref">module_inito/a>(oa href="+code=bcm63xx_pcmcia_init" class="sref">bcm63xx_pcmcia_inito/a>); /533  a>oa href="+code=module_exit" class="sref">module_exito/a>(oa href="+code=bcm63xx_pcmcia_exit" class="sref">bcm63xx_pcmcia_exito/a>); /534o/a> /535  a>oa href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSEo/a>(ospa  class="string">"GPL"o/spa 
); /536  a>oa href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHcmcia/bcm63xx_pcmcia.c#L535" id2wm;0me Bizmmonlt;mbizmm@>kfrbox.fr>-&gPL"o/spa 
); oa href="+code=MODULE_SCRIPTIONLE" class="sref">MODULE_SCRIPTIONcmcia/bcm63xx_pcmcia.c#L535" id2Linux X_PCMC C_ca Serdevis: a/bcm63 S sockeC contrlerPL"o/spa 
); 


T theriginal LXR softrdwart by th; LXR ="cou_inyci a>tht isxperiommeal riveimmot b; lxt@linux.noci . lxt.linux.no kindly hogisdot b; Redpill Linpro ASci a>providsterf Linux //coultllinand a_operaion serdevis sinc1995.