Guest User

Untitled

a guest
Mar 28th, 2011
130
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: firmware/target/arm/as3525/sd-as3525v2.c
  2. ===================================================================
  3. --- firmware/target/arm/as3525/sd-as3525v2.c (revision 29657)
  4. +++ firmware/target/arm/as3525/sd-as3525v2.c (working copy)
  5. @@ -549,40 +549,11 @@
  6. /* Card back to full speed */
  7. MCI_CLKDIV &= ~(0xFF); /* CLK_DIV_0 : bits 7:0 = 0x00 */
  8.  
  9. - if (sd_v2)
  10. - {
  11. - /* Attempt to switch cards to HS timings, non HS cards just ignore this */
  12. - /* CMD7 w/rca: Select card to put it in TRAN state */
  13. - if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_RESP, &response))
  14. - return -7;
  15. -
  16. - if(sd_wait_for_tran_state(drive))
  17. - return -8;
  18. -
  19. - /* CMD6 */
  20. - if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_RESP, &response))
  21. - return -9;
  22. -
  23. - /* This delay is a bit of a hack, but seems to fix card detection
  24. - problems with some SD cards (particularly 16 GB and bigger cards).
  25. - Preferably we should handle this properly instead of using a delay,
  26. - see also FS#11870. */
  27. - sleep(HZ/10);
  28. -
  29. - /* We need to go back to STBY state now so we can read csd */
  30. - /* CMD7 w/rca=0: Deselect card to put it in STBY state */
  31. - if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
  32. - return -10;
  33. - }
  34. -
  35. /* CMD9 send CSD */
  36. if(!send_cmd(drive, SD_SEND_CSD, card_info[drive].rca,
  37. MCI_RESP|MCI_LONG_RESP, card_info[drive].csd))
  38. return -11;
  39.  
  40. - /* Another delay hack, see FS#11798 */
  41. - mci_delay();
  42. -
  43. sd_parse_csd(&card_info[drive]);
  44.  
  45. if(drive == INTERNAL_AS3525) /* The OF is stored in the first blocks */
RAW Paste Data