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

Go to the source code of this file.

Macros

#define SSB_VERBOSE_SDIOCORESWITCH_DEBUG   0
 
#define SSB_SDIO_CIS   0x80
 
#define SSB_SDIO_CIS_SROMREV   0x00
 
#define SSB_SDIO_CIS_ID   0x01
 
#define SSB_SDIO_CIS_BOARDREV   0x02
 
#define SSB_SDIO_CIS_PA   0x03
 
#define SSB_SDIO_CIS_PA_PA0B0_LO   0
 
#define SSB_SDIO_CIS_PA_PA0B0_HI   1
 
#define SSB_SDIO_CIS_PA_PA0B1_LO   2
 
#define SSB_SDIO_CIS_PA_PA0B1_HI   3
 
#define SSB_SDIO_CIS_PA_PA0B2_LO   4
 
#define SSB_SDIO_CIS_PA_PA0B2_HI   5
 
#define SSB_SDIO_CIS_PA_ITSSI   6
 
#define SSB_SDIO_CIS_PA_MAXPOW   7
 
#define SSB_SDIO_CIS_OEMNAME   0x04
 
#define SSB_SDIO_CIS_CCODE   0x05
 
#define SSB_SDIO_CIS_ANTENNA   0x06
 
#define SSB_SDIO_CIS_ANTGAIN   0x07
 
#define SSB_SDIO_CIS_BFLAGS   0x08
 
#define SSB_SDIO_CIS_LEDS   0x09
 
#define CISTPL_FUNCE_LAN_NODE_ID   0x04 /* same as in PCMCIA */
 
#define SBSDIO_FUNC1_SBADDRLOW   0x1000a /* SB Address window Low (b15) */
 
#define SBSDIO_FUNC1_SBADDRMID   0x1000b /* SB Address window Mid (b23-b16) */
 
#define SBSDIO_FUNC1_SBADDRHIGH   0x1000c /* SB Address window High (b24-b31) */
 
#define SBSDIO_SBADDRLOW_MASK   0x80 /* Valid address bits in SBADDRLOW */
 
#define SBSDIO_SBADDRMID_MASK   0xff /* Valid address bits in SBADDRMID */
 
#define SBSDIO_SBADDRHIGH_MASK   0xff /* Valid address bits in SBADDRHIGH */
 
#define SBSDIO_SB_OFT_ADDR_MASK   0x7FFF /* sb offset addr is <= 15 bits, 32k */
 
#define SBSDIO_SB_ACCESS_2_4B_FLAG   0x8000 /* forces 32-bit SB access */
 
#define GOTO_ERROR_ON(condition, description)
 

Functions

u32 ssb_sdio_scan_read32 (struct ssb_bus *bus, u16 offset)
 
int ssb_sdio_scan_switch_coreidx (struct ssb_bus *bus, u8 coreidx)
 
int ssb_sdio_switch_core (struct ssb_bus *bus, struct ssb_device *dev)
 
int ssb_sdio_get_invariants (struct ssb_bus *bus, struct ssb_init_invariants *iv)
 
void ssb_sdio_exit (struct ssb_bus *bus)
 
int ssb_sdio_init (struct ssb_bus *bus)
 

Variables

struct ssb_bus_ops ssb_sdio_ops
 

Macro Definition Documentation

#define CISTPL_FUNCE_LAN_NODE_ID   0x04 /* same as in PCMCIA */

Definition at line 48 of file sdio.c.

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

Definition at line 465 of file sdio.c.

#define SBSDIO_FUNC1_SBADDRHIGH   0x1000c /* SB Address window High (b24-b31) */

Definition at line 61 of file sdio.c.

#define SBSDIO_FUNC1_SBADDRLOW   0x1000a /* SB Address window Low (b15) */

Definition at line 59 of file sdio.c.

#define SBSDIO_FUNC1_SBADDRMID   0x1000b /* SB Address window Mid (b23-b16) */

