Changeset 586 for trunk/softs/tsar_boot/src/sdcard.c
- Timestamp:
- Dec 4, 2013, 7:59:21 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/softs/tsar_boot/src/sdcard.c
r501 r586 8 8 9 9 #include <sdcard.h> 10 #include < boot_tty.h>10 #include <reset_tty.h> 11 11 12 12 /** … … 184 184 if ( sdcard_rsp != 0x01 ) 185 185 { 186 boot_puts("card CMD0 failed ");186 reset_puts("card CMD0 failed "); 187 187 return sdcard_rsp; 188 188 } … … 200 200 sdcard_rsp = _sdcard_send_command(sdcard, 8, SDCARD_CMD, args, 0x63); 201 201 if (!SDCARD_CHECK_R1_VALID(sdcard_rsp)) { 202 boot_puts("card CMD8 failed ");202 reset_puts("card CMD8 failed "); 203 203 return sdcard_rsp; 204 204 } … … 211 211 if ((ersp & 0xffff) != 0x0101) { 212 212 /* voltage mismatch */ 213 boot_puts("card CMD8 mismatch: ");214 boot_putx(ersp);213 reset_puts("card CMD8 mismatch: "); 214 reset_putx(ersp); 215 215 return sdcard_rsp; 216 216 } 217 boot_puts("v2 or later ");217 reset_puts("v2 or later "); 218 218 sdcard->sdhc = 1; 219 219 } else if ((sdcard_rsp & SDCARD_R1_ILLEGAL_CMD) == 0) { 220 220 /* other error */ 221 boot_puts("card CMD8 error ");221 reset_puts("card CMD8 error "); 222 222 return sdcard_rsp; 223 223 } else { … … 246 246 _sdcard_disable(sdcard); 247 247 if (sdcard_rsp) { 248 boot_puts("SD ACMD41 failed ");248 reset_puts("SD ACMD41 failed "); 249 249 return sdcard_rsp; 250 250 } … … 259 259 args, 0x00); 260 260 if (sdcard_rsp) { 261 boot_puts("SD CMD58 failed ");261 reset_puts("SD CMD58 failed "); 262 262 return sdcard_rsp; 263 263 } … … 267 267 ersp = (ersp << 8) | _sdcard_receive_char(sdcard); 268 268 if (ersp & 0x40000000) { 269 boot_puts("SDHC ");269 reset_puts("SDHC "); 270 270 } else { 271 271 sdcard->sdhc = 0; … … 273 273 _sdcard_disable(sdcard); 274 274 } 275 boot_puts("card detected ");275 reset_puts("card detected "); 276 276 return 0; 277 277 }
Note: See TracChangeset
for help on using the changeset viewer.