Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sdhci.h File Reference
#include <linux/scatterlist.h>
#include <linux/compiler.h>
#include <linux/types.h>
#include <linux/io.h>
#include <linux/mmc/sdhci.h>

Go to the source code of this file.

Data Structures

struct  sdhci_ops
 

Macros

#define SDHCI_DMA_ADDRESS   0x00
 
#define SDHCI_ARGUMENT2   SDHCI_DMA_ADDRESS
 
#define SDHCI_BLOCK_SIZE   0x04
 
#define SDHCI_MAKE_BLKSZ(dma, blksz)   (((dma & 0x7) << 12) | (blksz & 0xFFF))
 
#define SDHCI_BLOCK_COUNT   0x06
 
#define SDHCI_ARGUMENT   0x08
 
#define SDHCI_TRANSFER_MODE   0x0C
 
#define SDHCI_TRNS_DMA   0x01
 
#define SDHCI_TRNS_BLK_CNT_EN   0x02
 
#define SDHCI_TRNS_AUTO_CMD12   0x04
 
#define SDHCI_TRNS_AUTO_CMD23   0x08
 
#define SDHCI_TRNS_READ   0x10
 
#define SDHCI_TRNS_MULTI   0x20
 
#define SDHCI_COMMAND   0x0E
 
#define SDHCI_CMD_RESP_MASK   0x03
 
#define SDHCI_CMD_CRC   0x08
 
#define SDHCI_CMD_INDEX   0x10
 
#define SDHCI_CMD_DATA   0x20
 
#define SDHCI_CMD_ABORTCMD   0xC0
 
#define SDHCI_CMD_RESP_NONE   0x00
 
#define SDHCI_CMD_RESP_LONG   0x01
 
#define SDHCI_CMD_RESP_SHORT   0x02
 
#define SDHCI_CMD_RESP_SHORT_BUSY   0x03
 
#define SDHCI_MAKE_CMD(c, f)   (((c & 0xff) << 8) | (f & 0xff))
 
#define SDHCI_GET_CMD(c)   ((c>>8) & 0x3f)
 
#define SDHCI_RESPONSE   0x10
 
#define SDHCI_BUFFER   0x20
 
#define SDHCI_PRESENT_STATE   0x24
 
#define SDHCI_CMD_INHIBIT   0x00000001
 
#define SDHCI_DATA_INHIBIT   0x00000002
 
#define SDHCI_DOING_WRITE   0x00000100
 
#define SDHCI_DOING_READ   0x00000200
 
#define SDHCI_SPACE_AVAILABLE   0x00000400
 
#define SDHCI_DATA_AVAILABLE   0x00000800
 
#define SDHCI_CARD_PRESENT   0x00010000
 
#define SDHCI_WRITE_PROTECT   0x00080000
 
#define SDHCI_DATA_LVL_MASK   0x00F00000
 
#define SDHCI_DATA_LVL_SHIFT   20
 
#define SDHCI_HOST_CONTROL   0x28
 
#define SDHCI_CTRL_LED   0x01
 
#define SDHCI_CTRL_4BITBUS   0x02
 
#define SDHCI_CTRL_HISPD   0x04
 
#define SDHCI_CTRL_DMA_MASK   0x18
 
#define SDHCI_CTRL_SDMA   0x00
 
#define SDHCI_CTRL_ADMA1   0x08
 
#define SDHCI_CTRL_ADMA32   0x10
 
#define SDHCI_CTRL_ADMA64   0x18
 
#define SDHCI_CTRL_8BITBUS   0x20
 
#define SDHCI_POWER_CONTROL   0x29
 
#define SDHCI_POWER_ON   0x01
 
#define SDHCI_POWER_180   0x0A
 
#define SDHCI_POWER_300   0x0C
 
#define SDHCI_POWER_330   0x0E
 
#define SDHCI_BLOCK_GAP_CONTROL   0x2A
 
#define SDHCI_WAKE_UP_CONTROL   0x2B
 
#define SDHCI_WAKE_ON_INT   0x01
 
#define SDHCI_WAKE_ON_INSERT   0x02
 
#define SDHCI_WAKE_ON_REMOVE   0x04
 
