summaryrefslogtreecommitdiffstats
path: root/meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h
diff options
context:
space:
mode:
Diffstat (limited to 'meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h')
-rw-r--r--meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h149
1 files changed, 0 insertions, 149 deletions
diff --git a/meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h b/meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h
deleted file mode 100644
index b3f542a..0000000
--- a/meta-facebook/meta-yosemite/recipes-yosemite/fblibs/files/pal/pal.h
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- *
- * Copyright 2015-present Facebook. All Rights Reserved.
- *
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __PAL_H__
-#define __PAL_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <facebook/bic.h>
-#include <facebook/yosemite_common.h>
-#include <facebook/yosemite_fruid.h>
-#include <facebook/yosemite_sensor.h>
-
-#define MAX_KEY_LEN 64
-#define MAX_VALUE_LEN 64
-
-#define KV_STORE "/mnt/data/kv_store/%s"
-#define KV_STORE_PATH "/mnt/data/kv_store"
-
-#define SETBIT(x, y) (x | (1 << y))
-#define GETBIT(x, y) ((x & (1 << y)) > y)
-#define CLEARBIT(x, y) (x & (~(1 << y)))
-#define GETMASK(y) (1 << y)
-
-extern char * key_list[];
-extern const char pal_fru_list[];
-extern const char pal_server_list[];
-
-enum {
- LED_STATE_OFF,
- LED_STATE_ON,
-};
-
-enum {
- USB_MUX_OFF,
- USB_MUX_ON,
-};
-
-enum {
- SERVER_POWER_OFF,
- SERVER_POWER_ON,
- SERVER_POWER_CYCLE,
- SERVER_GRACEFUL_SHUTDOWN,
- SERVER_12V_OFF,
- SERVER_12V_ON,
- SERVER_12V_CYCLE,
-};
-
-enum {
- HAND_SW_SERVER1 = 1,
- HAND_SW_SERVER2,
- HAND_SW_SERVER3,
- HAND_SW_SERVER4,
- HAND_SW_BMC
-};
-
-enum {
- SYSTEM_EVENT = 0xE9,
- THERM_THRESH_EVT = 0x7D,
- BUTTON = 0xAA,
- POWER_STATE = 0xAB,
- CRITICAL_IRQ = 0xEA,
- POST_ERROR = 0x2B,
- MACHINE_CHK_ERR = 0x40,
- PCIE_ERR = 0x41,
- IIO_ERR = 0x43,
- MEMORY_ECC_ERR = 0X63,
- PROCHOT_EXT = 0X51,
- PWR_ERR = 0X56,
- CATERR= 0xEB,
-};
-
-int pal_get_platform_name(char *name);
-int pal_get_num_slots(uint8_t *num);
-int pal_is_server_prsnt(uint8_t slot_id, uint8_t *status);
-int pal_get_server_power(uint8_t slot_id, uint8_t *status);
-int pal_set_server_power(uint8_t slot_id, uint8_t cmd);
-int pal_sled_cycle(void);
-int pal_is_debug_card_prsnt(uint8_t *status);
-int pal_get_hand_sw(uint8_t *pos);
-int pal_switch_usb_mux(uint8_t slot);
-int pal_switch_uart_mux(uint8_t slot);
-int pal_post_enable(uint8_t slot);
-int pal_post_disable(uint8_t slot);
-int pal_post_get_last(uint8_t slot, uint8_t *post);
-int pal_post_handle(uint8_t slot, uint8_t status);
-int pal_get_pwr_btn(uint8_t *status);
-int pal_get_rst_btn(uint8_t *status);
-int pal_set_rst_btn(uint8_t slot, uint8_t status);
-int pal_set_led(uint8_t slot, uint8_t status);
-int pal_set_hb_led(uint8_t status);
-int pal_set_id_led(uint8_t slot, uint8_t status);
-int pal_get_fru_id(char *fru_str, uint8_t *fru);
-int pal_get_fru_name(uint8_t fru, char *name);
-int pal_get_fruid_path(uint8_t fru, char *path);
-int pal_get_fruid_eeprom_path(uint8_t fru, char *path);
-int pal_get_fruid_name(uint8_t fru, char *name);
-int pal_get_fru_sdr_path(uint8_t fru, char *path);
-int pal_get_sensor_units(uint8_t fru, uint8_t sensor_num, char *units);
-int pal_get_fru_sensor_list(uint8_t fru, uint8_t **sensor_list, int *cnt);
-int pal_get_fru_discrete_list(uint8_t fru, uint8_t **sensor_list, int *cnt);
-int pal_sensor_sdr_init(uint8_t fru, sensor_info_t *sinfo);
-int pal_sensor_read(uint8_t fru, uint8_t sensor_num, void *value);
-int pal_get_sensor_name(uint8_t fru, uint8_t sensor_num, char *name);
-int pal_get_sensor_threshold(uint8_t fru, uint8_t sensor_num, uint8_t thresh,
- void *value);
-int pal_get_key_value(char *key, char *value);
-int pal_set_key_value(char *key, char *value);
-int pal_set_def_key_value();
-void pal_dump_key_value(void);
-int pal_get_fru_devtty(uint8_t fru, char *devtty);
-int pal_get_last_pwr_state(uint8_t fru, char *state);
-int pal_set_last_pwr_state(uint8_t fru, char *state);
-int pal_get_sys_guid(uint8_t slot, char *guid);
-int pal_set_sysfw_ver(uint8_t slot, uint8_t *ver);
-int pal_get_sysfw_ver(uint8_t slot, uint8_t *ver);
-int pal_fruid_write(uint8_t slot, char *path);
-int pal_is_bmc_por(void);
-int pal_sensor_discrete_check(uint8_t fru, uint8_t snr_num, char *snr_name,
- uint8_t o_val, uint8_t n_val);
-int pal_get_event_sensor_name(uint8_t fru, uint8_t snr_num, char *name);
-int pal_parse_sel(uint8_t fru, uint8_t snr_num, uint8_t *event_data,
- char *error_log);
-int pal_sel_handler(uint8_t fru, uint8_t snr_num);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif /* __PAL_H__ */
OpenPOWER on IntegriCloud