linux/drivers/pcmcia/i82092.c
<<
>>
Prefs
   1/* 
   2 * Driver for Intel I82092AA PCI-PCMCIA bridge.
   3 *
   4 * (C) 2001 Red Hat, Inc.
   5 *
   6 * Author: Arjan Van De Ven <arjanv@redhat.com>
   7 * Loosly based on i82365.c from the pcmcia-cs package
   8 */
   9
  10#include <linux/kernel.h>
  11#include <linux/module.h>
  12#include <linux/pci.h>
  13#include <linux/init.h>
  14#include <linux/workqueue.h>
  15#include <linux/interrupt.h>
  16#include <linux/device.h>
  17
  18#include <pcmcia/ss.h>
  19
  20#include <asm/io.h>
  21
  22#include "i82092aa.h"
  23#include "i82365.h"
  24
  25MODULE_LICENSE("GPL");
  26
  27/* PCI core routines */
  28static DEFINE_PCI_DEVICE_TABLE(i82092aa_pci_ids) = {
  29        { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82092AA_0) },
  30        { }
  31};
  32MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids);
  33
  34static struct pci_driver i82092aa_pci_driver = {
  35        .name           = "i82092aa",
  36        .id_table       = i82092aa_pci_ids,
  37        .probe          = i82092aa_pci_probe,
  38        .remove         = __devexit_p(i82092aa_pci_remove),
  39};
  40
  41
  42/* the pccard structure and its functions */
  43static struct pccard_operations i82092aa_operations = {
  44        .init                   = i82092aa_init,
  45        .get_status             = i82092aa_get_status,
  46        .set_socket             = i82092aa_set_socket,
  47        .set_io_map             = i82092aa_set_io_map,
  48        .set_mem_map            = i82092aa_set_mem_map,
  49};
  50
  51/* The card can do up to 4 sockets, allocate a structure for each of them */
  52
  53struct socket_info {
  54        int     number;
  55        int     card_state;     /*  0 = no socket,
  56                                    1 = empty socket, 
  57                                    2 = card but not initialized,
  58                                    3 = operational card */
  59        unsigned int io_base;   /* base io address of the socket */
  60        
  61        struct pcmcia_socket socket;
  62        struct pci_dev *dev;    /* The PCI device for the socket */
  63};
  64
  65#define MAX_SOCKETS 4
  66static struct socket_info sockets[MAX_SOCKETS];
  67static int socket_count;  /* shortcut */                                                                                
  68
  69
  70static int __devinit i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
  71{
  72        unsigned char configbyte;
  73        int i, ret;
  74        
  75        enter("i82092aa_pci_probe");
  76        
  77        if ((ret = pci_enable_device(dev)))
  78                return ret;
  79                
  80        pci_read_config_byte(dev, 0x40, &configbyte);  /* PCI Configuration Control */
  81        switch(configbyte&6) {
  82                case 0:
  83                        socket_count = 2;
  84                        break;
  85                case 2:
  86                        socket_count = 1;
  87                        break;
  88                case 4:
  89                case 6:
  90                        socket_count = 4;
  91                        break;
  92                        
  93                default:
  94                        printk(KERN_ERR "i82092aa: Oops, you did something we didn't think of.\n");
  95                        ret = -EIO;
  96                        goto err_out_disable;
  97        }
  98        printk(KERN_INFO "i82092aa: configured as a %d socket device.\n", socket_count);
  99
 100        if (!request_region(pci_resource_start(dev, 0), 2, "i82092aa")) {
 101                ret = -EBUSY;
 102                goto err_out_disable;
 103        }
 104        
 105        for (i = 0;i<socket_count;i++) {
 106                sockets[i].card_state = 1; /* 1 = present but empty */
 107                sockets[i].io_base = pci_resource_start(dev, 0);
 108                sockets[i].socket.features |= SS_CAP_PCCARD;
 109                sockets[i].socket.map_size = 0x1000;
 110                sockets[i].socket.irq_mask = 0;
 111                sockets[i].socket.pci_irq  = dev->irq;
 112                sockets[i].socket.cb_dev  = dev;
 113                sockets[i].socket.owner = THIS_MODULE;
 114
 115                sockets[i].number = i;
 116                
 117                if (card_present(i)) {
 118                        sockets[i].card_state = 3;
 119                        dprintk(KERN_DEBUG "i82092aa: slot %i is occupied\n",i);
 120                } else {
 121                        dprintk(KERN_DEBUG "i82092aa: slot %i is vacant\n",i);
 122                }
 123        }
 124                
 125        /* Now, specifiy that all interrupts are to be done as PCI interrupts */
 126        configbyte = 0xFF; /* bitmask, one bit per event, 1 = PCI interrupt, 0 = ISA interrupt */
 127        pci_write_config_byte(dev, 0x50, configbyte); /* PCI Interrupt Routing Register */
 128
 129        /* Register the interrupt handler */
 130        dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq);
 131        if ((ret = request_irq(dev->irq, i82092aa_interrupt, IRQF_SHARED, "i82092aa", i82092aa_interrupt))) {
 132                printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq);
 133                goto err_out_free_res;
 134        }
 135
 136        pci_set_drvdata(dev, &sockets[i].socket);
 137
 138        for (i = 0; i<socket_count; i++) {
 139                sockets[i].socket.dev.parent = &dev->dev;
 140                sockets[i].socket.ops = &i82092aa_operations;
 141                sockets[i].socket.resource_ops = &pccard_nonstatic_ops;
 142                ret = pcmcia_register_socket(&sockets[i].socket);
 143                if (ret) {
 144                        goto err_out_free_sockets;
 145                }
 146        }
 147
 148        leave("i82092aa_pci_probe");
 149        return 0;
 150
 151err_out_free_sockets:
 152        if (i) {
 153                for (i--;i>=0;i--) {
 154                        pcmcia_unregister_socket(&sockets[i].socket);
 155                }
 156        }
 157        free_irq(dev->irq, i82092aa_interrupt);
 158err_out_free_res:
 159        release_region(pci_resource_start(dev, 0), 2);
 160err_out_disable:
 161        pci_disable_device(dev);
 162        return ret;                     
 163}
 164
 165static void __devexit i82092aa_pci_remove(struct pci_dev *dev)
 166{
 167        struct pcmcia_socket *socket = pci_get_drvdata(dev);
 168
 169        enter("i82092aa_pci_remove");
 170        
 171        free_irq(dev->irq, i82092aa_interrupt);
 172
 173        if (socket)
 174                pcmcia_unregister_socket(socket);
 175
 176        leave("i82092aa_pci_remove");
 177}
 178
 179static DEFINE_SPINLOCK(port_lock);
 180
 181/* basic value read/write functions */
 182
 183static unsigned char indirect_read(int socket, unsigned short reg)
 184{
 185        unsigned short int port;
 186        unsigned char val;
 187        unsigned long flags;
 188        spin_lock_irqsave(&port_lock,flags);
 189        reg += socket * 0x40;
 190        port = sockets[socket].io_base;
 191        outb(reg,port);
 192        val = inb(port+1);
 193        spin_unlock_irqrestore(&port_lock,flags);
 194        return val;
 195}
 196
 197#if 0
 198static unsigned short indirect_read16(int socket, unsigned short reg)
 199{
 200        unsigned short int port;
 201        unsigned short tmp;
 202        unsigned long flags;
 203        spin_lock_irqsave(&port_lock,flags);
 204        reg  = reg + socket * 0x40;
 205        port = sockets[socket].io_base;
 206        outb(reg,port);
 207        tmp = inb(port+1);
 208        reg++;
 209        outb(reg,port);
 210        tmp = tmp | (inb(port+1)<<8);
 211        spin_unlock_irqrestore(&port_lock,flags);
 212        return tmp;
 213}
 214#endif
 215
 216static void indirect_write(int socket, unsigned short reg, unsigned char value)
 217{
 218        unsigned short int port;
 219        unsigned long flags;
 220        spin_lock_irqsave(&port_lock,flags);
 221        reg = reg + socket * 0x40;
 222        port = sockets[socket].io_base; 
 223        outb(reg,port);
 224        outb(value,port+1);
 225        spin_unlock_irqrestore(&port_lock,flags);
 226}
 227
 228static void indirect_setbit(int socket, unsigned short reg, unsigned char mask)
 229{
 230        unsigned short int port;
 231        unsigned char val;
 232        unsigned long flags;
 233        spin_lock_irqsave(&port_lock,flags);
 234        reg = reg + socket * 0x40;
 235        port = sockets[socket].io_base; 
 236        outb(reg,port);
 237        val = inb(port+1);
 238        val |= mask;
 239        outb(reg,port);
 240        outb(val,port+1);
 241        spin_unlock_irqrestore(&port_lock,flags);
 242}
 243
 244
 245static void indirect_resetbit(int socket, unsigned short reg, unsigned char mask)
 246{
 247        unsigned short int port;
 248        unsigned char val;
 249        unsigned long flags;
 250        spin_lock_irqsave(&port_lock,flags);
 251        reg = reg + socket * 0x40;
 252        port = sockets[socket].io_base; 
 253        outb(reg,port);
 254        val = inb(port+1);
 255        val &= ~mask;
 256        outb(reg,port);
 257        outb(val,port+1);
 258        spin_unlock_irqrestore(&port_lock,flags);
 259}
 260
 261static void indirect_write16(int socket, unsigned short reg, unsigned short value)
 262{
 263        unsigned short int port;
 264        unsigned char val;
 265        unsigned long flags;
 266        spin_lock_irqsave(&port_lock,flags);
 267        reg = reg + socket * 0x40;
 268        port = sockets[socket].io_base; 
 269        
 270        outb(reg,port);
 271        val = value & 255;
 272        outb(val,port+1);
 273        
 274        reg++;
 275        
 276        outb(reg,port);
 277        val = value>>8;
 278        outb(val,port+1);
 279        spin_unlock_irqrestore(&port_lock,flags);
 280}
 281
 282/* simple helper functions */
 283/* External clock time, in nanoseconds.  120 ns = 8.33 MHz */
 284static int cycle_time = 120;
 285
 286static int to_cycles(int ns)
 287{
 288        if (cycle_time!=0)
 289                return ns/cycle_time;
 290        else
 291                return 0;
 292}
 293    
 294
 295/* Interrupt handler functionality */
 296
 297static irqreturn_t i82092aa_interrupt(int irq, void *dev)
 298{
 299        int i;
 300        int loopcount = 0;
 301        int handled = 0;
 302
 303        unsigned int events, active=0;
 304        
 305/*      enter("i82092aa_interrupt");*/
 306        
 307        while (1) {
 308                loopcount++;
 309                if (loopcount>20) {
 310                        printk(KERN_ERR "i82092aa: infinite eventloop in interrupt \n");
 311                        break;
 312                }
 313                
 314                active = 0;
 315                
 316                for (i=0;i<socket_count;i++) {
 317                        int csc;
 318                        if (sockets[i].card_state==0) /* Inactive socket, should not happen */
 319                                continue;
 320                        
 321                        csc = indirect_read(i,I365_CSC); /* card status change register */
 322                        
 323                        if (csc==0)  /* no events on this socket */
 324                                continue;
 325                        handled = 1;
 326                        events = 0;
 327                         
 328                        if (csc & I365_CSC_DETECT) {
 329                                events |= SS_DETECT;
 330                                printk("Card detected in socket %i!\n",i);
 331                         }
 332                        
 333                        if (indirect_read(i,I365_INTCTL) & I365_PC_IOCARD) { 
 334                                /* For IO/CARDS, bit 0 means "read the card" */
 335                                events |= (csc & I365_CSC_STSCHG) ? SS_STSCHG : 0; 
 336                        } else {
 337                                /* Check for battery/ready events */
 338                                events |= (csc & I365_CSC_BVD1) ? SS_BATDEAD : 0;
 339                                events |= (csc & I365_CSC_BVD2) ? SS_BATWARN : 0;
 340                                events |= (csc & I365_CSC_READY) ? SS_READY : 0;
 341                        }
 342                        
 343                        if (events) {
 344                                pcmcia_parse_events(&sockets[i].socket, events);
 345                        }
 346                        active |= events;
 347                }
 348                                
 349                if (active==0) /* no more events to handle */
 350                        break;                          
 351                
 352        }
 353        return IRQ_RETVAL(handled);
 354/*      leave("i82092aa_interrupt");*/
 355}
 356
 357
 358
 359/* socket functions */
 360
 361static int card_present(int socketno)
 362{       
 363        unsigned int val;
 364        enter("card_present");
 365        
 366        if ((socketno<0) || (socketno >= MAX_SOCKETS))
 367                return 0;
 368        if (sockets[socketno].io_base == 0)
 369                return 0;
 370
 371                
 372        val = indirect_read(socketno, 1); /* Interface status register */
 373        if ((val&12)==12) {
 374                leave("card_present 1");
 375                return 1;
 376        }
 377                
 378        leave("card_present 0");
 379        return 0;
 380}
 381
 382static void set_bridge_state(int sock)
 383{
 384        enter("set_bridge_state");
 385        indirect_write(sock, I365_GBLCTL,0x00);
 386        indirect_write(sock, I365_GENCTL,0x00);
 387        
 388        indirect_setbit(sock, I365_INTCTL,0x08);
 389        leave("set_bridge_state");
 390}
 391
 392
 393
 394
 395
 396      
 397static int i82092aa_init(struct pcmcia_socket *sock)
 398{
 399        int i;
 400        struct resource res = { .start = 0, .end = 0x0fff };
 401        pccard_io_map io = { 0, 0, 0, 0, 1 };
 402        pccard_mem_map mem = { .res = &res, };
 403        
 404        enter("i82092aa_init");
 405                        
 406        for (i = 0; i < 2; i++) {
 407                io.map = i;
 408                i82092aa_set_io_map(sock, &io);
 409        }
 410        for (i = 0; i < 5; i++) {
 411                mem.map = i;
 412                i82092aa_set_mem_map(sock, &mem);
 413        }
 414        
 415        leave("i82092aa_init");
 416        return 0;
 417}
 418                                                                                                                                                                                                                                              
 419static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
 420{
 421        unsigned int sock = container_of(socket, struct socket_info, socket)->number;
 422        unsigned int status;
 423        
 424        enter("i82092aa_get_status");
 425        
 426        status = indirect_read(sock,I365_STATUS); /* Interface Status Register */
 427        *value = 0;
 428        
 429        if ((status & I365_CS_DETECT) == I365_CS_DETECT) {
 430                *value |= SS_DETECT;
 431        }
 432                
 433        /* IO cards have a different meaning of bits 0,1 */
 434        /* Also notice the inverse-logic on the bits */
 435         if (indirect_read(sock, I365_INTCTL) & I365_PC_IOCARD) {
 436                /* IO card */
 437                if (!(status & I365_CS_STSCHG))
 438                        *value |= SS_STSCHG;
 439         } else { /* non I/O card */
 440                if (!(status & I365_CS_BVD1))
 441                        *value |= SS_BATDEAD;
 442                if (!(status & I365_CS_BVD2))
 443                        *value |= SS_BATWARN;
 444                        
 445         }
 446         
 447         if (status & I365_CS_WRPROT)
 448                (*value) |= SS_WRPROT;  /* card is write protected */
 449         
 450         if (status & I365_CS_READY)
 451                (*value) |= SS_READY;    /* card is not busy */
 452                
 453         if (status & I365_CS_POWERON)
 454                (*value) |= SS_POWERON;  /* power is applied to the card */
 455
 456
 457        leave("i82092aa_get_status");
 458        return 0;
 459}
 460
 461
 462static int i82092aa_set_socket(struct pcmcia_socket *socket, socket_state_t *state) 
 463{
 464        unsigned int sock = container_of(socket, struct socket_info, socket)->number;
 465        unsigned char reg;
 466        
 467        enter("i82092aa_set_socket");
 468        
 469        /* First, set the global controller options */
 470        
 471        set_bridge_state(sock);
 472        
 473        /* Values for the IGENC register */
 474        
 475        reg = 0;
 476        if (!(state->flags & SS_RESET))         /* The reset bit has "inverse" logic */
 477                reg = reg | I365_PC_RESET;  
 478        if (state->flags & SS_IOCARD) 
 479                reg = reg | I365_PC_IOCARD;
 480                
 481        indirect_write(sock,I365_INTCTL,reg); /* IGENC, Interrupt and General Control Register */
 482        
 48=events" class="sref">events |= (<'>) 
I365_INTCTL,I365_INTCTL,indirect_wode=reg" class="sref">reg |  4       387 4      
->flags & SS_IOCARD) 
/* pWR_AUTOc#L436" id="L436" class="line" name="L436"> 388 4      i8209lass="string">"Card detected in socket %i!\n"Auto
 4      reg = regSS_POWERONcmcia/WR_AUTOlass="comment">cmcia/WR_AUTOis not bdrivers/pcmci4ontrol Regiautomcket"}4 391
4a href="drivers/pcmcia/i42092.4912092.c#L388"state->flags & SS_IOCARD) 
/* OUTPUT_ENAc#L436" id="L436" class="line" name="L436"> 392
4a href="drivers/pcmcia/i42092.49092aa_set_mem_map" class="sref">i820lass="string">"Card detected in socket %i!\n"ster *Enablidcia/i82092.c#L311" id="L311" class="line" name="L311"4 393
4a href="drivers/pcmcia/i42092.49+code=value" class="s> = regSS_POWERONcmcia/WR_OUTlass="comment">cmcia/WR_OUTis not busy */
 ="hs="sr4a href="drivers/pcmcia/i42092.4982092.c#L426" id="L426" class="line" name="L426"> 396 4    
