Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 20th, 2011  |  syntax: None  |  size: 1.94 KB  |  views: 101  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Index: firmware/target/arm/as3525/sd-as3525v2.c
  2. ===================================================================
  3. --- firmware/target/arm/as3525/sd-as3525v2.c    (revision 29621)
  4. +++ firmware/target/arm/as3525/sd-as3525v2.c    (working copy)
  5. @@ -423,7 +423,7 @@
  6.        /*b10 */  | ((cmd == SD_WRITE_MULTIPLE_BLOCK)  ? CMD_RW_BIT:            0)
  7.        /*b11     | CMD_TRANSMODE_BIT       unused  */
  8.        /*b12     | CMD_SENT_AUTO_STOP_BIT  unused  */
  9. -      /*b13 */  | (TRANSFER_CMD                      ? CMD_WAIT_PRV_DAT_BIT:  0)
  10. +      /*b13 */  | ((cmd != SD_STOP_TRANSMISSION)     ? CMD_WAIT_PRV_DAT_BIT:  0)
  11.        /*b14     | CMD_ABRT_CMD_BIT        unused  */
  12.        /*b15     | CMD_SEND_INIT_BIT       unused  */
  13.     /*b20:16 */  |                                      card_no
  14. @@ -550,22 +550,16 @@
  15.      {
  16.          /* Attempt to switch cards to HS timings, non HS cards just ignore this */
  17.          /*  CMD7 w/rca: Select card to put it in TRAN state */
  18. -        if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_NO_RESP, NULL))
  19. +        if(!send_cmd(drive, SD_SELECT_CARD, card_info[drive].rca, MCI_RESP, &response))
  20.              return -7;
  21.  
  22.          if(sd_wait_for_tran_state(drive))
  23.              return -8;
  24.  
  25.          /* CMD6 */
  26. -        if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_NO_RESP, NULL))
  27. +        if(!send_cmd(drive, SD_SWITCH_FUNC, 0x80fffff1, MCI_RESP, &response))
  28.              return -9;
  29.              
  30. -        /* This delay is a bit of a hack, but seems to fix card detection
  31. -           problems with some SD cards (particularly 16 GB and bigger cards).
  32. -           Preferably we should handle this properly instead of using a delay,
  33. -           see also FS#11870. */
  34. -        udelay(100000);
  35. -
  36.          /*  We need to go back to STBY state now so we can read csd */
  37.          /*  CMD7 w/rca=0:  Deselect card to put it in STBY state */
  38.          if(!send_cmd(drive, SD_DESELECT_CARD, 0, MCI_NO_RESP, NULL))
clone this paste RAW Paste Data