Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
sd.h File Reference
#include "rts51x_chip.h"

Go to the source code of this file.

Data Structures

struct  timing_phase_path
 

Macros

#define SD_MAX_RETRY_COUNT   3
 
#define SUPPORT_VOLTAGE   0x003C0000
 
#define SD_RESET_FAIL   0x01
 
#define MMC_RESET_FAIL   0x02
 
#define SD_NO_ERROR   0x0
 
#define SD_CRC_ERR   0x80
 
#define SD_TO_ERR   0x40
 
#define SD_NO_CARD   0x20
 
#define SD_BUSY   0x10
 
#define SD_STS_ERR   0x08
 
#define SD_RSP_TIMEOUT   0x04
 
#define GO_IDLE_STATE   0
 
#define SEND_OP_COND   1 /* reserved for SD */
 
#define ALL_SEND_CID   2
 
#define SET_RELATIVE_ADDR   3
 
#define SEND_RELATIVE_ADDR   3
 
#define SET_DSR   4
 
#define IO_SEND_OP_COND   5
 
#define SWITCH   6
 
#define SELECT_CARD   7
 
#define DESELECT_CARD   7
 
#define SEND_EXT_CSD   8
 
#define SEND_IF_COND   8
 
#define SEND_CSD   9
 
#define SEND_CID   10
 
#define VOLTAGE_SWITCH   11
 
#define READ_DAT_UTIL_STOP   11 /* reserved for SD */
 
#define STOP_TRANSMISSION   12
 
#define SEND_STATUS   13
 
#define GO_INACTIVE_STATE   15
 
#define SET_BLOCKLEN   16
 
#define READ_SINGLE_BLOCK   17
 
#define READ_MULTIPLE_BLOCK   18
 
#define SEND_TUNING_PATTERN   19
 
#define BUSTEST_R   14
 
#define BUSTEST_W   19
 
#define WRITE_BLOCK   24
 
#define WRITE_MULTIPLE_BLOCK   25
 
#define PROGRAM_CSD   27
 
#define ERASE_WR_BLK_START   32
 
#define ERASE_WR_BLK_END   33
 
#define ERASE_CMD   38
 
#define LOCK_UNLOCK   42
 
#define IO_RW_DIRECT   52
 
#define APP_CMD   55
 
#define GEN_CMD   56
 
#define SET_BUS_WIDTH   6
 
#define SD_STATUS   13
 
#define SEND_NUM_WR_BLOCKS   22
 
#define SET_WR_BLK_ERASE_COUNT   23
 
#define SD_APP_OP_COND   41
 
#define SET_CLR_CARD_DETECT   42
 
#define SEND_SCR   51
 
#define SD_READ_COMPLETE   0x00
 
#define SD_READ_TO   0x01
 
#define SD_READ_ADVENCE   0x02
 
#define SD_CHECK_MODE   0x00
 
#define SD_SWITCH_MODE   0x80
 
#define SD_FUNC_GROUP_1   0x01
 
#define SD_FUNC_GROUP_2   0x02
 
#define SD_FUNC_GROUP_3   0x03
 
#define SD_FUNC_GROUP_4   0x04
 
#define SD_CHECK_SPEC_V1_1   0xFF
 
#define NO_ARGUMENT   0x00
 
#define CHECK_PATTERN   0x000000AA
 
#define VOLTAGE_SUPPLY_RANGE   0x00000100 /* 2.7~3.6V */
 
#define SUPPORT_HIGH_AND_EXTENDED_CAPACITY   0x40000000
 
#define SUPPORT_MAX_POWER_PERMANCE   0x10000000
 
#define SUPPORT_1V8   0x01000000
 
#define SWTICH_NO_ERR   0x00
 
#define CARD_NOT_EXIST   0x01
 
#define SPEC_NOT_SUPPORT   0x02
 
#define CHECK_MODE_ERR   0x03
 
#define CHECK_NOT_READY   0x04
 
#define SWITCH_CRC_ERR   0x05
 
