Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
ms.h File Reference

Go to the source code of this file.

Macros

#define MS_DELAY_WRITE
 
#define MS_MAX_RETRY_COUNT   3
 
#define MS_EXTRA_SIZE   0x9
 
#define WRT_PRTCT   0x01
 
#define MS_NO_ERROR   0x00
 
#define MS_CRC16_ERROR   0x80
 
#define MS_TO_ERROR   0x40
 
#define MS_NO_CARD   0x20
 
#define MS_NO_MEMORY   0x10
 
#define MS_CMD_NK   0x08
 
#define MS_FLASH_READ_ERROR   0x04
 
#define MS_FLASH_WRITE_ERROR   0x02
 
#define MS_BREQ_ERROR   0x01
 
#define MS_NOT_FOUND   0x03
 
#define READ_PAGE_DATA   0x02
 
#define READ_REG   0x04
 
#define GET_INT   0x07
 
#define WRITE_PAGE_DATA   0x0D
 
#define WRITE_REG   0x0B
 
#define SET_RW_REG_ADRS   0x08
 
#define SET_CMD   0x0E
 
#define PRO_READ_LONG_DATA   0x02
 
#define PRO_READ_SHORT_DATA   0x03
 
#define PRO_READ_REG   0x04
 
#define PRO_READ_QUAD_DATA   0x05
 
#define PRO_GET_INT   0x07
 
#define PRO_WRITE_LONG_DATA   0x0D
 
#define PRO_WRITE_SHORT_DATA   0x0C
 
#define PRO_WRITE_QUAD_DATA   0x0A
 
#define PRO_WRITE_REG   0x0B
 
#define PRO_SET_RW_REG_ADRS   0x08
 
#define PRO_SET_CMD   0x0E
 
#define PRO_EX_SET_CMD   0x09
 
#define BLOCK_READ   0xAA
 
#define BLOCK_WRITE   0x55
 
#define BLOCK_END   0x33
 
#define BLOCK_ERASE   0x99
 
#define FLASH_STOP   0xCC
 
#define SLEEP   0x5A
 
#define CLEAR_BUF   0xC3
 
#define MS_RESET   0x3C
 
#define PRO_READ_DATA   0x20
 
#define PRO_WRITE_DATA   0x21
 
#define PRO_READ_ATRB   0x24
 
#define PRO_STOP   0x25
 
#define PRO_ERASE   0x26
 
#define PRO_READ_2K_DATA   0x27
 
#define PRO_WRITE_2K_DATA   0x28
 
#define PRO_FORMAT   0x10
 
#define PRO_SLEEP   0x11
 
#define IntReg   0x01
 
#define StatusReg0   0x02
 
#define StatusReg1   0x03
 
#define SystemParm   0x10
 
#define BlockAdrs   0x11
 
#define CMDParm   0x14
 
#define PageAdrs   0x15
 
#define OverwriteFlag   0x16
 
#define ManagemenFlag   0x17
 
#define LogicalAdrs   0x18
 
#define ReserveArea   0x1A
 
#define Pro_IntReg   0x01
 
#define Pro_StatusReg   0x02
 
#define Pro_TypeReg   0x04
 
#define Pro_IFModeReg   0x05
 
#define Pro_CatagoryReg   0x06
 
#define Pro_ClassReg   0x07
 
#define Pro_SystemParm   0x10
 
#define Pro_DataCount1   0x11
 
#define Pro_DataCount0   0x12
 
#define Pro_DataAddr3   0x13
 
#define Pro_DataAddr2   0x14
 
#define Pro_DataAddr1   0x15
 
#define Pro_DataAddr0   0x16
 
#define Pro_TPCParm   0x17
 
#define Pro_CMDParm   0x18
 
#define INT_REG_CED   0x80
 
#define INT_REG_ERR   0x40
 
#define INT_REG_BREQ   0x20
 
#define INT_REG_CMDNK   0x01
 
#define BLOCK_BOOT   0xC0
 
#define BLOCK_OK   0x80
 
#define PAGE_OK   0x60
 
#define DATA_COMPL   0x10
 
