Skip to content

Commit

Permalink
sandia: board-utils: Support SMB reboot (#64)
Browse files Browse the repository at this point in the history
Summary:
Support SMB reboot in I/O FPGA Silverbolt power block XIL. Require
1. BMC "sandia: package: Package cisco 8000 kernel modules in sandia image" for cisco-8000-kernel-modules.
2. x86 BSP supporting SMB reboot

X-link: facebookexternal/openbmc.cisco#64

Test Plan:
1. Run "wedge_power.sh off"
3. Run "wedge_power.sh reset"

Reviewed By: joancaneus, tao-ren

fbshipit-source-id: a575f647e821871ad036fc9f8f71151f4a9a5fc6
  • Loading branch information
Bin Huang authored and facebook-github-bot committed Nov 2, 2022
1 parent b756dd6 commit 2752495
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,18 @@ userver_power_off() {

# Safe to perform power operation
MSD=/sys/bus/platform/devices/msd
XIL=/sys/bus/platform/devices/xil
if [ -w ${MSD} ]; then
echo 0 > ${MSD}/cfg7
echo power-off > ${MSD}/control
if [ -w ${XIL} ]; then
# Reset SMB power
echo 0 > ${XIL}/cfg7
echo 0x400 > ${XIL}/cfg7
else
#Error: XIL driver not loaded
return 1
fi
else
# Write 0x00000000 at Cyclonus 0x0000103c
i2cset -f -y 2 0x21 0x3c
Expand Down Expand Up @@ -132,9 +141,18 @@ userver_reset() {
fi

MSD=/sys/bus/platform/devices/msd
XIL=/sys/bus/platform/devices/xil
if [ -w ${MSD} ]; then
echo 0 > ${MSD}/cfg7
echo cold-reset > ${MSD}/control
if [ -w ${XIL} ]; then
# Reset SMB power
echo 0 > ${XIL}/cfg7
echo 0x400 > ${XIL}/cfg7
else
#Error: XIL driver not loaded
return 1
fi
else
# Write 0x00000000 at Cyclonus 0x0000103c
i2cset -f -y 2 0x21 0x3c
Expand Down

0 comments on commit 2752495

Please sign in to comment.