#define SWITCH_MODE_ERR   0x06
 
#define SWITCH_PASS   0x07
 
#define HS_SUPPORT   0x01
 
#define SDR50_SUPPORT   0x02
 
#define SDR104_SUPPORT   0x03
 
#define DDR50_SUPPORT   0x04
 
#define HS_SUPPORT_MASK   0x02
 
#define SDR50_SUPPORT_MASK   0x04
 
#define SDR104_SUPPORT_MASK   0x08
 
#define DDR50_SUPPORT_MASK   0x10
 
#define HS_QUERY_SWITCH_OK   0x01
 
#define SDR50_QUERY_SWITCH_OK   0x02
 
#define SDR104_QUERY_SWITCH_OK   0x03
 
#define DDR50_QUERY_SWITCH_OK   0x04
 
#define HS_SWITCH_BUSY   0x02
 
#define SDR50_SWITCH_BUSY   0x04
 
#define SDR104_SWITCH_BUSY   0x08
 
#define DDR50_SWITCH_BUSY   0x10
 
#define FUNCTION_GROUP1_SUPPORT_OFFSET   0x0D
 
#define FUNCTION_GROUP1_QUERY_SWITCH_OFFSET   0x10
 
#define FUNCTION_GROUP1_CHECK_BUSY_OFFSET   0x1D
 
#define DRIVING_TYPE_A   0x01
 
#define DRIVING_TYPE_B   0x00
 
#define DRIVING_TYPE_C   0x02
 
#define DRIVING_TYPE_D   0x03
 
#define DRIVING_TYPE_A_MASK   0x02
 
#define DRIVING_TYPE_B_MASK   0x01
 
#define DRIVING_TYPE_C_MASK   0x04
 
#define DRIVING_TYPE_D_MASK   0x08
 
#define TYPE_A_QUERY_SWITCH_OK   0x01
 
#define TYPE_B_QUERY_SWITCH_OK   0x00
 
#define TYPE_C_QUERY_SWITCH_OK   0x02
 
#define TYPE_D_QUERY_SWITCH_OK   0x03
 
#define TYPE_A_SWITCH_BUSY   0x02
 
#define TYPE_B_SWITCH_BUSY   0x01
 
#define TYPE_C_SWITCH_BUSY   0x04
 
#define TYPE_D_SWITCH_BUSY   0x08
 
#define FUNCTION_GROUP3_SUPPORT_OFFSET   0x09
 
#define FUNCTION_GROUP3_QUERY_SWITCH_OFFSET   0x0F
 
#define FUNCTION_GROUP3_CHECK_BUSY_OFFSET   0x19
 
#define CURRENT_LIMIT_200   0x00
 
#define CURRENT_LIMIT_400   0x01
 
#define CURRENT_LIMIT_600   0x02
 
#define CURRENT_LIMIT_800   0x03
 
#define CURRENT_LIMIT_200_MASK   0x01
 
#define CURRENT_LIMIT_400_MASK   0x02
 
#define CURRENT_LIMIT_600_MASK   0x04
 
#define CURRENT_LIMIT_800_MASK   0x08
 
#define CURRENT_LIMIT_200_QUERY_SWITCH_OK   0x00
 
#define CURRENT_LIMIT_400_QUERY_SWITCH_OK   0x01
 
#define CURRENT_LIMIT_600_QUERY_SWITCH_OK   0x02
 
#define CURRENT_LIMIT_800_QUERY_SWITCH_OK   0x03
 
#define CURRENT_LIMIT_200_SWITCH_BUSY   0x01
 
#define CURRENT_LIMIT_400_SWITCH_BUSY   0x02
 
#define CURRENT_LIMIT_600_SWITCH_BUSY   0x04
 
#define CURRENT_LIMIT_800_SWITCH_BUSY   0x08
 
#define FUNCTION_GROUP4_SUPPORT_OFFSET   0x07
 
#define FUNCTION_GROUP4_QUERY_SWITCH_OFFSET   0x0F
 