#define NOT_BOOT_BLOCK   0x4
 
#define NOT_TRANSLATION_TABLE   0x8
 
#define HEADER_ID0   PPBUF_BASE2
 
#define HEADER_ID1   (PPBUF_BASE2 + 1)
 
#define DISABLED_BLOCK0   (PPBUF_BASE2 + 0x170 + 4)
 
#define DISABLED_BLOCK1   (PPBUF_BASE2 + 0x170 + 5)
 
#define DISABLED_BLOCK2   (PPBUF_BASE2 + 0x170 + 6)
 
#define DISABLED_BLOCK3   (PPBUF_BASE2 + 0x170 + 7)
 
#define BLOCK_SIZE_0   (PPBUF_BASE2 + 0x1a0 + 2)
 
#define BLOCK_SIZE_1   (PPBUF_BASE2 + 0x1a0 + 3)
 
#define BLOCK_COUNT_0   (PPBUF_BASE2 + 0x1a0 + 4)
 
#define BLOCK_COUNT_1   (PPBUF_BASE2 + 0x1a0 + 5)
 
#define EBLOCK_COUNT_0   (PPBUF_BASE2 + 0x1a0 + 6)
 
#define EBLOCK_COUNT_1   (PPBUF_BASE2 + 0x1a0 + 7)
 
#define PAGE_SIZE_0   (PPBUF_BASE2 + 0x1a0 + 8)
 
#define PAGE_SIZE_1   (PPBUF_BASE2 + 0x1a0 + 9)
 
#define MS_Device_Type   (PPBUF_BASE2 + 0x1D8)
 
#define MS_4bit_Support   (PPBUF_BASE2 + 0x1D3)
 
#define setPS_NG   1
 
#define setPS_Error   0
 
#define PARALLEL_8BIT_IF   0x40
 
#define PARALLEL_4BIT_IF   0x00
 
#define SERIAL_IF   0x80
 
#define BUF_FULL   0x10
 
#define BUF_EMPTY   0x20
 
#define MEDIA_BUSY   0x80
 
#define FLASH_BUSY   0x40
 
#define DATA_ERROR   0x20
 
#define STS_UCDT   0x10
 
#define EXTRA_ERROR   0x08
 
#define STS_UCEX   0x04
 
#define FLAG_ERROR   0x02
 
#define STS_UCFG   0x01
 
#define MS_SHORT_DATA_LEN   32
 
#define FORMAT_SUCCESS   0
 
#define FORMAT_FAIL   1
 
#define FORMAT_IN_PROGRESS   2
 
#define MS_SET_BAD_BLOCK_FLG(ms_card)   ((ms_card)->multi_flag |= 0x80)
 
#define MS_CLR_BAD_BLOCK_FLG(ms_card)   ((ms_card)->multi_flag &= 0x7F)
 
#define MS_TST_BAD_BLOCK_FLG(ms_card)   ((ms_card)->multi_flag & 0x80)
 

Functions

void mspro_polling_format_status (struct rtsx_chip *chip)
 
void mspro_stop_seq_mode (struct rtsx_chip *chip)
 
int reset_ms_card (struct rtsx_chip *chip)
 
int ms_rw (struct scsi_cmnd *srb, struct rtsx_chip *chip, u32 start_sector, u16 sector_cnt)
 
int mspro_format (struct scsi_cmnd *srb, struct rtsx_chip *chip, int short_data_len, int quick_format)
 
void ms_free_l2p_tbl (struct rtsx_chip *chip)
 
void ms_cleanup_work (struct rtsx_chip *chip)
 
int ms_power_off_card3v3 (struct rtsx_chip *chip)
 
int release_ms_card (struct rtsx_chip *chip)
 
int ms_delay_write (struct rtsx_chip *chip)
 

Macro Definition Documentation

#define BLOCK_BOOT   0xC0

Definition at line 145 of file ms.h.

#define BLOCK_COUNT_0   (PPBUF_BASE2 + 0x1a0 + 4)

Definition at line 161 of file ms.h.

#define BLOCK_COUNT_1   (PPBUF_BASE2 + 0x1a0 + 5)

