Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
pcmcia.c File Reference
#include <linux/ssb/ssb.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/etherdevice.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
#include <pcmcia/ds.h>
#include <pcmcia/cisreg.h>
#include "ssb_private.h"

Go to the source code of this file.

Macros

#define SSB_VERBOSE_PCMCIACORESWITCH_DEBUG   0
 
#define SSB_PCMCIA_ADDRESS0   0x2E
 
#define SSB_PCMCIA_ADDRESS1   0x30
 
#define SSB_PCMCIA_ADDRESS2   0x32
 
#define SSB_PCMCIA_MEMSEG   0x34
 
#define SSB_PCMCIA_SPROMCTL   0x36
 
#define SSB_PCMCIA_SPROMCTL_IDLE   0
 
#define SSB_PCMCIA_SPROMCTL_WRITE   1
 
#define SSB_PCMCIA_SPROMCTL_READ   2
 
#define SSB_PCMCIA_SPROMCTL_WRITEEN   4
 
#define SSB_PCMCIA_SPROMCTL_WRITEDIS   7
 
#define SSB_PCMCIA_SPROMCTL_DONE   8
 
#define SSB_PCMCIA_SPROM_DATALO   0x38
 
#define SSB_PCMCIA_SPROM_DATAHI   0x3A
 
#define SSB_PCMCIA_SPROM_ADDRLO   0x3C
 
#define SSB_PCMCIA_SPROM_ADDRHI   0x3E
 
#define SSB_PCMCIA_CIS   0x80
 
#define SSB_PCMCIA_CIS_ID   0x01
 
#define SSB_PCMCIA_CIS_BOARDREV   0x02
 
#define SSB_PCMCIA_CIS_PA   0x03
 
#define SSB_PCMCIA_CIS_PA_PA0B0_LO   0
 
#define SSB_PCMCIA_CIS_PA_PA0B0_HI   1
 
#define SSB_PCMCIA_CIS_PA_PA0B1_LO   2
 
#define SSB_PCMCIA_CIS_PA_PA0B1_HI   3
 
#define SSB_PCMCIA_CIS_PA_PA0B2_LO   4
 
#define SSB_PCMCIA_CIS_PA_PA0B2_HI   5
 
#define SSB_PCMCIA_CIS_PA_ITSSI   6
 
#define SSB_PCMCIA_CIS_PA_MAXPOW   7
 
#define SSB_PCMCIA_CIS_OEMNAME   0x04
 
#define SSB_PCMCIA_CIS_CCODE   0x05
 
#define SSB_PCMCIA_CIS_ANTENNA   0x06
 
#define SSB_PCMCIA_CIS_ANTGAIN   0x07
 
#define SSB_PCMCIA_CIS_BFLAGS   0x08
 
#define SSB_PCMCIA_CIS_LEDS   0x09
 
#define SSB_PCMCIA_SPROM_SIZE   256
 
#define SSB_PCMCIA_SPROM_SIZE_BYTES   (SSB_PCMCIA_SPROM_SIZE * sizeof(u16))
 
#define GOTO_ERROR_ON(condition, description)
 

Functions

int ssb_pcmcia_switch_coreidx (struct ssb_bus *bus, u8 coreidx)
 
int ssb_pcmcia_switch_core (struct ssb_bus *bus, struct ssb_device *dev)
 
int ssb_pcmcia_switch_segment (struct ssb_bus *bus, u8 seg)
 
int ssb_pcmcia_get_invariants (struct ssb_bus *bus, struct ssb_init_invariants *iv)
 
int ssb_pcmcia_hardware_setup (struct ssb_bus *bus)
 
void ssb_pcmcia_exit (struct ssb_bus *bus)
 
int ssb_pcmcia_init (struct ssb_bus *bus)
 

Variables

struct ssb_bus_ops ssb_pcmcia_ops
 

Macro Definition Documentation

#define GOTO_ERROR_ON (   condition,
  description 
)
Value:
do { \
if (unlikely(condition)) { \
error_description = description; \
goto error; \
} \
} while (0)

Definition at line 601 of file pcmcia.c.

#define SSB_PCMCIA_ADDRESS0   0x2E

Definition at line 29 of file pcmcia.c.

