diff options
-rw-r--r-- | board/puppy/ec.tasklist | 1 | ||||
-rw-r--r-- | chip/stm32/power_led.c | 6 | ||||
-rw-r--r-- | common/gaia_power.c | 4 | ||||
-rw-r--r-- | common/pmu_tps65090.c | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/board/puppy/ec.tasklist b/board/puppy/ec.tasklist index 7f1f1de257..4cf8e75954 100644 --- a/board/puppy/ec.tasklist +++ b/board/puppy/ec.tasklist @@ -17,6 +17,7 @@ #define CONFIG_TASK_LIST \ TASK_ALWAYS(HOOKS, hook_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(VBOOTHASH, vboot_hash_task, NULL, TASK_STACK_SIZE) \ + TASK_NOTEST(POWERLED, power_led_task, NULL, 256) \ TASK_ALWAYS(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(KEYSCAN, keyboard_scan_task, NULL, TASK_STACK_SIZE) \ TASK_NOTEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) \ diff --git a/chip/stm32/power_led.c b/chip/stm32/power_led.c index 5c4a92c86f..4e33e239f1 100644 --- a/chip/stm32/power_led.c +++ b/chip/stm32/power_led.c @@ -49,7 +49,7 @@ static void power_led_set_duty(int percent) * Set the duty cycle. CCRx = percent * ARR / 100. Since we set * ARR=100, this is just percent. */ -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) STM32_TIM_CCR3(TIM_POWER_LED) = percent; #else STM32_TIM_CCR2(TIM_POWER_LED) = percent; @@ -59,7 +59,7 @@ static void power_led_set_duty(int percent) static void power_led_use_pwm(void) { /* Configure power LED GPIO for TIM2/PWM alternate function */ -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) /* PA2 = TIM2_CH3 */ gpio_set_alternate_function(GPIO_A, (1 << 2), GPIO_ALT_TIM2); #else @@ -87,7 +87,7 @@ static void power_led_use_pwm(void) power_led_set_duty(100); -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) /* CC3 configured as output, PWM mode 1, preload enable */ STM32_TIM_CCMR2(TIM_POWER_LED) = (6 << 4) | (1 << 3); diff --git a/common/gaia_power.c b/common/gaia_power.c index b0589a84f9..de773f30ce 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -44,7 +44,7 @@ #define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args) /* Time necessary for the 5V and 3.3V regulator outputs to stabilize */ -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) #define DELAY_5V_SETUP (2 * MSEC) #define DELAY_3V_SETUP (2 * MSEC) #else @@ -407,7 +407,7 @@ static int power_on(void) /* Wait for it to stabilize */ usleep(DELAY_5V_SETUP); -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) /* * 3.3V rail must come up right after 5V, because it sources power to * various buck supplies. diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c index a6a684c280..4e3d96e025 100644 --- a/common/pmu_tps65090.c +++ b/common/pmu_tps65090.c @@ -636,7 +636,7 @@ static void pmu_chipset_startup(void) { pmu_init(); -#ifdef BOARD_pit +#if defined(BOARD_pit) || defined(BOARD_puppy) /* Enable all FETs. * * TODO: This is temporary code; remove when I2C passthru is working |