Definition at line 162 of file ms.h.

#define BLOCK_END   0x33

Definition at line 88 of file ms.h.

#define BLOCK_ERASE   0x99

Definition at line 89 of file ms.h.

#define BLOCK_OK   0x80

Definition at line 146 of file ms.h.

#define BLOCK_READ   0xAA

Definition at line 86 of file ms.h.

#define BLOCK_SIZE_0   (PPBUF_BASE2 + 0x1a0 + 2)

Definition at line 159 of file ms.h.

#define BLOCK_SIZE_1   (PPBUF_BASE2 + 0x1a0 + 3)

Definition at line 160 of file ms.h.

#define BLOCK_WRITE   0x55

Definition at line 87 of file ms.h.

#define BlockAdrs   0x11

Definition at line 112 of file ms.h.

#define BUF_EMPTY   0x20

Definition at line 180 of file ms.h.

#define BUF_FULL   0x10

Definition at line 179 of file ms.h.

#define CLEAR_BUF   0xC3

Definition at line 93 of file ms.h.

#define CMDParm   0x14

Definition at line 113 of file ms.h.

#define DATA_COMPL   0x10

Definition at line 148 of file ms.h.

#define DATA_ERROR   0x20

Definition at line 184 of file ms.h.

#define DISABLED_BLOCK0   (PPBUF_BASE2 + 0x170 + 4)

Definition at line 155 of file ms.h.

#define DISABLED_BLOCK1   (PPBUF_BASE2 + 0x170 + 5)

Definition at line 156 of file ms.h.

#define DISABLED_BLOCK2   (PPBUF_BASE2 + 0x170 + 6)

Definition at line 157 of file ms.h.

#define DISABLED_BLOCK3   (PPBUF_BASE2 + 0x170 + 7)

Definition at line 158 of file ms.h.

#define EBLOCK_COUNT_0   (PPBUF_BASE2 + 0x1a0 + 6)

Definition at line 163 of file ms.h.

#define EBLOCK_COUNT_1   (PPBUF_BASE2 + 0x1a0 + 7)

Definition at line 164 of file ms.h.

#define EXTRA_ERROR   0x08

Definition at line 186 of file ms.h.

#define FLAG_ERROR   0x02

Definition at line 188 of file ms.h.

#define FLASH_BUSY   0x40

Definition at line 183 of file ms.h.

#define FLASH_STOP   0xCC

Definition at line 90 of file ms.h.

#define FORMAT_FAIL   1

Definition at line 194 of file ms.h.

#define FORMAT_IN_PROGRESS   2

Definition at line 195 of file ms.h.

#define FORMAT_SUCCESS   0

Definition at line 193 of file ms.h.

#define GET_INT   0x07

Definition at line 50 of file ms.h.

#define HEADER_ID0   PPBUF_BASE2

Definition at line 153 of file ms.h.

#define HEADER_ID1   (PPBUF_BASE2 + 1)

Definition at line 154 of file ms.h.

#define INT_REG_BREQ   0x20

Definition at line 142 of file ms.h.

#define INT_REG_CED   0x80

Definition at line 140 of file ms.h.

#define INT_REG_CMDNK   0x01

Definition at line 143 of file ms.h.

#define INT_REG_ERR   0x40

Definition at line 141 of file ms.h.

#define IntReg   0x01

Definition at line 107 of file ms.h.

#define LogicalAdrs   0x18

Definition at line 118 of file ms.h.

#define ManagemenFlag   0x17

Definition at line 117 of file ms.h.

#define MEDIA_BUSY   0x80

Definition at line 182 of file ms.h.

#define MS_4bit_Support   (PPBUF_BASE2 + 0x1D3)

Definition at line 170 of file ms.h.

#define MS_BREQ_ERROR   0x01

Definition at line 44 of file ms.h.

#define MS_CLR_BAD_BLOCK_FLG (   ms_card)    ((ms_card)->multi_flag &= 0x7F)

Definition at line 198 of file ms.h.

#define MS_CMD_NK   0x08

Definition at line 41 of file ms.h.