#define FUNCTION_GROUP4_CHECK_BUSY_OFFSET   0x17
 
#define DATA_STRUCTURE_VER_OFFSET   0x11 /* The high offset */
 
#define MAX_PHASE   15
 
#define MMC_8BIT_BUS   0x0010
 
#define MMC_4BIT_BUS   0x0020
 
#define MMC_SWITCH_ERR   0x80
 
#define TUNE_TX   0x00
 
#define TUNE_RX   0x01
 
#define CHANGE_TX   0x00
 
#define CHANGE_RX   0x01
 
#define DCM_HIGH_FREQUENCY_MODE   0x00
 
#define DCM_LOW_FREQUENCY_MODE   0x01
 
#define DCM_HIGH_FREQUENCY_MODE_SET   0x0C
 
#define DCM_Low_FREQUENCY_MODE_SET   0x00
 
#define MULTIPLY_BY_1   0x00
 
#define MULTIPLY_BY_2   0x01
 
#define MULTIPLY_BY_3   0x02
 
#define MULTIPLY_BY_4   0x03
 
#define MULTIPLY_BY_5   0x04
 
#define MULTIPLY_BY_6   0x05
 
#define MULTIPLY_BY_7   0x06
 
#define MULTIPLY_BY_8   0x07
 
#define MULTIPLY_BY_9   0x08
 
#define MULTIPLY_BY_10   0x09
 
#define DIVIDE_BY_2   0x01
 
#define DIVIDE_BY_3   0x02
 
#define DIVIDE_BY_4   0x03
 
#define DIVIDE_BY_5   0x04
 
#define DIVIDE_BY_6   0x05
 
#define DIVIDE_BY_7   0x06
 
#define DIVIDE_BY_8   0x07
 
#define DIVIDE_BY_9   0x08
 
#define DIVIDE_BY_10   0x09
 
#define CHECK_SD_TRANS_FAIL(chip, retval)
 

Functions

int sd_select_card (struct rts51x_chip *chip, int select)
 
int reset_sd_card (struct rts51x_chip *chip)
 
int sd_switch_clock (struct rts51x_chip *chip)
 
int sd_rw (struct scsi_cmnd *srb, struct rts51x_chip *chip, u32 start_sector, u16 sector_cnt)
 
void sd_cleanup_work (struct rts51x_chip *chip)
 
int release_sd_card (struct rts51x_chip *chip)
 
int reset_sd (struct rts51x_chip *chip)
 
int sd_check_data0_status (struct rts51x_chip *chip)
 
int sd_read_data (struct rts51x_chip *chip, u8 trans_mode, u8 *cmd, int cmd_len, u16 byte_cnt, u16 blk_cnt, u8 bus_width, u8 *buf, int buf_len, int timeout)
 

Macro Definition Documentation

#define ALL_SEND_CID   2

Definition at line 52 of file sd.h.

#define APP_CMD   55

Definition at line 100 of file sd.h.

#define BUSTEST_R   14

Definition at line 80 of file sd.h.

#define BUSTEST_W   19

Definition at line 81 of file sd.h.

#define CARD_NOT_EXIST   0x01

Definition at line 136 of file sd.h.

#define CHANGE_RX   0x01

Definition at line 222 of file sd.h.

#define CHANGE_TX   0x00

Definition at line 221 of file sd.h.

#define CHECK_MODE_ERR   0x03

Definition at line 138 of file sd.h.

#define CHECK_NOT_READY   0x04

Definition at line 139 of file sd.h.

#define CHECK_PATTERN   0x000000AA

Definition at line 128 of file sd.h.

#define CHECK_SD_TRANS_FAIL (   chip,
  retval 
)
Value:
(((retval) != STATUS_SUCCESS) || \
(chip->rsp_buf[0] & SD_TRANSFER_ERR))

Definition at line 247 of file sd.h.

#define CURRENT_LIMIT_200   0x00

Definition at line 186 of file sd.h.

