Changeset 3407


Ignore:
Timestamp:
Nov 2, 2012, 8:08:05 PM (3 years ago)
Author:
wmb
Message:

OLPC XO-4 - Trac #12169 - Isolate eMMC pins to avoid back-driving the eMMC voltage rail from the signal lines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpu/arm/olpc/sdhci.fth

    r3345 r3407  
    2222   ' olpc-card-inserted? to card-inserted?
    2323
     24[ifdef] olpc-cl4
     25also 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;
     47previous definitions
     48[then]
     49
    2450   \ Base-addr:power_GPIO - 1:35, 2:34, 3:33
    2551   : gpio-power-on  ( -- )
    2652      sdhci-card-power-on
    2753[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
    2958[then]
    3059[ifdef] en-wlan-pwr-gpio#
    3160      base-addr h# d428.0800 =  if  en-wlan-pwr-gpio# gpio-set  then
     61[then]
    3262[then]
    3363   ;
     
    3666   : gpio-power-off  ( -- )
    3767[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
    3972[then]
    4073[ifdef] en-wlan-pwr-gpio#
Note: See TracChangeset for help on using the changeset viewer.