#define MS_CRC16_ERROR   0x80

Definition at line 37 of file ms.h.

#define MS_DELAY_WRITE

Definition at line 27 of file ms.h.

#define MS_Device_Type   (PPBUF_BASE2 + 0x1D8)

Definition at line 168 of file ms.h.

#define MS_EXTRA_SIZE   0x9

Definition at line 31 of file ms.h.

#define MS_FLASH_READ_ERROR   0x04

Definition at line 42 of file ms.h.

#define MS_FLASH_WRITE_ERROR   0x02

Definition at line 43 of file ms.h.

#define MS_MAX_RETRY_COUNT   3

Definition at line 29 of file ms.h.

#define MS_NO_CARD   0x20

Definition at line 39 of file ms.h.

#define MS_NO_ERROR   0x00

Definition at line 36 of file ms.h.

#define MS_NO_MEMORY   0x10

Definition at line 40 of file ms.h.

#define MS_NOT_FOUND   0x03

Definition at line 45 of file ms.h.

#define MS_RESET   0x3C

Definition at line 94 of file ms.h.

#define MS_SET_BAD_BLOCK_FLG (   ms_card)    ((ms_card)->multi_flag |= 0x80)

Definition at line 197 of file ms.h.

#define MS_SHORT_DATA_LEN   32

Definition at line 191 of file ms.h.

#define MS_TO_ERROR   0x40

Definition at line 38 of file ms.h.

#define MS_TST_BAD_BLOCK_FLG (   ms_card)    ((ms_card)->multi_flag & 0x80)

Definition at line 199 of file ms.h.

#define NOT_BOOT_BLOCK   0x4

Definition at line 150 of file ms.h.

#define NOT_TRANSLATION_TABLE   0x8

Definition at line 151 of file ms.h.

#define OverwriteFlag   0x16

Definition at line 116 of file ms.h.

#define PAGE_OK   0x60

Definition at line 147 of file ms.h.

#define PAGE_SIZE_0   (PPBUF_BASE2 + 0x1a0 + 8)

Definition at line 165 of file ms.h.

#define PAGE_SIZE_1   (PPBUF_BASE2 + 0x1a0 + 9)

Definition at line 166 of file ms.h.

#define PageAdrs   0x15

Definition at line 114 of file ms.h.

#define PARALLEL_4BIT_IF   0x00

Definition at line 176 of file ms.h.

#define PARALLEL_8BIT_IF   0x40

Definition at line 175 of file ms.h.

#define Pro_CatagoryReg   0x06

Definition at line 125 of file ms.h.

#define Pro_ClassReg   0x07

Definition at line 126 of file ms.h.

#define Pro_CMDParm   0x18

Definition at line 138 of file ms.h.

#define Pro_DataAddr0   0x16

Definition at line 135 of file ms.h.

#define Pro_DataAddr1   0x15

Definition at line 134 of file ms.h.

#define Pro_DataAddr2   0x14

Definition at line 133 of file ms.h.

#define Pro_DataAddr3   0x13

Definition at line 132 of file ms.h.

#define Pro_DataCount0   0x12

Definition at line 131 of file ms.h.

#define Pro_DataCount1   0x11

Definition at line 130 of file ms.h.

#define PRO_ERASE   0x26

Definition at line 100 of file ms.h.

#define PRO_EX_SET_CMD   0x09

Definition at line 67 of file ms.h.

#define PRO_FORMAT   0x10

Definition at line 104 of file ms.h.

#define PRO_GET_INT   0x07

Definition at line 60 of file ms.h.

#define Pro_IFModeReg   0x05

Definition at line 124 of file ms.h.

#define Pro_IntReg   0x01

Definition at line 121 of file ms.h.

#define PRO_READ_2K_DATA   0x27

Definition at line 101 of file ms.h.

#define PRO_READ_ATRB   0x24

Definition at line 98 of file ms.h.

#define PRO_READ_DATA   0x20

Definition at line 96 of file ms.h.

#define PRO_READ_LONG_DATA   0x02

Definition at line 56 of file ms.h.

#define PRO_READ_QUAD_DATA   0x05

