1 /******************************************************************************
\r
3 * mmc_decode_cid() and sd_decode_csd()
\r
5 * analyse the meta data of an SD-card to read its capacity and some other properties.
\r
7 * CID and CSD Analysis borrowed from the Linux kernel.
\r
9 ******************************************************************************/
\r
11 #ifndef SDPS_INFO_H_
\r
13 #define SDPS_INFO_H_ 1
\r
29 volatile uint64_t capacity_bytes;
\r
30 uint32_t sd_last_block_address;
\r
32 uint16_t erase_size;
\r
36 int32_t erase_shift;
\r
38 uint32_t r2w_factor;
\r
40 uint32_t read_blkbits;
\r
41 uint32_t write_blkbits;
\r
43 uint32_t pref_erase;
\r
44 uint32_t read_partial : 1,
\r
50 extern struct mmc_cid myCID;
\r
51 extern struct mmc_csd myCSD;
\r
53 int mmc_decode_cid( const struct mmc_csd *pxCSD, struct mmc_cid *pxCID, uint32_t *raw_data );
\r
54 int sd_decode_csd( struct mmc_csd *pxCSD, uint32_t *ulResponse );
\r
56 #endif /* SDPS_INFO_H_ */
\r