#define SDHCI_CLOCK_CONTROL   0x2C
 
#define SDHCI_DIVIDER_SHIFT   8
 
#define SDHCI_DIVIDER_HI_SHIFT   6
 
#define SDHCI_DIV_MASK   0xFF
 
#define SDHCI_DIV_MASK_LEN   8
 
#define SDHCI_DIV_HI_MASK   0x300
 
#define SDHCI_PROG_CLOCK_MODE   0x0020
 
#define SDHCI_CLOCK_CARD_EN   0x0004
 
#define SDHCI_CLOCK_INT_STABLE   0x0002
 
#define SDHCI_CLOCK_INT_EN   0x0001
 
#define SDHCI_TIMEOUT_CONTROL   0x2E
 
#define SDHCI_SOFTWARE_RESET   0x2F
 
#define SDHCI_RESET_ALL   0x01
 
#define SDHCI_RESET_CMD   0x02
 
#define SDHCI_RESET_DATA   0x04
 
#define SDHCI_INT_STATUS   0x30
 
#define SDHCI_INT_ENABLE   0x34
 
#define SDHCI_SIGNAL_ENABLE   0x38
 
#define SDHCI_INT_RESPONSE   0x00000001
 
#define SDHCI_INT_DATA_END   0x00000002
 
#define SDHCI_INT_DMA_END   0x00000008
 
#define SDHCI_INT_SPACE_AVAIL   0x00000010
 
#define SDHCI_INT_DATA_AVAIL   0x00000020
 
#define SDHCI_INT_CARD_INSERT   0x00000040
 
#define SDHCI_INT_CARD_REMOVE   0x00000080
 
#define SDHCI_INT_CARD_INT   0x00000100
 
#define SDHCI_INT_ERROR   0x00008000
 
#define SDHCI_INT_TIMEOUT   0x00010000
 
#define SDHCI_INT_CRC   0x00020000
 
#define SDHCI_INT_END_BIT   0x00040000
 
#define SDHCI_INT_INDEX   0x00080000
 
#define SDHCI_INT_DATA_TIMEOUT   0x00100000
 
#define SDHCI_INT_DATA_CRC   0x00200000
 
#define SDHCI_INT_DATA_END_BIT   0x00400000
 
#define SDHCI_INT_BUS_POWER   0x00800000
 
#define SDHCI_INT_ACMD12ERR   0x01000000
 
#define SDHCI_INT_ADMA_ERROR   0x02000000
 
#define SDHCI_INT_NORMAL_MASK   0x00007FFF
 
#define SDHCI_INT_ERROR_MASK   0xFFFF8000
 
#define SDHCI_INT_CMD_MASK
 
#define SDHCI_INT_DATA_MASK
 
#define SDHCI_INT_ALL_MASK   ((unsigned int)-1)
 
#define SDHCI_ACMD12_ERR   0x3C
 
#define SDHCI_HOST_CONTROL2   0x3E
 
#define SDHCI_CTRL_UHS_MASK   0x0007
 
#define SDHCI_CTRL_UHS_SDR12   0x0000
 
#define SDHCI_CTRL_UHS_SDR25   0x0001
 
#define SDHCI_CTRL_UHS_SDR50   0x0002
 
#define SDHCI_CTRL_UHS_SDR104   0x0003
 
#define SDHCI_CTRL_UHS_DDR50   0x0004
 
#define SDHCI_CTRL_HS_SDR200   0x0005 /* reserved value in SDIO spec */
 
#define SDHCI_CTRL_VDD_180   0x0008
 
#define SDHCI_CTRL_DRV_TYPE_MASK   0x0030
 
#define SDHCI_CTRL_DRV_TYPE_B   0x0000
 
#define SDHCI_CTRL_DRV_TYPE_A   0x0010
 
#define SDHCI_CTRL_DRV_TYPE_C   0x0020
 
#define SDHCI_CTRL_DRV_TYPE_D   0x0030
 
#define SDHCI_CTRL_EXEC_TUNING   0x0040
 
#define SDHCI_CTRL_TUNED_CLK   0x0080
 