Definition at line 59 of file ms.h.

#define PRO_READ_REG   0x04

Definition at line 58 of file ms.h.

#define PRO_READ_SHORT_DATA   0x03

Definition at line 57 of file ms.h.

#define PRO_SET_CMD   0x0E

Definition at line 66 of file ms.h.

#define PRO_SET_RW_REG_ADRS   0x08

Definition at line 65 of file ms.h.

#define PRO_SLEEP   0x11

Definition at line 105 of file ms.h.

#define Pro_StatusReg   0x02

Definition at line 122 of file ms.h.

#define PRO_STOP   0x25

Definition at line 99 of file ms.h.

#define Pro_SystemParm   0x10

Definition at line 129 of file ms.h.

#define Pro_TPCParm   0x17

Definition at line 137 of file ms.h.

#define Pro_TypeReg   0x04

Definition at line 123 of file ms.h.

#define PRO_WRITE_2K_DATA   0x28

Definition at line 102 of file ms.h.

#define PRO_WRITE_DATA   0x21

Definition at line 97 of file ms.h.

#define PRO_WRITE_LONG_DATA   0x0D

Definition at line 61 of file ms.h.

#define PRO_WRITE_QUAD_DATA   0x0A

Definition at line 63 of file ms.h.

#define PRO_WRITE_REG   0x0B

Definition at line 64 of file ms.h.

#define PRO_WRITE_SHORT_DATA   0x0C

Definition at line 62 of file ms.h.

#define READ_PAGE_DATA   0x02

Definition at line 48 of file ms.h.

#define READ_REG   0x04

Definition at line 49 of file ms.h.

#define ReserveArea   0x1A

Definition at line 119 of file ms.h.

#define SERIAL_IF   0x80

Definition at line 177 of file ms.h.

#define SET_CMD   0x0E

Definition at line 54 of file ms.h.

#define SET_RW_REG_ADRS   0x08

Definition at line 53 of file ms.h.

#define setPS_Error   0

Definition at line 173 of file ms.h.

#define setPS_NG   1

Definition at line 172 of file ms.h.

#define SLEEP   0x5A

Definition at line 92 of file ms.h.

#define StatusReg0   0x02

Definition at line 108 of file ms.h.

#define StatusReg1   0x03

Definition at line 109 of file ms.h.

#define STS_UCDT   0x10

Definition at line 185 of file ms.h.

#define STS_UCEX   0x04

Definition at line 187 of file ms.h.

#define STS_UCFG   0x01

Definition at line 189 of file ms.h.

#define SystemParm   0x10

Definition at line 111 of file ms.h.

#define WRITE_PAGE_DATA   0x0D

Definition at line 51 of file ms.h.

#define WRITE_REG   0x0B

Definition at line 52 of file ms.h.

#define WRT_PRTCT   0x01

Definition at line 33 of file ms.h.

Function Documentation

void ms_cleanup_work ( struct rtsx_chip chip)

Definition at line 3972 of file ms.c.

int ms_delay_write ( struct rtsx_chip chip)

Definition at line 3139 of file ms.c.

void ms_free_l2p_tbl ( struct rtsx_chip chip)

Definition at line 3407 of file ms.c.

int ms_power_off_card3v3 ( struct rtsx_chip chip)

Definition at line 3996 of file ms.c.

int ms_rw ( struct scsi_cmnd srb,
struct rtsx_chip chip,
u32  start_sector,
u16  sector_cnt 
)

Definition at line 3393 of file ms.c.

int mspro_format ( struct scsi_cmnd srb,
struct rtsx_chip chip,
int  short_data_len,
int  quick_format 
)

Definition at line 2694 of file ms.c.

void mspro_polling_format_status ( struct rtsx_chip chip)

Definition at line 2676 of file ms.c.

void mspro_stop_seq_mode ( struct rtsx_chip chip)

Definition at line 2398 of file ms.c.

int release_ms_card ( struct rtsx_chip chip)

Definition at line 4022 of file ms.c.

int reset_ms_card ( struct rtsx_chip chip)

Definition at line 2326 of file ms.c.