From f2412cd405c93df4815c612319fdc5615df9db11 Mon Sep 17 00:00:00 2001 From: funman Date: Sun, 7 Feb 2010 19:09:59 +0000 Subject: [PATCH] Sansa AMS AS3525v2 SD: remove a case which is never run Reindent git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24552 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/arm/as3525/sd-as3525v2.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c index 765eb17f0..9d5b19c08 100644 --- a/firmware/target/arm/as3525/sd-as3525v2.c +++ b/firmware/target/arm/as3525/sd-as3525v2.c @@ -639,28 +639,22 @@ static int sd_transfer_sectors(unsigned long start, int count, void* buf, bool w const int cmd = write ? SD_WRITE_MULTIPLE_BLOCK : SD_READ_MULTIPLE_BLOCK; - (*(volatile unsigned long *) (SD_BASE+0x00)) |= 2; - while(( *(volatile unsigned long *) (SD_BASE+0x00)) & 2) ; - //(*(volatile unsigned long *) (SD_BASE+0x1c)) = 512; - (*(volatile unsigned long *) (SD_BASE+0x20)) = transfer * 512; + (*(volatile unsigned long *) (SD_BASE+0x00)) |= 2; + while(( *(volatile unsigned long *) (SD_BASE+0x00)) & 2) ; - (*(volatile unsigned long *) (SD_BASE+0x00)) |= 2; - while(( *(volatile unsigned long *) (SD_BASE+0x00)) & 2) ; + //(*(volatile unsigned long *) (SD_BASE+0x1c)) = 512; + (*(volatile unsigned long *) (SD_BASE+0x20)) = transfer * 512; - (*(volatile unsigned long *) (SD_BASE+0x4c)) &= ~0x7fff0fff; + (*(volatile unsigned long *) (SD_BASE+0x00)) |= 2; + while(( *(volatile unsigned long *) (SD_BASE+0x00)) & 2) ; + + (*(volatile unsigned long *) (SD_BASE+0x4c)) &= ~0x7fff0fff; - if(0) - { (*(volatile unsigned long *) (SD_BASE+0x00)) |= 0x20; MCI_MASK = 0xBE8C; (*(volatile unsigned long *) (SD_BASE+0x4c)) |= 0x503f0080; - } - else - { - MCI_MASK = 0xBEB8; - (*(volatile unsigned long *) (SD_BASE+0x4c)) |= 0x3f0030; - } + if(card_info.ocr & (1<<30) ) /* SDHC */ ret = send_cmd(cmd, start, MCI_NO_RESP, NULL); -- 2.11.4.GIT