#define SDHCI_CTRL_PRESET_VAL_ENABLE   0x8000
 
#define SDHCI_CAPABILITIES   0x40
 
#define SDHCI_TIMEOUT_CLK_MASK   0x0000003F
 
#define SDHCI_TIMEOUT_CLK_SHIFT   0
 
#define SDHCI_TIMEOUT_CLK_UNIT   0x00000080
 
#define SDHCI_CLOCK_BASE_MASK   0x00003F00
 
#define SDHCI_CLOCK_V3_BASE_MASK   0x0000FF00
 
#define SDHCI_CLOCK_BASE_SHIFT   8
 
#define SDHCI_MAX_BLOCK_MASK   0x00030000
 
#define SDHCI_MAX_BLOCK_SHIFT   16
 
#define SDHCI_CAN_DO_8BIT   0x00040000
 
#define SDHCI_CAN_DO_ADMA2   0x00080000
 
#define SDHCI_CAN_DO_ADMA1   0x00100000
 
#define SDHCI_CAN_DO_HISPD   0x00200000
 
#define SDHCI_CAN_DO_SDMA   0x00400000
 
#define SDHCI_CAN_VDD_330   0x01000000
 
#define SDHCI_CAN_VDD_300   0x02000000
 
#define SDHCI_CAN_VDD_180   0x04000000
 
#define SDHCI_CAN_64BIT   0x10000000
 
#define SDHCI_SUPPORT_SDR50   0x00000001
 
#define SDHCI_SUPPORT_SDR104   0x00000002
 
#define SDHCI_SUPPORT_DDR50   0x00000004
 
#define SDHCI_DRIVER_TYPE_A   0x00000010
 
#define SDHCI_DRIVER_TYPE_C   0x00000020
 
#define SDHCI_DRIVER_TYPE_D   0x00000040
 
#define SDHCI_RETUNING_TIMER_COUNT_MASK   0x00000F00
 
#define SDHCI_RETUNING_TIMER_COUNT_SHIFT   8
 
#define SDHCI_USE_SDR50_TUNING   0x00002000
 
#define SDHCI_RETUNING_MODE_MASK   0x0000C000
 
#define SDHCI_RETUNING_MODE_SHIFT   14
 
#define SDHCI_CLOCK_MUL_MASK   0x00FF0000
 
#define SDHCI_CLOCK_MUL_SHIFT   16
 
#define SDHCI_CAPABILITIES_1   0x44
 
#define SDHCI_MAX_CURRENT   0x48
 
#define SDHCI_MAX_CURRENT_LIMIT   0xFF
 
#define SDHCI_MAX_CURRENT_330_MASK   0x0000FF
 
#define SDHCI_MAX_CURRENT_330_SHIFT   0
 
#define SDHCI_MAX_CURRENT_300_MASK   0x00FF00
 
#define SDHCI_MAX_CURRENT_300_SHIFT   8
 
#define SDHCI_MAX_CURRENT_180_MASK   0xFF0000
 
#define SDHCI_MAX_CURRENT_180_SHIFT   16
 
#define SDHCI_MAX_CURRENT_MULTIPLIER   4
 
#define SDHCI_SET_ACMD12_ERROR   0x50
 
#define SDHCI_SET_INT_ERROR   0x52
 
#define SDHCI_ADMA_ERROR   0x54
 
#define SDHCI_ADMA_ADDRESS   0x58
 
#define SDHCI_SLOT_INT_STATUS   0xFC
 
#define SDHCI_HOST_VERSION   0xFE
 
#define SDHCI_VENDOR_VER_MASK   0xFF00
 
#define SDHCI_VENDOR_VER_SHIFT   8
 
#define SDHCI_SPEC_VER_MASK   0x00FF
 
#define SDHCI_SPEC_VER_SHIFT   0
 
#define SDHCI_SPEC_100   0
 
#define SDHCI_SPEC_200   1
 
#define SDHCI_SPEC_300   2
 
#define SDHCI_MAX_DIV_SPEC_200   256
 
#define SDHCI_MAX_DIV_SPEC_300   2046
 
#define SDHCI_DEFAULT_BOUNDARY_SIZE   (512 * 1024)
 
