summaryrefslogtreecommitdiff
path: root/chip/ish/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/ish/i2c.c')
-rw-r--r--chip/ish/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/chip/ish/i2c.c b/chip/ish/i2c.c
index 525bee3732..79f0dd13de 100644
--- a/chip/ish/i2c.c
+++ b/chip/ish/i2c.c
@@ -335,7 +335,7 @@ int chip_i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size,
if (in_size > (ISH_I2C_FIFO_SIZE - out_size)) {
while ((i2c_mmio_read(ctx->base, IC_STATUS) &
- (1 << IC_STATUS_TFE)) == 0) {
+ BIT(IC_STATUS_TFE)) == 0) {
if (__hw_clock_source_read() >= expire_ts) {
ctx->error_flag = 1;
@@ -398,7 +398,7 @@ int chip_i2c_xfer(int port, int slave_addr, const uint8_t *out, int out_size,
expire_ts = __hw_clock_source_read() + I2C_TSC_TIMEOUT;
while (i2c_mmio_read(ctx->base, IC_STATUS) &
- (1 << IC_STATUS_MASTER_ACTIVITY)) {
+ BIT(IC_STATUS_MASTER_ACTIVITY)) {
if (__hw_clock_source_read() >= expire_ts) {
ctx->error_flag = 1;