summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-07-01 17:03:51 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-07-01 17:03:51 +0000
commitf3a4a7635ea24de86562cf854b897d0e5b0cffe7 (patch)
treeecab23490e3e480e121552c5bdd46ea71f16a187 /firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
parent9bff845b49e277af46d6b7a09bb111472f3d3f49 (diff)
downloadrockbox-f3a4a7635ea24de86562cf854b897d0e5b0cffe7.tar.gz
rockbox-f3a4a7635ea24de86562cf854b897d0e5b0cffe7.tar.bz2
rockbox-f3a4a7635ea24de86562cf854b897d0e5b0cffe7.zip
Ingenic Jz4740 SD driver: remove some unneeded stuff + fill the OCR field in card_get_info_target()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21596 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
index 084fdb66d0..31a9f7d2b0 100644
--- a/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/ata-sd-jz4740.c
@@ -309,18 +309,12 @@ struct mmc_response_r3
/* the information structure of MMC/SD Card */
typedef struct MMC_INFO
{
- int id; /* Card index */
- int sd; /* MMC or SD card */
int rca; /* RCA */
- unsigned int scr; /* SCR 63:32*/
- int flags; /* Ejected, inserted */
-
- /* Card specific information */
struct mmc_cid cid;
struct mmc_csd csd;
unsigned int block_num;
unsigned int block_len;
- unsigned int erase_unit;
+ unsigned int ocr;
} mmc_info;
struct mmc_request
@@ -1470,7 +1464,8 @@ static int mmc_init_card_state(struct mmc_request *request)
}
DEBUG("mmc_init_card_state: read ocr value = 0x%08x", r3.ocr);
-
+ mmcinfo.ocr = r3.ocr;
+
if(!(r3.ocr & MMC_CARD_BUSY || ocr == 0)){
udelay(10000);
mmc_simple_cmd(request, MMC_APP_CMD, 0, RESPONSE_R1);
@@ -1675,7 +1670,7 @@ tCardInfo* card_get_info_target(int card_no)
static tCardInfo card;
card.initialized = true;
- card.ocr = 0;
+ card.ocr = mmcinfo.ocr;
for(i=0; i<4; i++)
card.csd[i] = ((unsigned long*)&mmcinfo.csd)[i];
for(i=0; i<4; i++)