diff options
-rw-r--r-- | board/kunimitsu/board.h | 4 | ||||
-rw-r--r-- | chip/it83xx/i2c.c | 2 | ||||
-rw-r--r-- | chip/lm4/adc.c | 2 | ||||
-rw-r--r-- | chip/lm4/i2c.c | 2 | ||||
-rw-r--r-- | chip/mec1322/adc.c | 6 | ||||
-rw-r--r-- | chip/mec1322/i2c.c | 2 | ||||
-rw-r--r-- | chip/npcx/adc.c | 2 |
7 files changed, 9 insertions, 11 deletions
diff --git a/board/kunimitsu/board.h b/board/kunimitsu/board.h index b32b851d2f..dd50bcb86b 100644 --- a/board/kunimitsu/board.h +++ b/board/kunimitsu/board.h @@ -52,11 +52,7 @@ #define CONFIG_LED_COMMON #define CONFIG_LID_SWITCH #define CONFIG_LOW_POWER_IDLE -/* - * TODO: Issue is seen with LTO feature, further debug is needed. - * #define CONFIG_LTO - */ #define CONFIG_POWER_BUTTON #define CONFIG_POWER_BUTTON_X86 #define CONFIG_POWER_COMMON diff --git a/chip/it83xx/i2c.c b/chip/it83xx/i2c.c index d2aac92604..bc10a5970f 100644 --- a/chip/it83xx/i2c.c +++ b/chip/it83xx/i2c.c @@ -137,7 +137,7 @@ struct i2c_port_data { enum i2c_ch_status i2ccs; /* Task waiting on port, or TASK_ID_INVALID if none. */ - int task_waiting; + volatile int task_waiting; }; static struct i2c_port_data pdata[I2C_PORT_COUNT]; diff --git a/chip/lm4/adc.c b/chip/lm4/adc.c index 69338c61b0..40d5b3770d 100644 --- a/chip/lm4/adc.c +++ b/chip/lm4/adc.c @@ -21,7 +21,7 @@ /* Maximum time we allow for an ADC conversion */ #define ADC_TIMEOUT_US SECOND -static task_id_t task_waiting_on_ss[LM4_ADC_SEQ_COUNT]; +static volatile task_id_t task_waiting_on_ss[LM4_ADC_SEQ_COUNT]; static void configure_gpio(void) { diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c index 9f3db7426f..6f3efb700e 100644 --- a/chip/lm4/i2c.c +++ b/chip/lm4/i2c.c @@ -65,7 +65,7 @@ struct i2c_port_data { uint32_t timeout_us; /* Transaction timeout, or 0 to use default */ /* Task waiting on port, or TASK_ID_INVALID if none. */ - int task_waiting; + volatile int task_waiting; }; static struct i2c_port_data pdata[I2C_PORT_COUNT]; diff --git a/chip/mec1322/adc.c b/chip/mec1322/adc.c index 037f270428..841c3c7e32 100644 --- a/chip/mec1322/adc.c +++ b/chip/mec1322/adc.c @@ -21,7 +21,7 @@ struct mutex adc_lock; -static task_id_t task_waiting; +static volatile task_id_t task_waiting; static int start_single_and_wait(int timeout) { @@ -69,8 +69,10 @@ int adc_read_all_channels(int *data) for (i = 0; i < ADC_CH_COUNT; ++i) MEC1322_ADC_SINGLE |= 1 << adc_channels[i].channel; - if (!start_single_and_wait(ADC_SINGLE_READ_TIME * ADC_CH_COUNT)) + if (!start_single_and_wait(ADC_SINGLE_READ_TIME * ADC_CH_COUNT)) { + ret = EC_ERROR_TIMEOUT; goto exit_all_channels; + } for (i = 0; i < ADC_CH_COUNT; ++i) { adc = adc_channels + i; diff --git a/chip/mec1322/i2c.c b/chip/mec1322/i2c.c index a800e9e780..5a0cc850cb 100644 --- a/chip/mec1322/i2c.c +++ b/chip/mec1322/i2c.c @@ -55,7 +55,7 @@ struct { /* Transaction timeout, or 0 to use default. */ uint32_t timeout_us; /* Task waiting on port, or TASK_ID_INVALID if none. */ - task_id_t task_waiting; + volatile task_id_t task_waiting; } cdata[I2C_CONTROLLER_COUNT]; static void configure_controller_speed(int controller, int kbps) diff --git a/chip/npcx/adc.c b/chip/npcx/adc.c index ba80162f45..24a866c2a9 100644 --- a/chip/npcx/adc.c +++ b/chip/npcx/adc.c @@ -34,7 +34,7 @@ enum npcx_adc_conversion_mode { }; /* Global variables */ -static task_id_t task_waiting; +static volatile task_id_t task_waiting; /** * Preset ADC operation clock. |