From 1da629b9ac76b73f0d49be7fa219c55d77b7174d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joan=20Olguy=20Can=C3=A9us?= Date: Fri, 16 Aug 2019 22:43:10 -0700 Subject: [PATCH] wedge400: set_sled.sh is ready for wedge400/wedge400-2 platform (#102) Summary: As title Pull Request resolved: https://github.com/facebookexternal/openbmc.celestica/pull/102 Test Plan: Can not provide log, should test on site. Reviewed By: joancaneus fbshipit-source-id: 43493f480d --- .../recipes-utils/openbmc-utils/files/set_sled.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 meta-facebook/meta-wedge400/recipes-utils/openbmc-utils/files/set_sled.sh diff --git a/meta-facebook/meta-wedge400/recipes-utils/openbmc-utils/files/set_sled.sh b/meta-facebook/meta-wedge400/recipes-utils/openbmc-utils/files/set_sled.sh old mode 100644 new mode 100755 index e0ea1c9d783..0092fa7fd8d --- a/meta-facebook/meta-wedge400/recipes-utils/openbmc-utils/files/set_sled.sh +++ b/meta-facebook/meta-wedge400/recipes-utils/openbmc-utils/files/set_sled.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright 2018-present Facebook. All Rights Reserved. +# Copyright 2019-present Facebook. All Rights Reserved. # # This program file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -34,7 +34,7 @@ usage(){ echo "Usage:" echo " $program " echo "" - echo " : sys/smb/psu/sts" + echo " : sts/smb/psu/fan" echo " : off/red/blue/yellow" } @@ -59,7 +59,7 @@ esac if [ "$3" == "0" ] || [ "$3" == "4" ]; then - if [ "$1" == "smb" ] || [ "$1" == "sys" ]; then + if [ "$1" == "smb" ] || [ "$1" == "fan" ]; then val=$(($val << 3)) IO0_VAL=$((($IO0 & 0x7) | $val)) IO1_VAL=$((($IO1 & 0x7) | $val)) @@ -71,7 +71,7 @@ if [ "$3" == "0" ] || [ "$3" == "4" ]; then exit -1 fi - if [ "$1" == "sts" ] || [ "$1" == "sys" ]; then + if [ "$1" == "sts" ] || [ "$1" == "fan" ]; then i2cset -f -y 6 0x20 0x2 $IO0_VAL else i2cset -f -y 6 0x20 0x3 $IO1_VAL @@ -79,7 +79,7 @@ if [ "$3" == "0" ] || [ "$3" == "4" ]; then else - if [ "$1" == "sys" ] || [ "$1" == "smb" ]; then + if [ "$1" == "fan" ] || [ "$1" == "smb" ]; then val=$(($val << 3)) IO0_VAL=$((($IO0 & 0x7) | $val)) IO1_VAL=$((($IO1 & 0x7) | $val)) @@ -91,7 +91,7 @@ else exit -1 fi - if [ "$1" == "sys" ] || [ "$1" == "sts" ]; then + if [ "$1" == "fan" ] || [ "$1" == "sts" ]; then i2cset -f -y 6 0x20 0x2 $IO0_VAL else i2cset -f -y 6 0x20 0x3 $IO1_VAL