소스 검색

sdcard: run in slow mode (400 kHz during initialization)

Match the spec by running in slow mode (400 kHz) until after CMD0 is
accepted.
H. Peter Anvin 3 년 전
부모
커밋
f3992b85ad
6개의 변경된 파일2873개의 추가작업 그리고 2873개의 파일을 삭제
  1. BIN
      fpga/output_files/max80.jbc
  2. BIN
      fpga/output_files/max80.jic
  3. BIN
      fpga/output_files/max80.pof
  4. BIN
      fpga/output_files/max80.sof
  5. 2866 2866
      fw/boot.mif
  6. 7 7
      fw/sdcard.c

BIN
fpga/output_files/max80.jbc


BIN
fpga/output_files/max80.jic


BIN
fpga/output_files/max80.pof


BIN
fpga/output_files/max80.sof


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 2866 - 2866
fw/boot.mif


+ 7 - 7
fw/sdcard.c

@@ -702,17 +702,17 @@ DSTATUS disk_initialize(BYTE drive)
 
     sdcard_led_on();
 
-    /* This doesn't work for MMC, but speeds up debugging */
-#undef SD_SLOW
-#define SD_SLOW SD_20MHZ
-
     /* Allow 4 retries in case the card is in a funky state */
     i = 4;
     while (1) {
-	/* Generate 256 clock cycles in slow mode, with CS# high */
+	/*
+	 * Generate 256 clock cycles in slow mode, with CS# high.
+	 * Use byte writes to reduce the time the CPU is held blocking
+	 * interrupts. (Todo: polling loop?)
+	 */
 	sd_set_mode(SD_SLOW, false);
-	for (j = 0; j < 8; j++)
-	    sd_writel(~0, SD_GO32);
+	for (j = 0; j < 32; j++)
+	    sd_writeb(~0, SD_GO8);
 
 	/* Assert CS# and send reset command */
 	sd_set_mode(SD_SLOW, true);

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.