#define CURRENT_LIMIT_200_MASK   0x01

Definition at line 190 of file sd.h.

#define CURRENT_LIMIT_200_QUERY_SWITCH_OK   0x00

Definition at line 194 of file sd.h.

#define CURRENT_LIMIT_200_SWITCH_BUSY   0x01

Definition at line 198 of file sd.h.

#define CURRENT_LIMIT_400   0x01

Definition at line 187 of file sd.h.

#define CURRENT_LIMIT_400_MASK   0x02

Definition at line 191 of file sd.h.

#define CURRENT_LIMIT_400_QUERY_SWITCH_OK   0x01

Definition at line 195 of file sd.h.

#define CURRENT_LIMIT_400_SWITCH_BUSY   0x02

Definition at line 199 of file sd.h.

#define CURRENT_LIMIT_600   0x02

Definition at line 188 of file sd.h.

#define CURRENT_LIMIT_600_MASK   0x04

Definition at line 192 of file sd.h.

#define CURRENT_LIMIT_600_QUERY_SWITCH_OK   0x02

Definition at line 196 of file sd.h.

#define CURRENT_LIMIT_600_SWITCH_BUSY   0x04

Definition at line 200 of file sd.h.

#define CURRENT_LIMIT_800   0x03

Definition at line 189 of file sd.h.

#define CURRENT_LIMIT_800_MASK   0x08

Definition at line 193 of file sd.h.

#define CURRENT_LIMIT_800_QUERY_SWITCH_OK   0x03

Definition at line 197 of file sd.h.

#define CURRENT_LIMIT_800_SWITCH_BUSY   0x08

Definition at line 201 of file sd.h.

#define DATA_STRUCTURE_VER_OFFSET   0x11 /* The high offset */

Definition at line 206 of file sd.h.

#define DCM_HIGH_FREQUENCY_MODE   0x00

Definition at line 223 of file sd.h.

#define DCM_HIGH_FREQUENCY_MODE_SET   0x0C

Definition at line 225 of file sd.h.

#define DCM_LOW_FREQUENCY_MODE   0x01

Definition at line 224 of file sd.h.

#define DCM_Low_FREQUENCY_MODE_SET   0x00

Definition at line 226 of file sd.h.

#define DDR50_QUERY_SWITCH_OK   0x04

Definition at line 157 of file sd.h.

#define DDR50_SUPPORT   0x04

Definition at line 149 of file sd.h.

#define DDR50_SUPPORT_MASK   0x10

Definition at line 153 of file sd.h.

#define DDR50_SWITCH_BUSY   0x10

Definition at line 161 of file sd.h.

#define DESELECT_CARD   7

Definition at line 59 of file sd.h.

#define DIVIDE_BY_10   0x09

Definition at line 246 of file sd.h.

#define DIVIDE_BY_2   0x01

Definition at line 238 of file sd.h.

#define DIVIDE_BY_3   0x02

Definition at line 239 of file sd.h.

#define DIVIDE_BY_4   0x03

Definition at line 240 of file sd.h.

#define DIVIDE_BY_5   0x04

Definition at line 241 of file sd.h.

#define DIVIDE_BY_6   0x05

Definition at line 242 of file sd.h.

#define DIVIDE_BY_7   0x06

Definition at line 243 of file sd.h.

#define DIVIDE_BY_8   0x07

Definition at line 244 of file sd.h.

#define DIVIDE_BY_9   0x08

Definition at line 245 of file sd.h.

#define DRIVING_TYPE_A   0x01

Definition at line 166 of file sd.h.

#define DRIVING_TYPE_A_MASK   0x02

Definition at line 170 of file sd.h.

#define DRIVING_TYPE_B   0x00

Definition at line 167 of file sd.h.

#define DRIVING_TYPE_B_MASK   0x01

Definition at line 171 of file sd.h.

#define DRIVING_TYPE_C   0x02

Definition at line 168 of file sd.h.

#define DRIVING_TYPE_C_MASK   0x04

