diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-03-11 15:57:52 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-26 04:42:55 -0700 |
commit | bb266fc26fc05d4ab22de6ad7bce5b477c9f9140 (patch) | |
tree | f6ada087f62246c3a9547e649ac8846b0ed6d5ab /chip/ish/ipc_heci.c | |
parent | 0bfc511527cf2aebfa163c63a1d028419ca0b0c3 (diff) | |
download | chrome-ec-bb266fc26fc05d4ab22de6ad7bce5b477c9f9140.tar.gz |
common: replace 1 << digits, with BIT(digits)
Requested for linux integration, use BIT instead of 1 <<
First step replace bit operation with operand containing only digits.
Fix an error in motion_lid try to set bit 31 of a signed integer.
BUG=None
BRANCH=None
TEST=compile
Change-Id: Ie843611f2f68e241f0f40d4067f7ade726951d29
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1518659
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'chip/ish/ipc_heci.c')
-rw-r--r-- | chip/ish/ipc_heci.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/chip/ish/ipc_heci.c b/chip/ish/ipc_heci.c index 9574f38799..b7c471e802 100644 --- a/chip/ish/ipc_heci.c +++ b/chip/ish/ipc_heci.c @@ -58,25 +58,25 @@ #define MNG_ILLEGAL_CMD 0xFF /* Peripheral Interrupt Satus Register */ -#define IPC_PISR_HOST2ISH_BIT (1<<0) -#define IPC_PISR_PMC2ISH_BIT (1<<1) -#define IPC_PISR_CSME2ISH_BIT (1<<2) +#define IPC_PISR_HOST2ISH_BIT BIT(0) +#define IPC_PISR_PMC2ISH_BIT BIT(1) +#define IPC_PISR_CSME2ISH_BIT BIT(2) /* Peripheral Interrupt Mask Register */ -#define IPC_PIMR_HOST2ISH_BIT (1<<0) -#define IPC_PIMR_PMC2ISH_BIT (1<<1) -#define IPC_PIMR_CSME2ISH_BIT (1<<2) +#define IPC_PIMR_HOST2ISH_BIT BIT(0) +#define IPC_PIMR_PMC2ISH_BIT BIT(1) +#define IPC_PIMR_CSME2ISH_BIT BIT(2) -#define IPC_PIMR_ISH2HOST_CLR_BIT (1<<11) -#define IPC_PIMR_ISH2PMC_CLR_BIT (1<<12) -#define IPC_PIMR_ISH2CSME_CLR_BIT (1<<13) +#define IPC_PIMR_ISH2HOST_CLR_BIT BIT(11) +#define IPC_PIMR_ISH2PMC_CLR_BIT BIT(12) +#define IPC_PIMR_ISH2CSME_CLR_BIT BIT(13) /* Peripheral Interrupt DB(DoorBell) Clear Status Register */ -#define IPC_DB_CLR_STS_ISH2HOST_BIT (1<<0) -#define IPC_DB_CLR_STS_ISH2ISP_BIT (1<<2) -#define IPC_DB_CLR_STS_ISH2AUDIO_BIT (1<<3) -#define IPC_DB_CLR_STS_ISH2PMC_BIT (1<<8) -#define IPC_DB_CLR_STS_ISH2CSME_BIT (1<<16) +#define IPC_DB_CLR_STS_ISH2HOST_BIT BIT(0) +#define IPC_DB_CLR_STS_ISH2ISP_BIT BIT(2) +#define IPC_DB_CLR_STS_ISH2AUDIO_BIT BIT(3) +#define IPC_DB_CLR_STS_ISH2PMC_BIT BIT(8) +#define IPC_DB_CLR_STS_ISH2CSME_BIT BIT(16) /* Doorbell */ #define IPC_DB_MSG_LENGTH_FIELD 0x3FF |