mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-08 16:41:55 +00:00
Clean up hook priorties on LM4
Fan no longer needs a special priority to wait for the host memmap to become available, since LPC inits earlier. I2C and PECI don't need explicit ordering on freq change. Thermal now uses the explicit prio for temp sensors done. Commented hook test. BUG=chromium:314768 BRANCH=none TEST=boot link; enable/disable PLL; verify fanset and temps commands work afterwards. Change-Id: I71766614dff2950dd307acd0635405e6b59e330a Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/175601 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
e297b72563
commit
5d672b91a7
@@ -269,7 +269,7 @@ static void i2c_freq_changed(void)
|
||||
LM4_I2C_MTPR(i2c_ports[i].port) = tpr;
|
||||
}
|
||||
}
|
||||
DECLARE_HOOK(HOOK_FREQ_CHANGE, i2c_freq_changed, HOOK_PRIO_DEFAULT + 1);
|
||||
DECLARE_HOOK(HOOK_FREQ_CHANGE, i2c_freq_changed, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void i2c_init(void)
|
||||
{
|
||||
|
||||
@@ -113,7 +113,7 @@ static void peci_freq_changed(void)
|
||||
(PECI_RETRY_COUNT << 12) |
|
||||
(PECI_ERROR_BYPASS << 11);
|
||||
}
|
||||
DECLARE_HOOK(HOOK_FREQ_CHANGE, peci_freq_changed, HOOK_PRIO_DEFAULT - 1);
|
||||
DECLARE_HOOK(HOOK_FREQ_CHANGE, peci_freq_changed, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void peci_init(void)
|
||||
{
|
||||
|
||||
@@ -373,7 +373,7 @@ static void pwm_fan_init(void)
|
||||
for (i = 0; i < EC_FAN_SPEED_ENTRIES; i++)
|
||||
mapped[i] = EC_FAN_SPEED_NOT_PRESENT;
|
||||
}
|
||||
DECLARE_HOOK(HOOK_INIT, pwm_fan_init, HOOK_PRIO_DEFAULT + 1);
|
||||
DECLARE_HOOK(HOOK_INIT, pwm_fan_init, HOOK_PRIO_DEFAULT);
|
||||
|
||||
static void pwm_fan_second(void)
|
||||
{
|
||||
|
||||
@@ -166,7 +166,7 @@ static void thermal_control(void)
|
||||
}
|
||||
|
||||
/* Wait until after the sensors have been read */
|
||||
DECLARE_HOOK(HOOK_SECOND, thermal_control, HOOK_PRIO_TEMP_SENSOR + 1);
|
||||
DECLARE_HOOK(HOOK_SECOND, thermal_control, HOOK_PRIO_TEMP_SENSOR_DONE);
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Console commands */
|
||||
|
||||
@@ -40,6 +40,7 @@ static void tick2_hook(void)
|
||||
tick2_hook_count++;
|
||||
tick_count_seen_by_tick2 = tick_hook_count;
|
||||
}
|
||||
/* tick2_hook() prio means it should be called after tick_hook() */
|
||||
DECLARE_HOOK(HOOK_TICK, tick2_hook, HOOK_PRIO_DEFAULT+1);
|
||||
|
||||
static void second_hook(void)
|
||||
|
||||
Reference in New Issue
Block a user