Skip to content

Commit

Permalink
[as4630-54npe] modify thermal policy
Browse files Browse the repository at this point in the history
Signed-off-by: willy_liu <[email protected]>
  • Loading branch information
WillyLiu-EC committed Oct 24, 2024
1 parent 8d1f7f1 commit 5f4cda5
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,6 @@ int onlp_sysi_platform_manage_fans(void)
}
temp+=thermali[i].mcelsius;
}

if (temp > 145000)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1), FAN_DUTY_CYCLE_MAX);

if (temp < 105000)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1),75);

/* Get each fan status
*/
for (i = 1; i <= CHASSIS_FAN_COUNT; i++)
Expand All @@ -174,8 +167,6 @@ int onlp_sysi_platform_manage_fans(void)
}
/* Decision 1: Set fan as full speed if any fan is failed.
*/
printf("fan_info.status %d ONLP_FAN_STATUS_FAILED %d ONLP_FAN_STATUS_PRESENT %d \n"
, fan_info.status, ONLP_FAN_STATUS_FAILED, ONLP_FAN_STATUS_PRESENT);
if (fan_info.status & ONLP_FAN_STATUS_FAILED || !(fan_info.status & ONLP_FAN_STATUS_PRESENT))
{
AIM_LOG_ERROR("Fan(%d) is not working, set the other fans as full speed\r\n", i);
Expand All @@ -188,7 +179,15 @@ int onlp_sysi_platform_manage_fans(void)
fan_fail = 0;
}
}
/* if fan status is no fail, check the thermal condition */
if (fan_fail == 0)
{
if (temp > 145000)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1), FAN_DUTY_CYCLE_MAX);

if (temp < 105000)
onlp_fani_percentage_set(ONLP_FAN_ID_CREATE(1),75);
}
/*Thermal shuntdown:LM77(48)>=75C */
if(thermali[3].mcelsius >= 75000)
{
Expand Down

0 comments on commit 5f4cda5

Please sign in to comment.