Definition at line 172 of file sd.h.

#define DRIVING_TYPE_D   0x03

Definition at line 169 of file sd.h.

#define DRIVING_TYPE_D_MASK   0x08

Definition at line 173 of file sd.h.

#define ERASE_CMD   38

Definition at line 92 of file sd.h.

#define ERASE_WR_BLK_END   33

Definition at line 91 of file sd.h.

#define ERASE_WR_BLK_START   32

Definition at line 90 of file sd.h.

#define FUNCTION_GROUP1_CHECK_BUSY_OFFSET   0x1D

Definition at line 164 of file sd.h.

#define FUNCTION_GROUP1_QUERY_SWITCH_OFFSET   0x10

Definition at line 163 of file sd.h.

#define FUNCTION_GROUP1_SUPPORT_OFFSET   0x0D

Definition at line 162 of file sd.h.

#define FUNCTION_GROUP3_CHECK_BUSY_OFFSET   0x19

Definition at line 184 of file sd.h.

#define FUNCTION_GROUP3_QUERY_SWITCH_OFFSET   0x0F

Definition at line 183 of file sd.h.

#define FUNCTION_GROUP3_SUPPORT_OFFSET   0x09

Definition at line 182 of file sd.h.

#define FUNCTION_GROUP4_CHECK_BUSY_OFFSET   0x17

Definition at line 204 of file sd.h.

#define FUNCTION_GROUP4_QUERY_SWITCH_OFFSET   0x0F

Definition at line 203 of file sd.h.

#define FUNCTION_GROUP4_SUPPORT_OFFSET   0x07

Definition at line 202 of file sd.h.

#define GEN_CMD   56

Definition at line 101 of file sd.h.

#define GO_IDLE_STATE   0

Definition at line 50 of file sd.h.

#define GO_INACTIVE_STATE   15

Definition at line 71 of file sd.h.

#define HS_QUERY_SWITCH_OK   0x01

Definition at line 154 of file sd.h.

#define HS_SUPPORT   0x01

Definition at line 146 of file sd.h.

#define HS_SUPPORT_MASK   0x02

Definition at line 150 of file sd.h.

#define HS_SWITCH_BUSY   0x02

Definition at line 158 of file sd.h.

#define IO_RW_DIRECT   52

Definition at line 97 of file sd.h.

#define IO_SEND_OP_COND   5

Definition at line 56 of file sd.h.

#define LOCK_UNLOCK   42

Definition at line 95 of file sd.h.

#define MAX_PHASE   15

Definition at line 207 of file sd.h.

#define MMC_4BIT_BUS   0x0020

Definition at line 214 of file sd.h.

#define MMC_8BIT_BUS   0x0010

Definition at line 213 of file sd.h.

#define MMC_RESET_FAIL   0x02

Definition at line 37 of file sd.h.

#define MMC_SWITCH_ERR   0x80

Definition at line 216 of file sd.h.

#define MULTIPLY_BY_1   0x00

Definition at line 228 of file sd.h.

#define MULTIPLY_BY_10   0x09

Definition at line 237 of file sd.h.

#define MULTIPLY_BY_2   0x01

Definition at line 229 of file sd.h.

#define MULTIPLY_BY_3   0x02

Definition at line 230 of file sd.h.

#define MULTIPLY_BY_4   0x03

Definition at line 231 of file sd.h.

#define MULTIPLY_BY_5   0x04

Definition at line 232 of file sd.h.

#define MULTIPLY_BY_6   0x05

Definition at line 233 of file sd.h.

#define MULTIPLY_BY_7   0x06

Definition at line 234 of file sd.h.

#define MULTIPLY_BY_8   0x07

Definition at line 235 of file sd.h.

#define MULTIPLY_BY_9   0x08

Definition at line 236 of file sd.h.

#define NO_ARGUMENT   0x00

Definition at line 127 of file sd.h.

#define PROGRAM_CSD   27

Definition at line 87 of file sd.h.

