software/libsdcard: keep SDCARD_DEBUG enabled for now, fix typos.
This commit is contained in:
parent
20bbdaaf6b
commit
382f239e74
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
#include "sdcard.h"
|
#include "sdcard.h"
|
||||||
|
|
||||||
//#define SDCARD_DEBUG
|
#define SDCARD_DEBUG
|
||||||
|
|
||||||
#ifdef CSR_SDCORE_BASE
|
#ifdef CSR_SDCORE_BASE
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ int sdcard_wait_cmd_done(void) {
|
||||||
unsigned int cmdevt;
|
unsigned int cmdevt;
|
||||||
while (1) {
|
while (1) {
|
||||||
cmdevt = sdcore_cmdevt_read();
|
cmdevt = sdcore_cmdevt_read();
|
||||||
busy_wait(1); /* FIXME */
|
busy_wait(5); /* FIXME */
|
||||||
#ifdef SDCARD_DEBUG
|
#ifdef SDCARD_DEBUG
|
||||||
printf("cmdevt: %08x\n", cmdevt);
|
printf("cmdevt: %08x\n", cmdevt);
|
||||||
#endif
|
#endif
|
||||||
|
@ -180,7 +180,7 @@ int sdcard_wait_data_done(void) {
|
||||||
unsigned int dataevt;
|
unsigned int dataevt;
|
||||||
while (1) {
|
while (1) {
|
||||||
dataevt = sdcore_dataevt_read();
|
dataevt = sdcore_dataevt_read();
|
||||||
busy_wait(1); /* FIXME */
|
busy_wait(5); /* FIXME */
|
||||||
#ifdef SDCARD_DEBUG
|
#ifdef SDCARD_DEBUG
|
||||||
printf("dataevt: %08x\n", dataevt);
|
printf("dataevt: %08x\n", dataevt);
|
||||||
#endif
|
#endif
|
||||||
|
@ -202,8 +202,7 @@ int sdcard_wait_response(void) {
|
||||||
|
|
||||||
status = sdcard_wait_cmd_done();
|
status = sdcard_wait_cmd_done();
|
||||||
|
|
||||||
csr_rd_buf_uint32(CSR_SDCORE_RESPONSE_ADDR,
|
csr_rd_buf_uint32(CSR_SDCORE_RESPONSE_ADDR, sdcard_response, SD_RESPONSE_SIZE/4);
|
||||||
sdcard_response, SD_RESPONSE_SIZE/4);
|
|
||||||
|
|
||||||
#ifdef SDCARD_DEBUG
|
#ifdef SDCARD_DEBUG
|
||||||
for(i = 0; i < SD_RESPONSE_SIZE/4; i++) {
|
for(i = 0; i < SD_RESPONSE_SIZE/4; i++) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#ifdef CSR_SDCORE_BASE
|
#ifdef CSR_SDCORE_BASE
|
||||||
|
|
||||||
#define SD_BLOCK_SIZE 512
|
#define SD_BLOCK_SIZE 512
|
||||||
#define SD_RESPONSE_SIZE 128
|
#define SD_RESPONSE_SIZE 16
|
||||||
|
|
||||||
#define SD_OK 0
|
#define SD_OK 0
|
||||||
#define SD_CRCERROR 1
|
#define SD_CRCERROR 1
|
||||||
|
|
Loading…
Reference in New Issue