#define SDHCI_DEFAULT_BOUNDARY_ARG   (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12)
 

Functions

struct sdhci_hostsdhci_alloc_host (struct device *dev, size_t priv_size)
 
void sdhci_free_host (struct sdhci_host *host)
 
void sdhci_card_detect (struct sdhci_host *host)
 
int sdhci_add_host (struct sdhci_host *host)
 
void sdhci_remove_host (struct sdhci_host *host, int dead)
 

Macro Definition Documentation

#define SDHCI_ACMD12_ERR   0x3C

Definition at line 152 of file sdhci.h.

#define SDHCI_ADMA_ADDRESS   0x58

Definition at line 226 of file sdhci.h.

#define SDHCI_ADMA_ERROR   0x54

Definition at line 222 of file sdhci.h.

#define SDHCI_ARGUMENT   0x08

Definition at line 35 of file sdhci.h.

#define SDHCI_ARGUMENT2   SDHCI_DMA_ADDRESS

Definition at line 28 of file sdhci.h.

#define SDHCI_BLOCK_COUNT   0x06

Definition at line 33 of file sdhci.h.

#define SDHCI_BLOCK_GAP_CONTROL   0x2A

Definition at line 93 of file sdhci.h.

#define SDHCI_BLOCK_SIZE   0x04

Definition at line 30 of file sdhci.h.

#define SDHCI_BUFFER   0x20

Definition at line 62 of file sdhci.h.

#define SDHCI_CAN_64BIT   0x10000000

Definition at line 189 of file sdhci.h.

#define SDHCI_CAN_DO_8BIT   0x00040000

Definition at line 181 of file sdhci.h.

#define SDHCI_CAN_DO_ADMA1   0x00100000

Definition at line 183 of file sdhci.h.

#define SDHCI_CAN_DO_ADMA2   0x00080000

Definition at line 182 of file sdhci.h.

#define SDHCI_CAN_DO_HISPD   0x00200000

Definition at line 184 of file sdhci.h.

#define SDHCI_CAN_DO_SDMA   0x00400000

Definition at line 185 of file sdhci.h.

#define SDHCI_CAN_VDD_180   0x04000000

Definition at line 188 of file sdhci.h.

#define SDHCI_CAN_VDD_300   0x02000000

Definition at line 187 of file sdhci.h.

#define SDHCI_CAN_VDD_330   0x01000000

Definition at line 186 of file sdhci.h.

#define SDHCI_CAPABILITIES   0x40

Definition at line 172 of file sdhci.h.

#define SDHCI_CAPABILITIES_1   0x44

Definition at line 205 of file sdhci.h.

#define SDHCI_CARD_PRESENT   0x00010000

Definition at line 71 of file sdhci.h.

#define SDHCI_CLOCK_BASE_MASK   0x00003F00

Definition at line 176 of file sdhci.h.

#define SDHCI_CLOCK_BASE_SHIFT   8

Definition at line 178 of file sdhci.h.

#define SDHCI_CLOCK_CARD_EN   0x0004

Definition at line 107 of file sdhci.h.

#define SDHCI_CLOCK_CONTROL   0x2C

Definition at line 100 of file sdhci.h.

#define SDHCI_CLOCK_INT_EN   0x0001

Definition at line 109 of file sdhci.h.

#define SDHCI_CLOCK_INT_STABLE   0x0002

Definition at line 108 of file sdhci.h.

#define SDHCI_CLOCK_MUL_MASK   0x00FF0000

Definition at line 202 of file sdhci.h.

#define SDHCI_CLOCK_MUL_SHIFT   16

Definition at line 203 of file sdhci.h.

#define SDHCI_CLOCK_V3_BASE_MASK   0x0000FF00

Definition at line 177 of file sdhci.h.

#define SDHCI_CMD_ABORTCMD   0xC0

Definition at line 50 of file sdhci.h.

#define SDHCI_CMD_CRC   0x08

Definition at line 47 of file sdhci.h.

#define SDHCI_CMD_DATA   0x20

Definition at line 49 of file sdhci.h.

#define SDHCI_CMD_INDEX   0x10

