#include <linux/ssb/ssb.h>
#include <linux/etherdevice.h>
#include <pcmcia/cistpl.h>
#include <pcmcia/ciscode.h>
#include <pcmcia/cisreg.h>
#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))
static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value)
res = pcmcia_write_config_byte(bus->host_pcmcia, offset, value);
static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value)
res = pcmcia_read_config_byte(bus->host_pcmcia, offset, value);