summaryrefslogtreecommitdiff
path: root/chip/ish/aontaskfw/ish_aontask.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2019-04-15 11:14:41 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-24 15:52:08 -0700
commitd2ac74c21848c1cec16d5e72d28f93eb15c5d869 (patch)
tree729d55380b5edd52890c39f1730492a7e7748712 /chip/ish/aontaskfw/ish_aontask.c
parent2ece52589486990cca666dc3ebc4164d5f2c0aed (diff)
downloadchrome-ec-d2ac74c21848c1cec16d5e72d28f93eb15c5d869.tar.gz
ish: refactor bit-mask constants to use BIT macro
We should be using the BIT(n) macro rather than (1 << n), as it prevents errors, and makes the intended purpose a little bit easier to read. BRANCH=none BUG=none TEST=make buildall -j Change-Id: Ia727ac2f8e5abfb852ba78d5cba19d7c8af72839 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1567688 Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/ish/aontaskfw/ish_aontask.c')
-rw-r--r--chip/ish/aontaskfw/ish_aontask.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/chip/ish/aontaskfw/ish_aontask.c b/chip/ish/aontaskfw/ish_aontask.c
index 3426622357..374497b1ba 100644
--- a/chip/ish/aontaskfw/ish_aontask.c
+++ b/chip/ish/aontaskfw/ish_aontask.c
@@ -483,7 +483,8 @@ static void sram_power(int on)
static void handle_d0i2(void)
{
/* set main SRAM into retention mode*/
- PMU_LDO_CTRL = PMU_LDO_BIT_RETENTION_ON | PMU_LDO_BIT_ON;
+ PMU_LDO_CTRL = PMU_LDO_ENABLE_BIT
+ | PMU_LDO_RETENTION_BIT;
/* delay some cycles before halt */
delay(SRAM_RETENTION_CYCLES_DELAY);
@@ -492,13 +493,13 @@ static void handle_d0i2(void)
/* wakeup from PMU interrupt */
/* set main SRAM intto normal mode */
- PMU_LDO_CTRL = PMU_LDO_BIT_ON;
+ PMU_LDO_CTRL = PMU_LDO_ENABLE_BIT;
/**
* poll LDO_READY status to make sure SRAM LDO is on
* (exited retention mode)
*/
- while (!(PMU_LDO_CTRL & PMU_LDO_BIT_READY))
+ while (!(PMU_LDO_CTRL & PMU_LDO_READY_BIT))
continue;
}