mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 06:46:49 +07:00
mlxsw: reg: Extend sensor index field size of Management Temperature Register
Extend the size of sensor_index field of MTMP (Management Temperature Register), from 8 to 12 bits due to hardware change. Add define for sensor index for Gear Box (inter-connects) temperature reading. Signed-off-by: Vadim Pasternak <vadimp@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
961cf99a07
commit
ae57467836
@ -8039,13 +8039,14 @@ MLXSW_ITEM32(reg, mtcap, sensor_count, 0x00, 0, 7);
|
||||
|
||||
MLXSW_REG_DEFINE(mtmp, MLXSW_REG_MTMP_ID, MLXSW_REG_MTMP_LEN);
|
||||
|
||||
#define MLXSW_REG_MTMP_GBOX_INDEX_MIN 256
|
||||
/* reg_mtmp_sensor_index
|
||||
* Sensors index to access.
|
||||
* 64-127 of sensor_index are mapped to the SFP+/QSFP modules sequentially
|
||||
* (module 0 is mapped to sensor_index 64).
|
||||
* Access: Index
|
||||
*/
|
||||
MLXSW_ITEM32(reg, mtmp, sensor_index, 0x00, 0, 7);
|
||||
MLXSW_ITEM32(reg, mtmp, sensor_index, 0x00, 0, 11);
|
||||
|
||||
/* Convert to milli degrees Celsius */
|
||||
#define MLXSW_REG_MTMP_TEMP_TO_MC(val) (val * 125)
|
||||
@ -8107,7 +8108,7 @@ MLXSW_ITEM32(reg, mtmp, temperature_threshold_lo, 0x10, 0, 16);
|
||||
*/
|
||||
MLXSW_ITEM_BUF(reg, mtmp, sensor_name, 0x18, MLXSW_REG_MTMP_SENSOR_NAME_SIZE);
|
||||
|
||||
static inline void mlxsw_reg_mtmp_pack(char *payload, u8 sensor_index,
|
||||
static inline void mlxsw_reg_mtmp_pack(char *payload, u16 sensor_index,
|
||||
bool max_temp_enable,
|
||||
bool max_temp_reset)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user