1
0
Fork 0
forked from len0rd/rockbox

MMC driver does now handle block sizes != 512 bytes, which is necessary to support cards > 1 GB. Changed error handling to use the same method as other parts of rockbox, allowing to trace the call chain. Long policy, code cleanup.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6366 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-04-28 01:11:21 +00:00
parent 7e3f91d3d8
commit a7f7781dca
3 changed files with 357 additions and 166 deletions

View file

@ -23,17 +23,20 @@ typedef struct
{
bool initialized;
unsigned char bitrate_register;
unsigned int read_timeout; /* n * 8 clock cycles */
unsigned int write_timeout; /* n * 8 clock cycles */
unsigned long read_timeout; /* n * 8 clock cycles */
unsigned long write_timeout; /* n * 8 clock cycles */
unsigned long ocr; /* OCR register */
unsigned long csd[4]; /* CSD register, 16 bytes */
unsigned long cid[4]; /* CID register, 16 bytes */
unsigned int speed; /* bit/s */
unsigned long speed; /* bit/s */
unsigned int nsac; /* clock cycles */
unsigned int tsac; /* n * 0.1 ns */
unsigned long tsac; /* n * 0.1 ns */
unsigned int r2w_factor;
unsigned int numsectors; /* size in sectors */
unsigned long size; /* size in bytes */
unsigned long numblocks; /* size in flash blocks */
unsigned int blocksize; /* block size in bytes */
unsigned int block_exp; /* block size exponent */
} tCardInfo;
void mmc_select_clock(int card_no);