Definition at line 48 of file sdhci.h.

#define SDHCI_CMD_INHIBIT   0x00000001

Definition at line 65 of file sdhci.h.

#define SDHCI_CMD_RESP_LONG   0x01

Definition at line 53 of file sdhci.h.

#define SDHCI_CMD_RESP_MASK   0x03

Definition at line 46 of file sdhci.h.

#define SDHCI_CMD_RESP_NONE   0x00

Definition at line 52 of file sdhci.h.

#define SDHCI_CMD_RESP_SHORT   0x02

Definition at line 54 of file sdhci.h.

#define SDHCI_CMD_RESP_SHORT_BUSY   0x03

Definition at line 55 of file sdhci.h.

#define SDHCI_COMMAND   0x0E

Definition at line 45 of file sdhci.h.

#define SDHCI_CTRL_4BITBUS   0x02

Definition at line 78 of file sdhci.h.

#define SDHCI_CTRL_8BITBUS   0x20

Definition at line 85 of file sdhci.h.

#define SDHCI_CTRL_ADMA1   0x08

Definition at line 82 of file sdhci.h.

#define SDHCI_CTRL_ADMA32   0x10

Definition at line 83 of file sdhci.h.

#define SDHCI_CTRL_ADMA64   0x18

Definition at line 84 of file sdhci.h.

#define SDHCI_CTRL_DMA_MASK   0x18

Definition at line 80 of file sdhci.h.

#define SDHCI_CTRL_DRV_TYPE_A   0x0010

Definition at line 165 of file sdhci.h.

#define SDHCI_CTRL_DRV_TYPE_B   0x0000

Definition at line 164 of file sdhci.h.

#define SDHCI_CTRL_DRV_TYPE_C   0x0020

Definition at line 166 of file sdhci.h.

#define SDHCI_CTRL_DRV_TYPE_D   0x0030

Definition at line 167 of file sdhci.h.

#define SDHCI_CTRL_DRV_TYPE_MASK   0x0030

Definition at line 163 of file sdhci.h.

#define SDHCI_CTRL_EXEC_TUNING   0x0040

Definition at line 168 of file sdhci.h.

#define SDHCI_CTRL_HISPD   0x04

Definition at line 79 of file sdhci.h.

#define SDHCI_CTRL_HS_SDR200   0x0005 /* reserved value in SDIO spec */

Definition at line 161 of file sdhci.h.

#define SDHCI_CTRL_LED   0x01

Definition at line 77 of file sdhci.h.

#define SDHCI_CTRL_PRESET_VAL_ENABLE   0x8000

Definition at line 170 of file sdhci.h.

#define SDHCI_CTRL_SDMA   0x00

Definition at line 81 of file sdhci.h.

#define SDHCI_CTRL_TUNED_CLK   0x0080

Definition at line 169 of file sdhci.h.

#define SDHCI_CTRL_UHS_DDR50   0x0004

Definition at line 160 of file sdhci.h.

#define SDHCI_CTRL_UHS_MASK   0x0007

Definition at line 155 of file sdhci.h.

#define SDHCI_CTRL_UHS_SDR104   0x0003

Definition at line 159 of file sdhci.h.

#define SDHCI_CTRL_UHS_SDR12   0x0000

Definition at line 156 of file sdhci.h.

#define SDHCI_CTRL_UHS_SDR25   0x0001

Definition at line 157 of file sdhci.h.

#define SDHCI_CTRL_UHS_SDR50   0x0002

Definition at line 158 of file sdhci.h.

#define SDHCI_CTRL_VDD_180   0x0008

Definition at line 162 of file sdhci.h.

#define SDHCI_DATA_AVAILABLE   0x00000800

Definition at line 70 of file sdhci.h.

#define SDHCI_DATA_INHIBIT   0x00000002

Definition at line 66 of file sdhci.h.

#define SDHCI_DATA_LVL_MASK   0x00F00000

Definition at line 73 of file sdhci.h.

#define SDHCI_DATA_LVL_SHIFT   20

Definition at line 74 of file sdhci.h.

