chip/mec1322/system.c: Format with clang-format
BRANCH=none
TEST=none
@@ -34,9 +34,9 @@ static void check_reset_cause(void)
{
uint32_t status = MEC1322_VBAT_STS;
uint32_t flags = 0;
- uint32_t rst_sts = MEC1322_PCR_CHIP_PWR_RST &
- (MEC1322_PWR_RST_STS_VCC1 |
- MEC1322_PWR_RST_STS_VBAT);
+ uint32_t rst_sts =
+ MEC1322_PCR_CHIP_PWR_RST &
+ (MEC1322_PWR_RST_STS_VCC1 | MEC1322_PWR_RST_STS_VBAT);
/* Clear the reset causes now that we've read them */
MEC1322_VBAT_STS |= status;
@@ -48,12 +48,11 @@ static void check_reset_cause(void)
if (rst_sts & MEC1322_PWR_RST_STS_VCC1)
flags |= EC_RESET_FLAG_RESET_PIN;
-
flags |= MEC1322_VBAT_RAM(HIBDATA_INDEX_SAVED_RESET_FLAGS);
MEC1322_VBAT_RAM(HIBDATA_INDEX_SAVED_RESET_FLAGS) = 0;
- if ((status & MEC1322_VBAT_STS_WDT) && !(flags & (EC_RESET_FLAG_SOFT |
- EC_RESET_FLAG_HARD |
+ if ((status & MEC1322_VBAT_STS_WDT) &&
+ !(flags & (EC_RESET_FLAG_SOFT | EC_RESET_FLAG_HARD |
EC_RESET_FLAG_HIBERNATE)))
flags |= EC_RESET_FLAG_WATCHDOG;
@@ -105,8 +104,7 @@ uint32_t chip_read_reset_flags(void)
return MEC1322_VBAT_RAM(HIBDATA_INDEX_SAVED_RESET_FLAGS);
}
-noreturn
-void _system_reset(int flags, int wake_from_hibernate)
+noreturn void _system_reset(int flags, int wake_from_hibernate)
{
uint32_t save_flags = 0;
@@ -389,6 +387,6 @@ uint32_t system_get_lfw_address(void)
void system_set_image_copy(enum ec_image copy)
{
- MEC1322_VBAT_RAM(MEC1322_IMAGETYPE_IDX) = (copy == EC_IMAGE_RW) ?
- EC_IMAGE_RW : EC_IMAGE_RO;
+ MEC1322_VBAT_RAM(MEC1322_IMAGETYPE_IDX) =
+ (copy == EC_IMAGE_RW) ? EC_IMAGE_RW : EC_IMAGE_RO;
}