#define READ_DAT_UTIL_STOP   11 /* reserved for SD */

Definition at line 68 of file sd.h.

#define READ_MULTIPLE_BLOCK   18

Definition at line 76 of file sd.h.

#define READ_SINGLE_BLOCK   17

Definition at line 75 of file sd.h.

#define SD_APP_OP_COND   41

Definition at line 108 of file sd.h.

#define SD_BUSY   0x10

Definition at line 44 of file sd.h.

#define SD_CHECK_MODE   0x00

Definition at line 118 of file sd.h.

#define SD_CHECK_SPEC_V1_1   0xFF

Definition at line 124 of file sd.h.

#define SD_CRC_ERR   0x80

Definition at line 41 of file sd.h.

#define SD_FUNC_GROUP_1   0x01

Definition at line 120 of file sd.h.

#define SD_FUNC_GROUP_2   0x02

Definition at line 121 of file sd.h.

#define SD_FUNC_GROUP_3   0x03

Definition at line 122 of file sd.h.

#define SD_FUNC_GROUP_4   0x04

Definition at line 123 of file sd.h.

#define SD_MAX_RETRY_COUNT   3

Definition at line 32 of file sd.h.

#define SD_NO_CARD   0x20

Definition at line 43 of file sd.h.

#define SD_NO_ERROR   0x0

Definition at line 40 of file sd.h.

#define SD_READ_ADVENCE   0x02

Definition at line 115 of file sd.h.

#define SD_READ_COMPLETE   0x00

Definition at line 113 of file sd.h.

#define SD_READ_TO   0x01

Definition at line 114 of file sd.h.

#define SD_RESET_FAIL   0x01

Definition at line 36 of file sd.h.

#define SD_RSP_TIMEOUT   0x04

Definition at line 46 of file sd.h.

#define SD_STATUS   13

Definition at line 105 of file sd.h.

#define SD_STS_ERR   0x08

Definition at line 45 of file sd.h.

#define SD_SWITCH_MODE   0x80

Definition at line 119 of file sd.h.

#define SD_TO_ERR   0x40

Definition at line 42 of file sd.h.

#define SDR104_QUERY_SWITCH_OK   0x03

Definition at line 156 of file sd.h.

#define SDR104_SUPPORT   0x03

Definition at line 148 of file sd.h.

#define SDR104_SUPPORT_MASK   0x08

Definition at line 152 of file sd.h.

#define SDR104_SWITCH_BUSY   0x08

Definition at line 160 of file sd.h.

#define SDR50_QUERY_SWITCH_OK   0x02

Definition at line 155 of file sd.h.

#define SDR50_SUPPORT   0x02

Definition at line 147 of file sd.h.

#define SDR50_SUPPORT_MASK   0x04

Definition at line 151 of file sd.h.

#define SDR50_SWITCH_BUSY   0x04

Definition at line 159 of file sd.h.

#define SELECT_CARD   7

Definition at line 58 of file sd.h.

#define SEND_CID   10

Definition at line 66 of file sd.h.

#define SEND_CSD   9

Definition at line 65 of file sd.h.

#define SEND_EXT_CSD   8

Definition at line 62 of file sd.h.

#define SEND_IF_COND   8

Definition at line 63 of file sd.h.

#define SEND_NUM_WR_BLOCKS   22

Definition at line 106 of file sd.h.

#define SEND_OP_COND   1 /* reserved for SD */

Definition at line 51 of file sd.h.

#define SEND_RELATIVE_ADDR   3

Definition at line 54 of file sd.h.

#define SEND_SCR   51

Definition at line 110 of file sd.h.

#define SEND_STATUS   13

Definition at line 70 of file sd.h.

#define SEND_TUNING_PATTERN   19

Definition at line 77 of file sd.h.

#define SET_BLOCKLEN   16

Definition at line 74 of file sd.h.

#define SET_BUS_WIDTH   6

Definition at line 104 of file sd.h.

#define SET_CLR_CARD_DETECT   42