#define SDHCI_DEFAULT_BOUNDARY_ARG   (ilog2(SDHCI_DEFAULT_BOUNDARY_SIZE) - 12)

Definition at line 252 of file sdhci.h.

#define SDHCI_DEFAULT_BOUNDARY_SIZE   (512 * 1024)

Definition at line 251 of file sdhci.h.

#define SDHCI_DIV_HI_MASK   0x300

Definition at line 105 of file sdhci.h.

#define SDHCI_DIV_MASK   0xFF

Definition at line 103 of file sdhci.h.

#define SDHCI_DIV_MASK_LEN   8

Definition at line 104 of file sdhci.h.

#define SDHCI_DIVIDER_HI_SHIFT   6

Definition at line 102 of file sdhci.h.

#define SDHCI_DIVIDER_SHIFT   8

Definition at line 101 of file sdhci.h.

#define SDHCI_DMA_ADDRESS   0x00

Definition at line 27 of file sdhci.h.

#define SDHCI_DOING_READ   0x00000200

Definition at line 68 of file sdhci.h.

#define SDHCI_DOING_WRITE   0x00000100

Definition at line 67 of file sdhci.h.

#define SDHCI_DRIVER_TYPE_A   0x00000010

Definition at line 194 of file sdhci.h.

#define SDHCI_DRIVER_TYPE_C   0x00000020

Definition at line 195 of file sdhci.h.

#define SDHCI_DRIVER_TYPE_D   0x00000040

Definition at line 196 of file sdhci.h.

#define SDHCI_GET_CMD (   c)    ((c>>8) & 0x3f)

Definition at line 58 of file sdhci.h.

#define SDHCI_HOST_CONTROL   0x28

Definition at line 76 of file sdhci.h.

#define SDHCI_HOST_CONTROL2   0x3E

Definition at line 154 of file sdhci.h.

#define SDHCI_HOST_VERSION   0xFE

Definition at line 232 of file sdhci.h.

#define SDHCI_INT_ACMD12ERR   0x01000000

Definition at line 138 of file sdhci.h.

#define SDHCI_INT_ADMA_ERROR   0x02000000

Definition at line 139 of file sdhci.h.

#define SDHCI_INT_ALL_MASK   ((unsigned int)-1)

Definition at line 150 of file sdhci.h.

#define SDHCI_INT_BUS_POWER   0x00800000

Definition at line 137 of file sdhci.h.

#define SDHCI_INT_CARD_INSERT   0x00000040

Definition at line 126 of file sdhci.h.

#define SDHCI_INT_CARD_INT   0x00000100

Definition at line 128 of file sdhci.h.

#define SDHCI_INT_CARD_REMOVE   0x00000080

Definition at line 127 of file sdhci.h.

#define SDHCI_INT_CMD_MASK
Value:

Definition at line 144 of file sdhci.h.

#define SDHCI_INT_CRC   0x00020000

Definition at line 131 of file sdhci.h.

#define SDHCI_INT_DATA_AVAIL   0x00000020

Definition at line 125 of file sdhci.h.

#define SDHCI_INT_DATA_CRC   0x00200000

Definition at line 135 of file sdhci.h.

#define SDHCI_INT_DATA_END   0x00000002

Definition at line 122 of file sdhci.h.

#define SDHCI_INT_DATA_END_BIT   0x00400000

Definition at line 136 of file sdhci.h.

#define SDHCI_INT_DATA_MASK
Value:
SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \
SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \
SDHCI_INT_DATA_END_BIT | SDHCI_INT_ADMA_ERROR)

Definition at line 146 of file sdhci.h.

#define SDHCI_INT_DATA_TIMEOUT   0x00100000

Definition at line 134 of file sdhci.h.

#define SDHCI_INT_DMA_END   0x00000008

Definition at line 123 of file sdhci.h.

#define SDHCI_INT_ENABLE   0x34

Definition at line 119 of file sdhci.h.

#define SDHCI_INT_END_BIT   0x00040000

Definition at line 132 of file sdhci.h.

#define SDHCI_INT_ERROR   0x00008000

Definition at line 129 of file sdhci.h.

#define SDHCI_INT_ERROR_MASK   0xFFFF8000

