=================================================================== RCS file: /cvs/funnyos/dev/sdmmc/sdmmcvar.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- funnyos/dev/sdmmc/sdmmcvar.h 2007/12/20 15:23:15 1.2 +++ funnyos/dev/sdmmc/sdmmcvar.h 2007/12/21 17:45:26 1.3 @@ -1,9 +1,11 @@ /* - * $Id: sdmmcvar.h,v 1.2 2007/12/20 15:23:15 nbrk Exp $ + * $Id: sdmmcvar.h,v 1.3 2007/12/21 17:45:26 nbrk Exp $ */ #ifndef _DEV_SDMMC_SDMMCVAR_H #define _DEV_SDMMC_SDMMCVAR_H +#define SDMMC_BLOCK_SIZE 512 + /* * SD/MMC simplified commands set. */ @@ -92,6 +94,16 @@ /* + * Tokens. + */ +#define TOK_READ_BLOCK 0xfe +#define TOK_READ_BLOCK_MULTIPLE 0xfe +#define TOK_WRITE_BLOCK 0xfe +#define TOK_WRITE_BLOCK_MULTIPLE 0xfc +#define TOK_STOP_MULTIPLE 0xfd + + +/* * Read Error Token bits. */ #define RE_UNSPECIFIED_ERROR 0x01 @@ -99,6 +111,20 @@ #define RE_CARD_ECC_FAILED 0x04 #define RE_OUT_OF_RANGE 0x08 #define RE_CARD_LOCKED 0x10 + +/* + * Card CID (Card ID) register. + */ +struct sdmmc_cid { + uint8_t cid_mid; + uint16_t cid_oid; + uint8_t cid_pnm[5]; + uint8_t cid_prv; + uint32_t cid_psn; + uint16_t cid_mdt; + uint8_t cid_crc; + +} __attribute__((packed)); /* * SD/MMC bus handle.