Definition at line 109 of file sd.h.

#define SET_DSR   4

Definition at line 55 of file sd.h.

#define SET_RELATIVE_ADDR   3

Definition at line 53 of file sd.h.

#define SET_WR_BLK_ERASE_COUNT   23

Definition at line 107 of file sd.h.

#define SPEC_NOT_SUPPORT   0x02

Definition at line 137 of file sd.h.

#define STOP_TRANSMISSION   12

Definition at line 69 of file sd.h.

#define SUPPORT_1V8   0x01000000

Definition at line 132 of file sd.h.

#define SUPPORT_HIGH_AND_EXTENDED_CAPACITY   0x40000000

Definition at line 130 of file sd.h.

#define SUPPORT_MAX_POWER_PERMANCE   0x10000000

Definition at line 131 of file sd.h.

#define SUPPORT_VOLTAGE   0x003C0000

Definition at line 34 of file sd.h.

#define SWITCH   6

Definition at line 57 of file sd.h.

#define SWITCH_CRC_ERR   0x05

Definition at line 140 of file sd.h.

#define SWITCH_MODE_ERR   0x06

Definition at line 141 of file sd.h.

#define SWITCH_PASS   0x07

Definition at line 142 of file sd.h.

#define SWTICH_NO_ERR   0x00

Definition at line 135 of file sd.h.

#define TUNE_RX   0x01

Definition at line 219 of file sd.h.

#define TUNE_TX   0x00

Definition at line 218 of file sd.h.

#define TYPE_A_QUERY_SWITCH_OK   0x01

Definition at line 174 of file sd.h.

#define TYPE_A_SWITCH_BUSY   0x02

Definition at line 178 of file sd.h.

#define TYPE_B_QUERY_SWITCH_OK   0x00

Definition at line 175 of file sd.h.

#define TYPE_B_SWITCH_BUSY   0x01

Definition at line 179 of file sd.h.

#define TYPE_C_QUERY_SWITCH_OK   0x02

Definition at line 176 of file sd.h.

#define TYPE_C_SWITCH_BUSY   0x04

Definition at line 180 of file sd.h.

#define TYPE_D_QUERY_SWITCH_OK   0x03

Definition at line 177 of file sd.h.

#define TYPE_D_SWITCH_BUSY   0x08

Definition at line 181 of file sd.h.

#define VOLTAGE_SUPPLY_RANGE   0x00000100 /* 2.7~3.6V */

Definition at line 129 of file sd.h.

#define VOLTAGE_SWITCH   11

Definition at line 67 of file sd.h.

#define WRITE_BLOCK   24

Definition at line 85 of file sd.h.

#define WRITE_MULTIPLE_BLOCK   25

Definition at line 86 of file sd.h.

Function Documentation

int release_sd_card ( struct rts51x_chip chip)

Definition at line 3223 of file sd.c.

int reset_sd ( struct rts51x_chip chip)

Definition at line 1963 of file sd.c.

int reset_sd_card ( struct rts51x_chip chip)

Definition at line 2751 of file sd.c.

int sd_check_data0_status ( struct rts51x_chip chip)

Definition at line 85 of file sd.c.

void sd_cleanup_work ( struct rts51x_chip chip)

Definition at line 3171 of file sd.c.

int sd_read_data ( struct rts51x_chip chip,
u8  trans_mode,
u8 cmd,
int  cmd_len,
u16  byte_cnt,
u16  blk_cnt,
u8  bus_width,
u8 buf,
int  buf_len,
int  timeout 
)

Definition at line 290 of file sd.c.

int sd_rw ( struct scsi_cmnd srb,
struct rts51x_chip chip,
u32  start_sector,
u16  sector_cnt 
)

Definition at line 2933 of file sd.c.

int sd_select_card ( struct rts51x_chip chip,
int  select 
)

Definition at line 683 of file sd.c.

int sd_switch_clock ( struct rts51x_chip chip)

Definition at line 1750 of file sd.c.