Definition at line 60 of file sdio.c.

#define SBSDIO_SB_ACCESS_2_4B_FLAG   0x8000 /* forces 32-bit SB access */

Definition at line 71 of file sdio.c.

#define SBSDIO_SB_OFT_ADDR_MASK   0x7FFF /* sb offset addr is <= 15 bits, 32k */

Definition at line 68 of file sdio.c.

#define SBSDIO_SBADDRHIGH_MASK   0xff /* Valid address bits in SBADDRHIGH */

Definition at line 66 of file sdio.c.

#define SBSDIO_SBADDRLOW_MASK   0x80 /* Valid address bits in SBADDRLOW */

Definition at line 64 of file sdio.c.

#define SBSDIO_SBADDRMID_MASK   0xff /* Valid address bits in SBADDRMID */

Definition at line 65 of file sdio.c.

#define SSB_SDIO_CIS   0x80

Definition at line 28 of file sdio.c.

#define SSB_SDIO_CIS_ANTENNA   0x06

Definition at line 43 of file sdio.c.

#define SSB_SDIO_CIS_ANTGAIN   0x07

Definition at line 44 of file sdio.c.

#define SSB_SDIO_CIS_BFLAGS   0x08

Definition at line 45 of file sdio.c.

#define SSB_SDIO_CIS_BOARDREV   0x02

Definition at line 31 of file sdio.c.

#define SSB_SDIO_CIS_CCODE   0x05

Definition at line 42 of file sdio.c.

#define SSB_SDIO_CIS_ID   0x01

Definition at line 30 of file sdio.c.

#define SSB_SDIO_CIS_LEDS   0x09

Definition at line 46 of file sdio.c.

#define SSB_SDIO_CIS_OEMNAME   0x04

Definition at line 41 of file sdio.c.

#define SSB_SDIO_CIS_PA   0x03

Definition at line 32 of file sdio.c.

#define SSB_SDIO_CIS_PA_ITSSI   6

Definition at line 39 of file sdio.c.

#define SSB_SDIO_CIS_PA_MAXPOW   7

Definition at line 40 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B0_HI   1

Definition at line 34 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B0_LO   0

Definition at line 33 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B1_HI   3

Definition at line 36 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B1_LO   2

Definition at line 35 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B2_HI   5

Definition at line 38 of file sdio.c.

#define SSB_SDIO_CIS_PA_PA0B2_LO   4

Definition at line 37 of file sdio.c.

#define SSB_SDIO_CIS_SROMREV   0x00

Definition at line 29 of file sdio.c.

#define SSB_VERBOSE_SDIOCORESWITCH_DEBUG   0

Definition at line 24 of file sdio.c.

Function Documentation

void ssb_sdio_exit ( struct ssb_bus bus)

Definition at line 591 of file sdio.c.

int ssb_sdio_get_invariants ( struct ssb_bus bus,
struct ssb_init_invariants iv 
)

Definition at line 472 of file sdio.c.

int ssb_sdio_init ( struct ssb_bus bus)

Definition at line 598 of file sdio.c.

u32 ssb_sdio_scan_read32 ( struct ssb_bus bus,
u16  offset 
)

Definition at line 167 of file sdio.c.

int ssb_sdio_scan_switch_coreidx ( struct ssb_bus bus,
u8  coreidx 
)

Definition at line 184 of file sdio.c.

int ssb_sdio_switch_core ( struct ssb_bus bus,
struct ssb_device dev 
)

Definition at line 203 of file sdio.c.

Variable Documentation

struct ssb_bus_ops ssb_sdio_ops
Initial value:
= {
.read8 = ssb_sdio_read8,
.read16 = ssb_sdio_read16,
.read32 = ssb_sdio_read32,
.write8 = ssb_sdio_write8,
.write16 = ssb_sdio_write16,
.write32 = ssb_sdio_write32,
}

Definition at line 452 of file sdio.c.