diff options
Diffstat (limited to 'firmware/target/arm/s3c2440/sd-s3c2440.c')
-rw-r--r-- | firmware/target/arm/s3c2440/sd-s3c2440.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/firmware/target/arm/s3c2440/sd-s3c2440.c b/firmware/target/arm/s3c2440/sd-s3c2440.c index 78c9e9bf23..9cb9bdfc58 100644 --- a/firmware/target/arm/s3c2440/sd-s3c2440.c +++ b/firmware/target/arm/s3c2440/sd-s3c2440.c | |||
@@ -126,9 +126,6 @@ static unsigned char * uncached_buffer; | |||
126 | /***************************************************************************** | 126 | /***************************************************************************** |
127 | Definitions specific to Mini2440 | 127 | Definitions specific to Mini2440 |
128 | *****************************************************************************/ | 128 | *****************************************************************************/ |
129 | #define FCLK 405000000 | ||
130 | #define HCLK (FCLK/4) /* = 101,250,000 */ | ||
131 | #define PCLK (HCLK/2) /* = 50,625,000 */ | ||
132 | 129 | ||
133 | #define SD_CD (1<<8) /* Port G */ | 130 | #define SD_CD (1<<8) /* Port G */ |
134 | #define SD_WP (1<<8) /* Port H */ | 131 | #define SD_WP (1<<8) /* Port H */ |
@@ -206,8 +203,11 @@ static void debug_r1(int cmd) | |||
206 | void SDI (void) | 203 | void SDI (void) |
207 | { | 204 | { |
208 | int status = SDIDSTA; | 205 | int status = SDIDSTA; |
206 | #ifndef HAVE_MULTIDRIVE | ||
207 | const int curr_card = 0; | ||
208 | #endif | ||
209 | 209 | ||
210 | transfer_error[curr_card] = status | 210 | transfer_error[curr_card] = status |
211 | #if 0 | 211 | #if 0 |
212 | & ( S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL | | 212 | & ( S3C2410_SDIDSTA_CRCFAIL | S3C2410_SDIDSTA_RXCRCFAIL | |
213 | S3C2410_SDIDSTA_DATATIMEOUT ) | 213 | S3C2410_SDIDSTA_DATATIMEOUT ) |
@@ -619,7 +619,9 @@ static int sd_transfer_sectors(IF_MD2(int card_no,) unsigned long start, | |||
619 | sd_enable(true); | 619 | sd_enable(true); |
620 | set_leds(SD_ACTIVE_LED); | 620 | set_leds(SD_ACTIVE_LED); |
621 | 621 | ||
622 | #ifdef HAVE_MULTIDRIVE | ||
622 | curr_card = card_no; | 623 | curr_card = card_no; |
624 | #endif | ||
623 | if (card_info[card_no].initialized <= 0) | 625 | if (card_info[card_no].initialized <= 0) |
624 | { | 626 | { |
625 | ret = sd_init_card(card_no); | 627 | ret = sd_init_card(card_no); |
@@ -814,6 +816,9 @@ int sd_read_sectors(IF_MD2(int card_no,) unsigned long start, int incount, | |||
814 | int sd_write_sectors(IF_MD2(int card_no,) unsigned long start, int count, | 816 | int sd_write_sectors(IF_MD2(int card_no,) unsigned long start, int count, |
815 | const void* outbuf) | 817 | const void* outbuf) |
816 | { | 818 | { |
819 | #ifndef HAVE_MULTIDRIVE | ||
820 | const int card_no = 0; | ||
821 | #endif | ||
817 | dbgprintf ("sd_write %d %x %d\n", card_no, start, count); | 822 | dbgprintf ("sd_write %d %x %d\n", card_no, start, count); |
818 | 823 | ||
819 | return sd_transfer_sectors(IF_MD2(card_no,) start, count, outbuf, true); | 824 | return sd_transfer_sectors(IF_MD2(card_no,) start, count, outbuf, true); |