Changeset 3163
- Timestamp:
- Aug 13, 2012 10:41:29 PM (10 months ago)
- File:
-
- 1 edited
-
dev/mmc/sdhci/sdhci.fth (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dev/mmc/sdhci/sdhci.fth
r3111 r3163 451 451 : mmc-switch ( arg -- ) \ CMD6 for MMC - no data 452 452 h# 061b 0 cmd response h# 80 and if ." MMC SWITCH_ERROR" cr then 453 2 wait \ This command appears to have a transfer-complete 453 454 ; 454 455 … … 459 460 \ Specification says that Transfer Complete is set after R1b 460 461 \ commands, so we must clear that bit if it is set. 462 d# 16 ms \ Give the operation time to complete 461 463 isr@ isr! 462 464 ; … … 761 763 \ Ideally, the width selection would be done by using CMD19 to test the bus 762 764 hc-supports-8-bit? if 763 mmc-8-bit 1 ms8-bit765 mmc-8-bit 8-bit 764 766 else 765 mmc-4-bit 1 ms4-bit767 mmc-4-bit 4-bit 766 768 then 767 769 … … 1062 1064 ; 1063 1065 1066 : wait-dat ( -- ) d# 10 ms begin 2 ms present-state@ 4 and 0= until ; 1067 1064 1068 \ Wait for completion 1065 1069 : r/w-blocks-end ( in? -- error? ) 1066 1070 drop 1071 wait-dat 1067 1072 wait-dma-done 1068 1073 intstat-on wait-write-done intstat-off … … 1093 1098 ; 1094 1099 : fresh-write-blocks-start ( addr block# #blocks -- error? ) 1100 intstat-on 1101 wait-dat 1095 1102 false true r/w-blocks-start 1096 1103 ;
Note: See TracChangeset
for help on using the changeset viewer.