->flags &  387 4atic int reg 388 4val#L312" id="L312" class="line" name="L312"4 399 4      int reg 5      struct i820lass="string">"Card detected in socket %i!\n"/i);
 5      csc = regSS_POWERONcmciaVCC_5Vlass="comment">cmciaVCC_5VL480" id="L480" class="line" name="L480"5 402 5       5      
 5  href="drivers/pcmcia/i5r" cl50drivers/pcmcia/i82092.c#L445"ass="sref">i820lass="string">"Card detected in socket %i!\n"ref="dri: ref="drivers/pcmciaacallidcwith hrealid VCC"i);
atus = flags &  5  href="drivers/pcmcia/i5 href5"drivers/pcmcia/i82092.c#L406"e("i82092aa_get_status");
 5      for (act2.c#L45-e( 5 tic int  5               5      }
 5      for (i->flags & ( 5              mem 5              i820lass="string">"Card detected in socket %i!\n"cia///pcm+code=i" clas="sref">i);
 5      }
val#L312" id="L312" class="line" name="L312"5 414 5      
 5      ("Card detected in socket %i!\n"//pcm5.0ef="d+code=i" clas="sref">i);
 5      return 0;
active |= regSS_POWERONcmciaVPP1_5Vlass="comment">cmciaVPP1_5Vlass="sref">I365_PC_IOCARDcmciaVPP2_5VL480" id="L480" class="line" name="L480"5 417}5/* Check #L312" id="L312" class="line" name="L312"5 408 5                        5     5                      case 120:" id="L426" class="line" name="L426"5 409 5atic int "Card detected in socket %i!\n"//pcm12.0ia/i82092.c#L311" id="L311" class="line" name="L311"5 420{5i820ode=reg" class="sref">regSS_POWERONcmciaVPP1_12Vlass="comment">cmciaVPP1_12Vlass="sref">I365_PC_IOCARDcmciaVPP2_12Vlass" id="L311" class="line" name="L311"5 411 5      unsigned int csc 5      unsigned int  5      
valass="sref">i820lass="string">"Card detected in socket %i!\n"ref="dri: ref="drivers/pcmciaacallidcwith hrealid VPP"i);
atus = flags &  5      i820ss="string">"i82092aa_get_status");
 5      
( 5       5      * 5      
state->regindirect_read(sock,I365_STATUS); powerlass="comment">cmcia/ower The resy */
 5      if ((reg = sock,I365_INTCTL,cmcia/ower Thea>); /* IGENC, Interr id="L449" class="line" name="L449"5 430 5              *val id="L449" class="line" name="L449"5 411 5      }

vers/pc2.c#L449" id="L449" class="line" name="L449"5 432 5              
 5      /*5IO cards have a = 0;
 5      /*5Also notice thstate->flags & SS_IOCARD) 
 5       if (i820ode=reg" class="sref">regSS_POWERONcmciaCSC>) {
 5               5              if (!(->flags & SS_IOCARD) 
 5                      *<5 href5"+code=value" class="sstate->flags & SS_IOCARD) 
 5       } else { regSS_POWERONcmciaCSC>))
 5              if (!( 5                      *<5 href5"+code=value" class="sstate->flags & SS_IOCARD) 
 5              if (!((regSS_POWERONcmciaCSC>a href="drivers/pcmcia/i82C092.c#L44" id="L439" class="line" name="L439"5 433 5                      *<5 href5"+code=value" class="sstate->flags & SS_IOCARD) 
 5                      
<5 href5"drivers/pcmcia/i82092.c#L445"e(regSS_POWERONcmciaCSC>a href="drivers/pcmcia/i82C092.c#L44" id="L439" class="line" name="L439"5 435 5       }
flags & SS_IOCARD) 
/* card is n9" id="L479" class="line" name="L479"5 436 5       
active |= regSS_POWERONcmcia82C0 5       if (/* Check                  id="L479" class="line" name="L479"5 428 5              (* 5       
 5       if (2.c#L449" id="L449" class="line" name="L449"5 451 5              (* 5              
pccard_memrite(sock,I365_INTCTL,/* IGENC, Interr id="L449" class="line" name="L449"5 453 5       if (indirect_read(sock,I365_STATUS); a/C href="drivers/pcmcia/CInterr id="L449" class="line" name="L449"5 434 5              (*
5a href="drivers/pcmcia/i52092.55s="sref">leave("i82092aa_init");

5a href="drivers/pcmcia/i52092.55/pcmcia/i82092.c#L417" id="L417" class="line" name="L417"5 457 5       5      return 0;
 5i82092aa_get_so_map(sockpcmcia_socket *socket, pcmcia_socket io cket, 
5a href="drivers/pcmcia/i52092.56#L421" id="L421" class="line" name="L421"5 461
5a href="drivers/pcmcia/i52092.56e=sock" class="sref">sock = container_of(socket, struct socket_info, socket)->number;
s5atic int ;
iocket)-> 5 5      unsigned int )->"i82092aa_set_socket");
io/i82092.c#L468" id="L468" class="line" name="L468"5 465 5      unsigned char  5      
status = i;
number;
i" id="L468" class="line" name="L468"5 457 5       5      

 5      /*56" class="sref">sttus = i;>num 19"" id="L436" class="line" name="L436"5 470 5      
vale("i82092aa_init");
iocwith hrealid >io/i82092.c#L468" id="L468" class="line" name="L468"5 471 5       5      
 5      /*5Values for the">status & number;
>num 0xffff) ||sref">indirect_rears/pcmcia/i82092.c#L40">number;
>num 0xffff) ||sref">indirect_rears/pcmcia/i82092.c#L40">number;
>tus & number;
 5      
"i82092aa_init");
iocwith hrealid io/i82092.c#L468" id="L468" class="line" name="L468"5 465 5       5      if (!( 5               5      if (
 5              sttus = (sock, I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is n9"lass="sref">I365_CS_POWEROENA_IOlass="comment">cmciaENA_IOsock, i3" id="L443" class="line" name="L443"5 480 5              
 = (I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is nef">I365_INTCTL) &ENA_IOlass="comment">cmciaENA_IOsock, i3"" id="L480" class="line" name="L480"5 481 5       5      
io: Snumss="s,io">numssop); c2.c#L449" id="L449" class="line" name="L449"5 48=event5" class="sref">events5365_I5TCTL,
indirect_w class="sref">      retur=sock" class="sref">1code=,I365_INTCTL,cmciaIOsock, i3+">I365_INTCTL,I365_INTCTLnumber;
 5      status =       retur=sock" class="sref">1code=,I365_INTCTL,cmciaIOsock, i3+">I365_INTCTL,I365_INTCTLnumber;
 5      
/* Check  id="L449" class="line" name="L449"5f468 5      indirect_read(sock,I365_STATUS); IOef="+code=reg" class="srOOCARD" class="s~">I365_STATUS); IOef=_MASK"+code=reg" class="srOOCA_MASKsock, i3" id="L480" class="line" name="L480"5 449 5      }5sttus = number;
ttus = 3" id="L443" class="line" name="L443"5 391
5a href="drivers/pcmcia/i52092.59+code=value" class="sket)->SS_POWERONcmciarOOCA_16BIa href="drivers/cmciarOOCA_16BIasock, i3" id="L480" class="line" name="L480"5 392
5a href="drivers/pcmcia/i52092.59092aa_set_mem_map" cl id="L480" class="line" name="L480"5 48=event5a href="drivers/pcmcia/i52092.59O cards have a = 0;
(sock,I365_INTCTL,I365_INTCTL
sneed2092.c#L449" id="L449" class="line" name="L449"5 396 5    
sttus = number;
tus =  5atic int reg(ersbi(struct I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is ne">I365_INTCTL) &ENA_IOlass="comment">cmciaENA_IOsock, i3"" id="L480" class="line" name="L480"5 388 5val id="L480" class="line" name="L480"5 449 5      int "i82092aa_init");
io/i82092.c#L468"val id="L480" class="line" name="L480"6 400 6      struct  6       6       6  href="drivers/pcmcia/i6cmcia60+codestatus" class="sref">i82092aa_get_so_mamem/a>(pcmcia_socket *socket, pcmcia_socket mem/a>(socket,  6  href="drivers/pcmcia/i6r" cl60drive" id="L436" class="line" name="L436"6 503 6  href="drivers/pcmcia/i6 href6"drivers/pcmcis="sref">socket_info, socket, soref">container_of(socket, struct socket_info, socket)-> 6    
sock = container_off="+ href="+code=socket" cla="sref">s">number;
 6 tic int pcmcia_socketi_bus_/51}onpcmcia_sock/51}on 6 a href="drivers/pcmcia/6ode=i6082092.c#L469"="sref">sshorsref">pcmcia_sockbasstring">"i8bassf">socket)-> 6      int ;
i" id="L465" class="line" name="L465"6 410 6      for (i 6              indirect_wss="string">"i82092aa_set_socket");
 6               6      }
socket, struct s">number;
socsref"ef">pcmcia_sock/51}onnumber;
 6      
 6      indirect_wode=i" class="sref">i;
number;
i" id="L465" class="line" name="L465"6 603 6      return 0;
sttus = i;>num 49"" id="L436" class="line" name="L436"6 417}6/e("i82092aa_init");
 6                        6     6                      2.c#L45-e( 6atic int {6i 6      unsigned int  6      unsigned int ststtus = number;
 href="+code=end" cla href=;>num 0x3ffffff) ||sref">indirect_re/51}onnum ef">indirect_re/51}on 6      
 = number;
num 1000) 9"" id="L436" class="line" name="L436"6 424 6      ("i82092aa_init");
 6      
"Card detected in socket %i!\n"rrealid >em >ioef="d+code=i" clas:i" clallx/pcm" clallx/with a sref">i); id="L468" class="line" name="L468"6 603 6      acti in socket %i!\n"/s="s ofm" clax="sref">i);
 id="L468" class="line" name="L468"6 417}6      */* Check /a>,  6      
val(ss="sref"long"long)ef">indirect_re/51}on 6      if ((regval(ss="sref"long"long)ef">indirect_re/51}on 6              *val* Check /a>, number;
 href="+code=end" cla href=8" id="L468" class="line" name="L468"6 411 6      }
 6              
 6      /*6382092.c#L424" id="L424" class="line" name="L424"6 434 6      /*63CTL,
 6       if (sttus = (sock, I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is n9"lass="sref">I365_CS_POWEROENA_MEMlass="comment">cmciaENA_MEMsock, i3" id="L424" class="line" name="L424"6 603 6              atus = (I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is nef">I365_INTCTL) &ENA_MEMlass="comment">cmciaENA_MEMsock, i3"" id="L480" class="line" name="L480"6 417}6              if (!(/* Check   id="L480" class="line" name="L480"6 408 6                      *<6 href6"+code=value" class="s* Check   id="L480" class="line" name="L480"6 409 6       } else { (: Sioe" clas rang2/pcm" clax -m" clax pcm+code=i" clas, speee isi" clas, actlas =e" clas ia/i8209,>io, /51}on.ss="s,/51}on.ene,+cod,mem">numspeee,mem">numD" cl"lass="MAP_ACTIVE); c2.c#L449" id="L449" class="line" name="L449"6 440 6              if (!( 6                      *<6 href64i82092.c#L432sy */
 6              if (!(pccard_membasstring">"i8bassf">s | cmciaMEMsock, i3" id="L480" class="line" name="L480"6 433 6                      *<6 href64O cards have a = 0;
indirect_re/51}onnum>num 129"lass="0x0fff" id="L480" class="line" name="L480"6 434 6                      
<6 href6"drivers/pcmci">sttus = number;
tus =  6       }
SS_POWERONcmciaMEM_16BIa href="drivers/cmciaMEM_16BIaL480" id="L480" class="line" name="L480"6 436 6       
sttus = number;
tus =  6       if (/a = 0;
SS_POWERONcmciaMEM_0WS href="drivers/cmciaMEM_0WSL480"heck   id="L480" class="line" name="L480"6 428 6              (*)->      retur=sock" class="sref">1code=,I365_INTCTL"i8bassf">s+">I365_INTCTL,I365_INTCTL 6       
regvalCheck   id="L480" class="line" name="L480"6 450 6       if ( 6              (* 6              
pccard_memrindirect_re/51}onnum>num 129"lass="0x0fff" id="L480" class="line" name="L480"6 453 6       if (, number;
 6              (*
6a href="drivers/pcmcia/i62092.65drivers/pcmcia/i82092.c#L406"#L312" id="L312" class="line" name="L312"6 456
6a href="drivers/pcmcia/i62092.65code=active" class="scase 1: id="L312" class="line" name="L312"6 437 6      /* Check /a>, SS_POWERONcmciaMEM_WS0 href="drivers/cmciaMEM_WS0L480" id="L480" class="line" name="L480"6 458 6      return 0;
val#L312" id="L312" class="line" name="L312"6 449 6reg
6a href="drivers/pcmcia/i62092.66lue" class="sref">val* Check /a>, SS_POWERONcmciaMEM_WSref="drivers/pcmcia/iMEM_WSrL480" id="L480" class="line" name="L480"6 461
6a href="drivers/pcmcia/i62092.66code=csc" class="sref">cscs6atic int  6valass="sref">i820rSS_POWERONcmciaMEM_WSref="drivers/pcmcia/iMEM_WSrL480="sref">I365_PC_IOCARD 6      unsigned int csc
6      unsigned char  6      
sta id="L418" class="line" name="L418"6 437 6      )->      retur=sock" class="sref">1code=,I365_INTCTL"i8bassf">s+">I365_INTCTL,I365_INTCTL 6      
 6      /*66" class="sref/
 6      
i 6      indirect_wrnumber;
 href="+code=end" cla href=;- ef">indirect_re/51}onnum>num 129"lass="0x3fff" id="L480" class="line" name="L480"6 472 6      
sttus = number;
tus =  6      /*67+code=value" class="sass="sref">i820rSS_POWERONcmciaMEM_WRPROa href="drivers/cmciaMEM_WRPROaL480" id="L480" class="line" name="L480"6 464 6      
sttus = number;
tus =  6      emoryef="d+code=i" clas="sref">,+cod);2.c#L449" id="L449" class="line" name="L449"6 466 6      if (!(i820rSS_POWERONcmciaMEM_RE href="drivers/pcmciaMEM_RE L480" id="L480" class="line" name="L480"6 437 6               6      if (emoryef="d+code=i" clas="sref">,+cod);2.c#L449" id="L449" class="line" name="L449"6 449 6               6              
      retur=sock" class="sref">1code=,I365_INTCTL"i8bassf">s+">I365_INTCTL,I365_INTCTL 6       6      
snecessarye2.c#L449" id="L449" class="line" name="L449"6 48=event6" class="sref">eventssttus = number;
tus = 6365_I68drivers/pcmcia/i82092e((ersbi(struct I365_INTCTL) &ADDRWI href="drivers/pcmciaADDRWI is nef">I365_INTCTL) &ENA_MEMlass="comment">cmciaENA_MEMsock, i3"" id="L480" class="line" name="L480"6f="hs="sr6       6      status = "i82092aa_init");
 6      
 6       6      }6i82092aa_get_smodule_ini(struct  6a href="drivers/pcmcia/i62092.69+code  id="L439" class="line" name="L439"6 392
6a href="drivers/pcmcia/i62092.69092aa_set_mem2.c#L41ss="sref">i8209eti_/51}ster_ classstruct pcmcia_sock"aa_get_seti_ classstruct i82092aa_get_smodule_exi(struct  6    
 6atic int )->"i82092aa_set_socket");
 6pcmcia_sock"aa_get_seti_ classstruct  6      int sttus = ;
"i8io_bass cla>num0) id="L377" class="line" name="L377"7 400 7      struct val* Check  ef">indirect_re/5209se_/51}on;
"i8io_bass cla, 23" id="L480" class="line" name="L480"7 401 7      indirect_wss="string">"i82092aa_init");
 7       7  href="drivers/pcmcia/i7cmcia70+code id="L377" class="line" name="L377"7 402 7  href="drivers/pcmcia/i7r" cl70drive/a>, i82092aa_get_smodule_ini(struct  7  href="drivers/pcmcia/i7 href7"drive/a>, i82092aa_get_smodule_exi(struct  7    
 7 tic int 


(LXR