Definition at line 142 of file sdhci.h.

#define SDHCI_INT_INDEX   0x00080000

Definition at line 133 of file sdhci.h.

#define SDHCI_INT_NORMAL_MASK   0x00007FFF

Definition at line 141 of file sdhci.h.

#define SDHCI_INT_RESPONSE   0x00000001

Definition at line 121 of file sdhci.h.

#define SDHCI_INT_SPACE_AVAIL   0x00000010

Definition at line 124 of file sdhci.h.

#define SDHCI_INT_STATUS   0x30

Definition at line 118 of file sdhci.h.

#define SDHCI_INT_TIMEOUT   0x00010000

Definition at line 130 of file sdhci.h.

#define SDHCI_MAKE_BLKSZ (   dma,
  blksz 
)    (((dma & 0x7) << 12) | (blksz & 0xFFF))

Definition at line 31 of file sdhci.h.

#define SDHCI_MAKE_CMD (   c,
  f 
)    (((c & 0xff) << 8) | (f & 0xff))

Definition at line 57 of file sdhci.h.

#define SDHCI_MAX_BLOCK_MASK   0x00030000

Definition at line 179 of file sdhci.h.

#define SDHCI_MAX_BLOCK_SHIFT   16

Definition at line 180 of file sdhci.h.

#define SDHCI_MAX_CURRENT   0x48

Definition at line 207 of file sdhci.h.

#define SDHCI_MAX_CURRENT_180_MASK   0xFF0000

Definition at line 213 of file sdhci.h.

#define SDHCI_MAX_CURRENT_180_SHIFT   16

Definition at line 214 of file sdhci.h.

#define SDHCI_MAX_CURRENT_300_MASK   0x00FF00

Definition at line 211 of file sdhci.h.

#define SDHCI_MAX_CURRENT_300_SHIFT   8

Definition at line 212 of file sdhci.h.

#define SDHCI_MAX_CURRENT_330_MASK   0x0000FF

Definition at line 209 of file sdhci.h.

#define SDHCI_MAX_CURRENT_330_SHIFT   0

Definition at line 210 of file sdhci.h.

#define SDHCI_MAX_CURRENT_LIMIT   0xFF

Definition at line 208 of file sdhci.h.

#define SDHCI_MAX_CURRENT_MULTIPLIER   4

Definition at line 215 of file sdhci.h.

#define SDHCI_MAX_DIV_SPEC_200   256

Definition at line 245 of file sdhci.h.

#define SDHCI_MAX_DIV_SPEC_300   2046

Definition at line 246 of file sdhci.h.

#define SDHCI_POWER_180   0x0A

Definition at line 89 of file sdhci.h.

#define SDHCI_POWER_300   0x0C

Definition at line 90 of file sdhci.h.

#define SDHCI_POWER_330   0x0E

Definition at line 91 of file sdhci.h.

#define SDHCI_POWER_CONTROL   0x29

Definition at line 87 of file sdhci.h.

#define SDHCI_POWER_ON   0x01

Definition at line 88 of file sdhci.h.

#define SDHCI_PRESENT_STATE   0x24

Definition at line 64 of file sdhci.h.

#define SDHCI_PROG_CLOCK_MODE   0x0020

Definition at line 106 of file sdhci.h.

#define SDHCI_RESET_ALL   0x01

Definition at line 114 of file sdhci.h.

#define SDHCI_RESET_CMD   0x02

Definition at line 115 of file sdhci.h.

#define SDHCI_RESET_DATA   0x04

Definition at line 116 of file sdhci.h.

#define SDHCI_RESPONSE   0x10

Definition at line 60 of file sdhci.h.

#define SDHCI_RETUNING_MODE_MASK   0x0000C000

Definition at line 200 of file sdhci.h.

#define SDHCI_RETUNING_MODE_SHIFT   14

Definition at line 201 of file sdhci.h.

#define SDHCI_RETUNING_TIMER_COUNT_MASK   0x00000F00

Definition at line 197 of file sdhci.h.

#define SDHCI_RETUNING_TIMER_COUNT_SHIFT   8

Definition at line 198 of file sdhci.h.

