Skip to content

Commit

Permalink
wedge400: board-util.sh code revised (#97)
Browse files Browse the repository at this point in the history
Summary:
1. Copyright change
2. wedge_power_on judgement follow CPLD spec
3. support wedge400-c/wedge400-2
4. remove code not used
Pull Request resolved: facebookexternal/openbmc.celestica#97

Reviewed By: joancaneus

fbshipit-source-id: 2cac97e09e
  • Loading branch information
joancaneus authored and facebook-github-bot committed Aug 17, 2019
1 parent 11c14c0 commit 8173a17
Showing 1 changed file with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Boston, MA 02110-1301 USA
#

. /usr/local/bin/openbmc-utils.sh
# Do not change this line to openbmc-utils.sh, or it will generate a source loop.
. /usr/local/bin/i2c-utils.sh

SCMCPLD_SYSFS_DIR=$(i2c_device_sysfs_abspath 2-003e)
SMBCPLD_SYSFS_DIR=$(i2c_device_sysfs_abspath 12-003e)
Expand All @@ -33,16 +34,6 @@ PWR_USRV_SYSFS="${SCMCPLD_SYSFS_DIR}/com_exp_pwr_enable"
PWR_USRV_FORCE_OFF="${SCMCPLD_SYSFS_DIR}/com_exp_pwr_force_off"
PWR_TH_RST_SYSFS="${SMBCPLD_SYSFS_DIR}/mac_reset_n"

wedge_iso_buf_enable() {
# TODO, no isolation buffer
return 0
}

wedge_iso_buf_disable() {
# TODO, no isolation buffer
return 0
}

wedge_is_us_on() {
local val0 val1

Expand All @@ -59,7 +50,12 @@ wedge_is_us_on() {
}

wedge_board_type() {
echo 'WEDGE400'
rev=$(wedge_board_rev)
if [ $((rev&0x04)) -eq 4 ]; then
echo 'WEDGE400'
else
echo 'WEDGE400-2'
fi
}

wedge_slot_id() {
Expand All @@ -74,12 +70,6 @@ wedge_board_rev() {
echo $((val0 | (val1 << 1) | (val2 << 2)))
}

# Should we enable OOB interface or not
wedge_should_enable_oob() {
# wedge400 uses BMC MAC since beginning
return -1
}

wedge_power_on_board() {
# wedge400 SCM power is controlled by SCMCPLD
return 0
Expand Down

0 comments on commit 8173a17

Please sign in to comment.