soc/software/liblitesdcard: be less verbose
debug is now more usable: Booting from SDCard in SD-Mode... Booting from boot.json... Setting SDCard clk freq to 781 KHz CMD0: GO_IDLE cmdevt: wait for event & 0x1 cmdevt: 00000001 00000000 00000000 00000000 00000000 CMD8: SEND_EXT_CSD, arg: 0x000001aa cmdevt: wait for event & 0x1 cmdevt: 00000005 00000000 00000000 00000000 00000000 Booting from boot.bin... Setting SDCard clk freq to 781 KHz CMD0: GO_IDLE cmdevt: wait for event & 0x1 cmdevt: 00000001 00000000 00000000 00000000 00000000 CMD8: SEND_EXT_CSD, arg: 0x000001aa cmdevt: wait for event & 0x1 cmdevt: 00000005 00000000 00000000 00000000 00000000 SDCard boot failed. No boot medium found
This commit is contained in:
parent
51dd5277af
commit
bd7b951af0
|
@ -41,17 +41,16 @@ int sdcard_wait_cmd_done(void) {
|
||||||
unsigned int event;
|
unsigned int event;
|
||||||
#ifdef SDCARD_DEBUG
|
#ifdef SDCARD_DEBUG
|
||||||
uint32_t r[SD_CMD_RESPONSE_SIZE/4];
|
uint32_t r[SD_CMD_RESPONSE_SIZE/4];
|
||||||
|
printf("cmdevt: wait for event & 0x1\n");
|
||||||
#endif
|
#endif
|
||||||
for (;;) {
|
for (;;) {
|
||||||
event = sdcore_cmd_event_read();
|
event = sdcore_cmd_event_read();
|
||||||
#ifdef SDCARD_DEBUG
|
|
||||||
printf("cmdevt: %08x\n", event);
|
|
||||||
#endif
|
|
||||||
busy_wait_us(10);
|
busy_wait_us(10);
|
||||||
if (event & 0x1)
|
if (event & 0x1)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifdef SDCARD_DEBUG
|
#ifdef SDCARD_DEBUG
|
||||||
|
printf("cmdevt: %08x\n", event);
|
||||||
csr_rd_buf_uint32(CSR_SDCORE_CMD_RESPONSE_ADDR,
|
csr_rd_buf_uint32(CSR_SDCORE_CMD_RESPONSE_ADDR,
|
||||||
r, SD_CMD_RESPONSE_SIZE/4);
|
r, SD_CMD_RESPONSE_SIZE/4);
|
||||||
printf("%08x %08x %08x %08x\n", r[0], r[1], r[2], r[3]);
|
printf("%08x %08x %08x %08x\n", r[0], r[1], r[2], r[3]);
|
||||||
|
@ -65,15 +64,18 @@ int sdcard_wait_cmd_done(void) {
|
||||||
|
|
||||||
int sdcard_wait_data_done(void) {
|
int sdcard_wait_data_done(void) {
|
||||||
unsigned int event;
|
unsigned int event;
|
||||||
|
#ifdef SDCARD_DEBUG
|
||||||
|
printf("dataevt: wait for event & 0x1\n");
|
||||||
|
#endif
|
||||||
for (;;) {
|
for (;;) {
|
||||||
event = sdcore_data_event_read();
|
event = sdcore_data_event_read();
|
||||||
#ifdef SDCARD_DEBUG
|
|
||||||
printf("dataevt: %08x\n", event);
|
|
||||||
#endif
|
|
||||||
if (event & 0x1)
|
if (event & 0x1)
|
||||||
break;
|
break;
|
||||||
busy_wait_us(10);
|
busy_wait_us(10);
|
||||||
}
|
}
|
||||||
|
#ifdef SDCARD_DEBUG
|
||||||
|
printf("dataevt: %08x\n", event);
|
||||||
|
#endif
|
||||||
if (event & 0x4)
|
if (event & 0x4)
|
||||||
return SD_TIMEOUT;
|
return SD_TIMEOUT;
|
||||||
else if (event & 0x8)
|
else if (event & 0x8)
|
||||||
|
|
Loading…
Reference in New Issue