diff options
author | George Hung <george.hung@quantatw.com> | 2020-11-16 15:31:04 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-11-20 16:38:25 +0300 |
commit | 0a2c10531fee4437df06e169ae5e86c254cda2b5 (patch) | |
tree | 670ae08e644334ba5221fed3a070e841fb3613ee /meta-quanta/meta-gbs | |
parent | 3afbeed0a4cfb7ba8a9f776f2f0c64c6ff2abd80 (diff) | |
download | openbmc-0a2c10531fee4437df06e169ae5e86c254cda2b5.tar.xz |
meta-quanta: gbs: fix getting SATA/PE gpio present status
Add mapper wait for the GPIO present dbus to make sure we get
the SATA/PE GPIO Present status successfully
(From meta-quanta rev: ac35d89c6a02f67ae2b7a40aa014570f279f5426)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I67cfd417b6d4e7ee04dd0ef2b01a82fca63b5b92
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-quanta/meta-gbs')
-rw-r--r-- | meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh index 68adfedef..d0453ec5e 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-sysinit/files/gbs-sysinit.sh @@ -116,11 +116,10 @@ set_uart_en_low() { set_hdd_prsnt() { # On PVT need to forward SATA0_PRSNT_N to HDD_PRSNT_N # The signal is safe to set on DVT boards so just set universally. + mapper wait ${SATA0_PRESENT_OBJPATH} sata_prsnt_n="$(busctl get-property $SERVICE_NAME ${SATA0_PRESENT_OBJPATH} \ $INTERFACE_NAME Present)" - if [[ "$?" == "0" && ${sata_prsnt_n} == "b false" ]]; then - return 1 - fi + # sata_prsnt_n is active low => value "true" means low if [[ ${sata_prsnt_n} == "b true" ]]; then set_gpio_direction 'HDD_PRSNT_N' low @@ -185,10 +184,11 @@ parse_pe_fru() { pe_fruid=3 for i in {1..2}; do + mapper wait ${PE_PRESENT_OBJPATH[$(($i-1))]} pe_prsnt_n="$(busctl get-property $SERVICE_NAME ${PE_PRESENT_OBJPATH[$(($i-1))]} \ $INTERFACE_NAME Present)" - if [[ "$?" == "0" && ${pe_prsnt_n} == "b false" ]]; then + if [[ ${pe_prsnt_n} == "b false" ]]; then pe_fruid=$(($pe_fruid+1)) continue fi @@ -238,8 +238,6 @@ main() { check_board_sku - set_hdd_prsnt - reset_phy if [[ $(check_power_status) != \ @@ -263,6 +261,7 @@ main() { echo "Host is already running, doing nothing!" >&2 fi + set_hdd_prsnt parse_pe_fru } |