Skip to content

Commit

Permalink
Merge pull request #75 from SW-CSA/cel_develop
Browse files Browse the repository at this point in the history
Fix the but power command return fail after add CPU S0 status
  • Loading branch information
MickeyZhan authored May 9, 2019
2 parents 5823b6a + 090c65b commit 7b75a03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,10 @@ static const i2c_dev_attr_st syscpld_attr_table_fishbone[] = {
"0x1: SUS_S3_N\n"
"0x2: SUS_S4_N\n"
"0x4: SUS_S5_N\n"
"0x8: SUS_STAT_N\n"
"0x10: SUS_S0_N",
"0x8: SUS_STAT_N",
I2C_DEV_ATTR_SHOW_DEFAULT,
NULL,
0x22, 0, 5,
0x22, 0, 4,
},
{
"bios_cs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ wedge_is_us_on() {
((val=$(cat $USRV_STATUS_SYSFS 2> /dev/null | head -n 1)))
if [ -z "$val" ]; then
return $default
elif [ $val -eq 31 ]; then
elif [ $val -eq 15 ]; then
return 0 # powered on
elif [ $val -eq 8 ]; then
return 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ come_status_monitor() {
if [ $st -gt 0 ]; then
logger "COMe status arrive SUS_S3 status"
fi
((st=$val&0x10))
((tmp=$(i2cget -f -y 0 0x0d 0x18 2> /dev/null | head -n 1)))
((st=$tmp&0x08))
if [ $st -gt 0 ]; then
logger "COMe status arrive SUS_S0 status"
fi
Expand Down

0 comments on commit 7b75a03

Please sign in to comment.