#define SDHCI_SET_ACMD12_ERROR   0x50

Definition at line 219 of file sdhci.h.

#define SDHCI_SET_INT_ERROR   0x52

Definition at line 220 of file sdhci.h.

#define SDHCI_SIGNAL_ENABLE   0x38

Definition at line 120 of file sdhci.h.

#define SDHCI_SLOT_INT_STATUS   0xFC

Definition at line 230 of file sdhci.h.

#define SDHCI_SOFTWARE_RESET   0x2F

Definition at line 113 of file sdhci.h.

#define SDHCI_SPACE_AVAILABLE   0x00000400

Definition at line 69 of file sdhci.h.

#define SDHCI_SPEC_100   0

Definition at line 237 of file sdhci.h.

#define SDHCI_SPEC_200   1

Definition at line 238 of file sdhci.h.

#define SDHCI_SPEC_300   2

Definition at line 239 of file sdhci.h.

#define SDHCI_SPEC_VER_MASK   0x00FF

Definition at line 235 of file sdhci.h.

#define SDHCI_SPEC_VER_SHIFT   0

Definition at line 236 of file sdhci.h.

#define SDHCI_SUPPORT_DDR50   0x00000004

Definition at line 193 of file sdhci.h.

#define SDHCI_SUPPORT_SDR104   0x00000002

Definition at line 192 of file sdhci.h.

#define SDHCI_SUPPORT_SDR50   0x00000001

Definition at line 191 of file sdhci.h.

#define SDHCI_TIMEOUT_CLK_MASK   0x0000003F

Definition at line 173 of file sdhci.h.

#define SDHCI_TIMEOUT_CLK_SHIFT   0

Definition at line 174 of file sdhci.h.

#define SDHCI_TIMEOUT_CLK_UNIT   0x00000080

Definition at line 175 of file sdhci.h.

#define SDHCI_TIMEOUT_CONTROL   0x2E

Definition at line 111 of file sdhci.h.

#define SDHCI_TRANSFER_MODE   0x0C

Definition at line 37 of file sdhci.h.

#define SDHCI_TRNS_AUTO_CMD12   0x04

Definition at line 40 of file sdhci.h.

#define SDHCI_TRNS_AUTO_CMD23   0x08

Definition at line 41 of file sdhci.h.

#define SDHCI_TRNS_BLK_CNT_EN   0x02

Definition at line 39 of file sdhci.h.

#define SDHCI_TRNS_DMA   0x01

Definition at line 38 of file sdhci.h.

#define SDHCI_TRNS_MULTI   0x20

Definition at line 43 of file sdhci.h.

#define SDHCI_TRNS_READ   0x10

Definition at line 42 of file sdhci.h.

#define SDHCI_USE_SDR50_TUNING   0x00002000

Definition at line 199 of file sdhci.h.

#define SDHCI_VENDOR_VER_MASK   0xFF00

Definition at line 233 of file sdhci.h.

#define SDHCI_VENDOR_VER_SHIFT   8

Definition at line 234 of file sdhci.h.

#define SDHCI_WAKE_ON_INSERT   0x02

Definition at line 97 of file sdhci.h.

#define SDHCI_WAKE_ON_INT   0x01

Definition at line 96 of file sdhci.h.

#define SDHCI_WAKE_ON_REMOVE   0x04

Definition at line 98 of file sdhci.h.

#define SDHCI_WAKE_UP_CONTROL   0x2B

Definition at line 95 of file sdhci.h.

#define SDHCI_WRITE_PROTECT   0x00080000

Definition at line 72 of file sdhci.h.

Function Documentation

int sdhci_add_host ( struct sdhci_host host)

Definition at line 2647 of file sdhci.c.

struct sdhci_host* sdhci_alloc_host ( struct device dev,
size_t  priv_size 
)
read

Definition at line 2627 of file sdhci.c.

void sdhci_card_detect ( struct sdhci_host host)
void sdhci_free_host ( struct sdhci_host host)

Definition at line 3199 of file sdhci.c.

void sdhci_remove_host ( struct sdhci_host host,
int  dead 
)

Definition at line 3142 of file sdhci.c.