summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary Ruthven <mruthven@chromium.org>2021-01-05 17:08:19 -0800
committerCommit Bot <commit-bot@chromium.org>2021-01-06 23:07:44 +0000
commitade6b1e007428e85dc9b69e9a9c259bc6622f0d4 (patch)
tree1804c0e4eeb027c4d59301c6086751189c728c4d
parent9b36fc44ad92c9524aece3830dc6fd76acd4945a (diff)
downloadchrome-ec-ade6b1e007428e85dc9b69e9a9c259bc6622f0d4.tar.gz
coil: rename sleepmasks
BUG=b:175244613 TEST=make buildall -j Change-Id: I693fa068dc9bbf4babb1a63e35d4536f5eba1e88 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613460 Reviewed-by: Namyoon Woo <namyoon@chromium.org>
-rw-r--r--chip/g/i2cs.c4
-rw-r--r--common/i2c_master.c4
-rw-r--r--include/system.h7
3 files changed, 8 insertions, 7 deletions
diff --git a/chip/g/i2cs.c b/chip/g/i2cs.c
index 6bebd1d784..9aa73d18cb 100644
--- a/chip/g/i2cs.c
+++ b/chip/g/i2cs.c
@@ -273,7 +273,7 @@ void __attribute__((used)) _i2cs_write_complete_int(void)
GWRITE_FIELD(I2CS, INT_STATE, INTR_WRITE_COMPLETE, 1);
/* We're receiving some bytes, so don't sleep */
- disable_sleep(SLEEP_MASK_I2C_SLAVE);
+ disable_sleep(SLEEP_MASK_I2C_PERIPH);
if (write_complete_handler_) {
uint16_t bytes_written;
@@ -330,7 +330,7 @@ void __attribute__((used)) _i2cs_write_complete_int(void)
* disabled again in the next I2CS interrupt.
*/
delay_sleep_by(1 * SECOND);
- enable_sleep(SLEEP_MASK_I2C_SLAVE);
+ enable_sleep(SLEEP_MASK_I2C_PERIPH);
}
DECLARE_IRQ(GC_IRQNUM_I2CS0_INTR_WRITE_COMPLETE_INT,
_i2cs_write_complete_int, 1);
diff --git a/common/i2c_master.c b/common/i2c_master.c
index 399303cc17..c7f8530eac 100644
--- a/common/i2c_master.c
+++ b/common/i2c_master.c
@@ -199,7 +199,7 @@ void i2c_lock(int port, int lock)
i2c_port_active_list |= 1 << port;
/* Ec cannot enter sleep if there's any i2c port active. */
- disable_sleep(SLEEP_MASK_I2C_MASTER);
+ disable_sleep(SLEEP_MASK_I2C_CONTROLLER);
interrupt_enable();
} else {
@@ -208,7 +208,7 @@ void i2c_lock(int port, int lock)
i2c_port_active_list &= ~BIT(port);
/* Once there is no i2c port active, enable sleep bit of i2c. */
if (!i2c_port_active_list)
- enable_sleep(SLEEP_MASK_I2C_MASTER);
+ enable_sleep(SLEEP_MASK_I2C_CONTROLLER);
interrupt_enable();
diff --git a/include/system.h b/include/system.h
index 4862ad2dc0..60a50c6975 100644
--- a/include/system.h
+++ b/include/system.h
@@ -419,14 +419,15 @@ enum {
*/
SLEEP_MASK_AP_RUN = BIT(0), /* the main CPU is running */
SLEEP_MASK_UART = BIT(1), /* UART communication ongoing */
- SLEEP_MASK_I2C_MASTER = BIT(2), /* I2C master communication ongoing */
+ SLEEP_MASK_I2C_CONTROLLER
+ = BIT(2), /* I2C communication ongoing */
SLEEP_MASK_CHARGING = BIT(3), /* Charging loop ongoing */
SLEEP_MASK_USB_PWR = BIT(4), /* USB power loop ongoing */
SLEEP_MASK_USB_PD = BIT(5), /* USB PD device connected */
SLEEP_MASK_SPI = BIT(6), /* SPI communications ongoing */
- SLEEP_MASK_I2C_SLAVE = BIT(7), /* I2C slave communication ongoing */
+ SLEEP_MASK_I2C_PERIPH = BIT(7), /* I2C periph communication ongoing */
SLEEP_MASK_AP_RO_VERIFICATION
- = BIT(8), /* AP RO verification failure. */
+ = BIT(8), /* AP RO verification failure. */
SLEEP_MASK_USB_DEVICE = BIT(9), /* Generic USB device in use */
SLEEP_MASK_PWM = BIT(10), /* PWM output is enabled */
SLEEP_MASK_PHYSICAL_PRESENCE = BIT(11), /* Physical presence