Skip to content

Commit

Permalink
fby3: dl: support OEM get reading command for ME (#513)
Browse files Browse the repository at this point in the history
Summary:
- Since the HSC has multiple sources, the ME will get power readings from the bic.

Pull Request resolved: #513

Test Plan:
1. Build code : pass

2. IPMI oem command:
root@bmc-oob:~# bic-util slot2 0xc0 0xe2 0x0 0x0 0x0
00 17 00

3. Check the power reading from me:
root@bmc-oob:~# me-util slot2 0xb8 0xc8 0x57 0x01 0x00 0x1 0x0 0x0
57 01 00 18 00 17 00 21 00 18 00 FF FF FF FF EF 2E 00 00 50

Reviewed By: garnermic

Differential Revision: D38989044

Pulled By: GoldenBug

fbshipit-source-id: 9ee622ba0e0658fc123d92537590acf18861bfad
  • Loading branch information
MarshallZhan-wiwynn authored and facebook-github-bot committed Aug 25, 2022
1 parent deb0ec6 commit c174e4f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions meta-facebook/yv3-dl/src/platform/plat_sensor_table.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <logging/log.h>
#include "plat_sensor_table.h"
#include "sensor.h"
#include "ast_adc.h"
Expand All @@ -16,6 +17,8 @@
#include "libutil.h"
#include "util_sys.h"

LOG_MODULE_DECLARE(sensor);

struct k_mutex vr_page_mutex;

sensor_cfg plat_sensor_config[] = {
Expand Down Expand Up @@ -366,3 +369,9 @@ void pal_extend_sensor_config()

return;
}

uint8_t get_hsc_pwr_reading(int *reading)
{
CHECK_NULL_ARG_WITH_RETURN(reading, SENSOR_UNSPECIFIED_ERROR);
return get_sensor_reading(SENSOR_NUM_HSC_PIN, reading, GET_FROM_CACHE);
}

0 comments on commit c174e4f

Please sign in to comment.