#define SSB_PCMCIA_ADDRESS1   0x30

Definition at line 30 of file pcmcia.c.

#define SSB_PCMCIA_ADDRESS2   0x32

Definition at line 31 of file pcmcia.c.

#define SSB_PCMCIA_CIS   0x80

Definition at line 46 of file pcmcia.c.

#define SSB_PCMCIA_CIS_ANTENNA   0x06

Definition at line 60 of file pcmcia.c.

#define SSB_PCMCIA_CIS_ANTGAIN   0x07

Definition at line 61 of file pcmcia.c.

#define SSB_PCMCIA_CIS_BFLAGS   0x08

Definition at line 62 of file pcmcia.c.

#define SSB_PCMCIA_CIS_BOARDREV   0x02

Definition at line 48 of file pcmcia.c.

#define SSB_PCMCIA_CIS_CCODE   0x05

Definition at line 59 of file pcmcia.c.

#define SSB_PCMCIA_CIS_ID   0x01

Definition at line 47 of file pcmcia.c.

#define SSB_PCMCIA_CIS_LEDS   0x09

Definition at line 63 of file pcmcia.c.

#define SSB_PCMCIA_CIS_OEMNAME   0x04

Definition at line 58 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA   0x03

Definition at line 49 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_ITSSI   6

Definition at line 56 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_MAXPOW   7

Definition at line 57 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B0_HI   1

Definition at line 51 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B0_LO   0

Definition at line 50 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B1_HI   3

Definition at line 53 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B1_LO   2

Definition at line 52 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B2_HI   5

Definition at line 55 of file pcmcia.c.

#define SSB_PCMCIA_CIS_PA_PA0B2_LO   4

Definition at line 54 of file pcmcia.c.

#define SSB_PCMCIA_MEMSEG   0x34

Definition at line 32 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_ADDRHI   0x3E

Definition at line 43 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_ADDRLO   0x3C

Definition at line 42 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_DATAHI   0x3A

Definition at line 41 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_DATALO   0x38

Definition at line 40 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_SIZE   256

Definition at line 66 of file pcmcia.c.

#define SSB_PCMCIA_SPROM_SIZE_BYTES   (SSB_PCMCIA_SPROM_SIZE * sizeof(u16))

Definition at line 67 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL   0x36

Definition at line 33 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_DONE   8

Definition at line 39 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_IDLE   0

Definition at line 34 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_READ   2

Definition at line 36 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_WRITE   1

Definition at line 35 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_WRITEDIS   7

Definition at line 38 of file pcmcia.c.

#define SSB_PCMCIA_SPROMCTL_WRITEEN   4

Definition at line 37 of file pcmcia.c.

#define SSB_VERBOSE_PCMCIACORESWITCH_DEBUG   0

Definition at line 25 of file pcmcia.c.

Function Documentation

void ssb_pcmcia_exit ( struct ssb_bus bus)

Definition at line 819 of file pcmcia.c.

int ssb_pcmcia_get_invariants ( struct ssb_bus bus,
struct ssb_init_invariants iv 
)

Definition at line 710 of file pcmcia.c.

int ssb_pcmcia_hardware_setup ( struct ssb_bus bus)

Definition at line 797 of file pcmcia.c.

int ssb_pcmcia_init ( struct ssb_bus bus)

Definition at line 827 of file pcmcia.c.

int ssb_pcmcia_switch_core ( struct ssb_bus bus,
struct ssb_device dev 
)

Definition at line 150 of file pcmcia.c.

int ssb_pcmcia_switch_coreidx ( struct ssb_bus bus,
u8  coreidx 
)

Definition at line 94 of file pcmcia.c.

int ssb_pcmcia_switch_segment ( struct ssb_bus bus,
u8  seg 
)

Definition at line 169 of file pcmcia.c.

Variable Documentation

struct ssb_bus_ops ssb_pcmcia_ops
Initial value:
= {
.read8 = ssb_pcmcia_read8,
.read16 = ssb_pcmcia_read16,
.read32 = ssb_pcmcia_read32,
.write8 = ssb_pcmcia_write8,
.write16 = ssb_pcmcia_write16,
.write32 = ssb_pcmcia_write32,
}

Definition at line 436 of file pcmcia.c.