Changeset 3407
- Timestamp:
- Nov 2, 2012 9:08:05 PM (7 months ago)
- File:
-
- 1 edited
-
cpu/arm/olpc/sdhci.fth (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cpu/arm/olpc/sdhci.fth
r3345 r3407 22 22 ' olpc-card-inserted? to card-inserted? 23 23 24 [ifdef] olpc-cl4 25 also forth definitions 26 : isolate-mmc3-pins ( gpio# #gpios -- ) 27 bounds do 28 i af@ 7 invert and 1 or i af! 29 i gpio-dir-out i gpio-clr 30 loop 31 ; 32 : connect-mmc3-pins ( gpio# #gpios -- ) 33 bounds do 34 i af@ 7 invert and 2 or i af! 35 loop 36 ; 37 : isolate-emmc ( -- ) 38 d# 108 4 isolate-mmc3-pins 39 d# 161 4 isolate-mmc3-pins 40 d# 145 2 isolate-mmc3-pins 41 ; 42 : connect-emmc ( -- ) 43 d# 108 4 connect-mmc3-pins 44 d# 161 4 connect-mmc3-pins 45 d# 145 2 connect-mmc3-pins 46 ; 47 previous definitions 48 [then] 49 24 50 \ Base-addr:power_GPIO - 1:35, 2:34, 3:33 25 51 : gpio-power-on ( -- ) 26 52 sdhci-card-power-on 27 53 [ifdef] en-emmc-pwr-gpio# 28 base-addr h# d428.1000 = if en-emmc-pwr-gpio# gpio-clr then 54 base-addr h# d428.1000 = if 55 [ifdef] connect-emmc connect-emmc [then] 56 en-emmc-pwr-gpio# gpio-clr 57 then 29 58 [then] 30 59 [ifdef] en-wlan-pwr-gpio# 31 60 base-addr h# d428.0800 = if en-wlan-pwr-gpio# gpio-set then 61 [then] 32 62 [then] 33 63 ; … … 36 66 : gpio-power-off ( -- ) 37 67 [ifdef] en-emmc-pwr-gpio# 38 base-addr h# d428.1000 = if en-emmc-pwr-gpio# gpio-set then 68 base-addr h# d428.1000 = if 69 en-emmc-pwr-gpio# gpio-set 70 [ifdef] isolate-emmc isolate-emmc [then] 71 then 39 72 [then] 40 73 [ifdef] en-wlan-pwr-gpio#
Note: See TracChangeset
for help on using the changeset viewer.
