Skip to content

Commit

Permalink
fby2: Show sled fan latch status in fan-util (#731)
Browse files Browse the repository at this point in the history
Summary:
1. As title, show sled fan latch status when using command "fan-util --get"
Pull Request resolved: facebookexternal/openbmc.wiwynn#731

Test Plan:
Build and test pass on Y2 PVT system.

I. When sled fan latch open:
root@bmc-oob:/tmp/cache_store# fan-util --get
Fan 0 Speed: 9421 RPM (100%)
Fan 1 Speed: 9362 RPM (100%)
Fan Mode: Manual(No fscd running)
Sensor Fail: Not support in manual mode(No fscd running)
Fan Fail: Not support in manual mode(No fscd running)
Sled Fan Latch Open: True

II. When sled fan latch close:
root@bmc-oob:/tmp# fan-util --get
Fan 0 Speed: 2788 RPM (22%)
Fan 1 Speed: 2776 RPM (22%)
Fan Mode: Normal
Sensor Fail: None
Fan Fail: None
Sled Fan Latch Open: False

Reviewed By: benwei13

fbshipit-source-id: 9c48bf3e5
  • Loading branch information
benwei13 authored and facebook-github-bot committed Oct 25, 2018
1 parent aa9df6e commit cb34447
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions meta-facebook/meta-fby2/recipes-fby2/plat-libs/files/pal/pal.c
Original file line number Diff line number Diff line change
Expand Up @@ -8888,3 +8888,18 @@ int
pal_force_update_bic_fw(uint8_t slot_id, uint8_t comp, char *path) {
return force_update_bic_fw(slot_id, comp, path);
}

void
pal_specific_plat_fan_check(bool status)
{
uint8_t is_sled_out = 1;
if (pal_get_fan_latch(&is_sled_out) != 0)
syslog(LOG_WARNING, "%s: Get SLED status in/out failed", __func__);

if(is_sled_out == 0)
printf("Sled Fan Latch Open: False\n");
else
printf("Sled Fan Latch Open: True\n");

return;
}

0 comments on commit cb34447

Please sign in to comment.