Skip to content

Commit

Permalink
Merge pull request #79 from SW-CSA/cel_develop
Browse files Browse the repository at this point in the history
Cel develop
  • Loading branch information
MickeyZhan authored May 29, 2019
2 parents ed6e2f1 + 2f7ce91 commit 37f6b8b
Show file tree
Hide file tree
Showing 12 changed files with 649 additions and 375 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

230 changes: 157 additions & 73 deletions meta-celestica/meta-as58xx-cl/recipes-core/fan-ctrl/fan-ctrl/fand_v2.cpp

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ struct fantray_info_stu_sysfs {
int status;
int failed; //for fantray fail
int direction;
int eeprom_fail;
struct fan_info_stu_sysfs fan1;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
[PID enable]
PID_enable=0

[Switch_inlet]
[SWITCH_TEMP]
setpoint = 95
P = 3
I = 0.5
D = 0.5
min_output = 76

[cpu_inlet]
[CPU_TEMP]
setpoint = -15
P = 3
I = 0.5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
[PID enable]
PID_enable = 0

[Switch_inlet]
[SWITCH_TEMP]
setpoint = 86
P = 3
I = 0.3
D = 0.3
min_output = 115

[cpu_inlet]
[CPU_TEMP]
setpoint = 89
P = 3
I = 0.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,30 +80,30 @@ static irqreturn_t cpu_error_handler(int irq, void *dev_id)
case CPU_AER_0_GPIO:
if(value) {
if(aer_0_assert == 1)
printk(KERN_ALERT "AER ERR[0] is recovered\n");
printk(KERN_WARNING "ERR[0] is recovered\n");
aer_0_assert = 0;
} else {
printk(KERN_ALERT "AER ERR[0] is asserted\n");
printk(KERN_CRIT "ERR[0] asserted, CPU hardware correctable error detected\n");
aer_0_assert = 1;
}
break;
case CPU_AER_1_GPIO:
if(value) {
if(aer_1_assert == 1)
printk(KERN_ALERT "AER ERR[1] is recovered\n");
printk(KERN_WARNING "ERR[1] is recovered\n");
aer_1_assert = 0;
} else {
printk(KERN_ALERT "AER ERR[1] is asserted\n");
printk(KERN_CRIT "ERR[1] asserted, Non-fatal error detected\n");
aer_1_assert = 1;
}
break;
case CPU_AER_2_GPIO:
if(value) {
if(aer_2_assert == 1)
printk(KERN_ALERT "AER ERR[2] is recovered\n");
printk(KERN_WARNING "ERR[2] is recovered\n");
aer_2_assert = 0;
} else {
printk(KERN_ALERT "AER ERR[2] is asserted\n");
printk(KERN_CRIT "ERR[2] asserted, Fatal error detected\n");
aer_2_assert = 1;
}
break;
Expand All @@ -124,16 +124,16 @@ static void mca_error_delay_worker(struct work_struct *work)
struct workqueue_struct *wq = mca_wq;

if(mca_low == 1) {
printk(KERN_ALERT "CATERR# remains asserted\n");
printk(KERN_CRIT "CPU IERR detected\n");
mca_assert = 1;
} else if(mca_low >= 8) {
printk(KERN_ALERT "CATERR# is asserted for 16 BCLKs\n");
printk(KERN_CRIT "CPU MCERR detected\n");
mca_assert = 1;
}

if(mca_high == 1) {
if(mca_assert == 1)
printk(KERN_ALERT "CATERR# is recovered\n");
printk(KERN_WARNING "CPU MCERR/IERR is recovered\n");
mca_assert = 0;
}
mca_low = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,43 +385,43 @@ come_rest_status() {
val=$(cat $COME_RESET_STATUS_SYSFS 2> /dev/null | head -n 1)
case "$val" in
0x11)
info="Power on reset"
info="Last reset type is POWER_ON_RESET"
ret=0 #0x11 powered on reset
;;
0x22)
info="Software trigger CPU to warm reset"
info="Last reset type is Software trigger WARM_RESET"
ret=1 #0x22 Software trigger CPU warm reset
;;
0x33)
info="Software trigger CPU to cold reset"
info="Last reset type is Software trigger COLD_RESET"
ret=2 #0x33 Software trigger CPU cold reset
;;
0x44)
info="CPU warm reset"
info="Last reset type is WARM_RESET"
ret=3 #0x44 CPU warm reset
;;
0x55)
info="CPU cold reset"
info="Last reset type is COLD_RESET"
ret=4 #0x55 CPU cold reset
;;
0x66)
info="Watchdog reset"
info="Last reset type is WDT_RESET"
ret=5 #0x66 CPU watchdog reset
;;
0x77)
info="CPU power cycle"
info="Last reset type is POWER_CYCLE"
ret=6 #0x77 CPU power cycle
;;
*)
info="Power on reset"
info="Last reset type is POWER_ON_RESET"
ret=0 #default power on reset
;;
esac

if [ $silent -eq 0 ]; then
echo "COMe reset status: $info"
echo "$info"
elif [ $silent -eq 2 ]; then
logger "COMe reset status: $info"
logger -p user.crit "$info"
fi

return $ret
Expand Down
Loading

0 comments on commit 37f6b8b

Please sign in to comment.