diff options
-rw-r--r-- | chip/lm4/jtag.c | 13 | ||||
-rw-r--r-- | chip/stm32/jtag-stm32f100.c | 4 | ||||
-rw-r--r-- | chip/stm32/jtag-stm32l15x.c | 4 | ||||
-rw-r--r-- | include/jtag.h | 6 |
4 files changed, 12 insertions, 15 deletions
diff --git a/chip/lm4/jtag.c b/chip/lm4/jtag.c index 22c9080917..bfa9b1e7de 100644 --- a/chip/lm4/jtag.c +++ b/chip/lm4/jtag.c @@ -6,20 +6,21 @@ #include "jtag.h" #include "registers.h" - -int jtag_pre_init(void) +void jtag_pre_init(void) { /* Enable clocks to GPIO block C */ LM4_SYSTEM_RCGCGPIO |= 0x0004; - /* Ensure PC0:3 are set to JTAG function. They should be set this way + /* + * Ensure PC0:3 are set to JTAG function. They should be set this way * on a cold boot, but on a warm reboot a previous misbehaving image - * could have set them differently. */ + * could have set them differently. + */ if (((LM4_GPIO_PCTL(LM4_GPIO_C) & 0x0000ffff) == 0x00001111) && ((LM4_GPIO_AFSEL(LM4_GPIO_C) & 0x0f) == 0x0f) && ((LM4_GPIO_DEN(LM4_GPIO_C) & 0x0f) == 0x0f) && ((LM4_GPIO_PUR(LM4_GPIO_C) & 0x0f) == 0x0f)) - return EC_SUCCESS; /* Already properly configured */ + return; /* Already properly configured */ /* Unlock commit register for JTAG pins */ LM4_GPIO_LOCK(LM4_GPIO_C) = LM4_GPIO_LOCK_UNLOCK; @@ -35,6 +36,4 @@ int jtag_pre_init(void) /* Re-lock commit register */ LM4_GPIO_CR(LM4_GPIO_C) &= ~0x0f; LM4_GPIO_LOCK(LM4_GPIO_C) = 0; - - return EC_SUCCESS; } diff --git a/chip/stm32/jtag-stm32f100.c b/chip/stm32/jtag-stm32f100.c index 17b4e08ff1..9d55fdb906 100644 --- a/chip/stm32/jtag-stm32f100.c +++ b/chip/stm32/jtag-stm32f100.c @@ -7,10 +7,8 @@ #include "jtag.h" #include "registers.h" -int jtag_pre_init(void) +void jtag_pre_init(void) { /* stop TIM1-4 and watchdogs when the JTAG stops the CPU */ STM32_DBGMCU_CR |= 0x00003f00; - - return EC_SUCCESS; } diff --git a/chip/stm32/jtag-stm32l15x.c b/chip/stm32/jtag-stm32l15x.c index 7b65400b1c..71e5f711e2 100644 --- a/chip/stm32/jtag-stm32l15x.c +++ b/chip/stm32/jtag-stm32l15x.c @@ -7,10 +7,8 @@ #include "jtag.h" #include "registers.h" -int jtag_pre_init(void) +void jtag_pre_init(void) { /* stop TIM2-4 and watchdogs when the JTAG stops the CPU */ STM32_DBGMCU_APB1FZ |= 0x00001807; - - return EC_SUCCESS; } diff --git a/include/jtag.h b/include/jtag.h index 6dd83a92bf..690158b4ec 100644 --- a/include/jtag.h +++ b/include/jtag.h @@ -10,7 +10,9 @@ #include "common.h" -/* Pre-initializes the module. */ -int jtag_pre_init(void); +/** + * Pre-initialize the JTAG module. + */ +void jtag_pre_init(void); #endif /* __CROS_EC_JTAG_H */ |