diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-04-26 12:13:45 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-04-26 13:46:48 -0700 |
commit | 7a9e47d74e59a1b26b1a6e34bec20e54b4c0238b (patch) | |
tree | bbad1e1d060ecb335bec5476613b3e0136d05e63 | |
parent | fd38ba353cf473c2b833d6812c07f087927bb56b (diff) | |
download | chrome-ec-7a9e47d74e59a1b26b1a6e34bec20e54b4c0238b.tar.gz |
Allow disabling PMU charger task, and do so on pit
I2C communication doesn't work on pit yet, so the charger task is
spewing errors to the console. This change allows the task to be
disabled cleanly on pit, and has no effect on other platforms.
BUG=chrome-os-partner:18657
BRANCH=none
TEST=build all platforms and see that charger task is still compiled
everywhere but pit
Change-Id: I788e817d5630fb1a28694819f4ef9948a503a744
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/49344
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | board/daisy/board.h | 1 | ||||
-rw-r--r-- | board/pit/board.h | 3 | ||||
-rw-r--r-- | board/pit/ec.tasklist | 2 | ||||
-rw-r--r-- | board/snow/board.h | 1 | ||||
-rw-r--r-- | board/spring/board.h | 1 | ||||
-rw-r--r-- | common/build.mk | 3 | ||||
-rw-r--r-- | common/gaia_power.c | 2 |
7 files changed, 11 insertions, 2 deletions
diff --git a/board/daisy/board.h b/board/daisy/board.h index 2de4079f6f..eed6d5df7a 100644 --- a/board/daisy/board.h +++ b/board/daisy/board.h @@ -20,6 +20,7 @@ /* Optional features */ #define CONFIG_BOARD_POST_GPIO_INIT +#define CONFIG_CHARGER_TPS65090 #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_GAIA #endif diff --git a/board/pit/board.h b/board/pit/board.h index 11cef6c319..8c246d3f3e 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -23,6 +23,9 @@ /* Optional features */ #define CONFIG_BATTERY_BQ20Z453 #define CONFIG_BOARD_POST_GPIO_INIT +#ifdef HAS_TASK_CHARGER +#define CONFIG_CHARGER_TPS65090 +#endif #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_GAIA #endif diff --git a/board/pit/ec.tasklist b/board/pit/ec.tasklist index 4cf8e75954..b00e023f02 100644 --- a/board/pit/ec.tasklist +++ b/board/pit/ec.tasklist @@ -18,7 +18,7 @@ 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_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) \ TASK_ALWAYS(CONSOLE, console_task, NULL, TASK_STACK_SIZE) \ diff --git a/board/snow/board.h b/board/snow/board.h index 7eae2ad3a5..9d14ef939e 100644 --- a/board/snow/board.h +++ b/board/snow/board.h @@ -25,6 +25,7 @@ #define CONFIG_BATTERY_BQ20Z453 #define CONFIG_BOARD_PRE_INIT #define CONFIG_BOARD_POST_GPIO_INIT +#define CONFIG_CHARGER_TPS65090 #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_GAIA #endif diff --git a/board/spring/board.h b/board/spring/board.h index 71248ef26e..5fd7c0b878 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -25,6 +25,7 @@ #define CONFIG_ADC #define CONFIG_BATTERY_BQ20Z453 #define CONFIG_BOARD_PRE_INIT +#define CONFIG_CHARGER_TPS65090 #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_GAIA #endif diff --git a/common/build.mk b/common/build.mk index 9b3297c7bf..5d9191b718 100644 --- a/common/build.mk +++ b/common/build.mk @@ -12,9 +12,10 @@ common-y+=gpio_common.o version.o printf.o queue.o common-$(CONFIG_BATTERY_BQ20Z453)+=battery_bq20z453.o common-$(CONFIG_BATTERY_LINK)+=battery_link.o charge_state.o battery_precharge.o common-$(CONFIG_CHARGER_BQ24725)+=charger_bq24725.o +common-$(CONFIG_CHARGER_TPS65090)+=pmu_tps65090_charger.o common-$(CONFIG_CHIPSET_GAIA)+=gaia_power.o common-$(CONFIG_CHIPSET_X86)+=x86_power.o -common-$(CONFIG_PMU_TPS65090)+=pmu_tps65090.o pmu_tps65090_charger.o +common-$(CONFIG_PMU_TPS65090)+=pmu_tps65090.o common-$(CONFIG_EOPTION)+=eoption.o common-$(CONFIG_EXTPOWER_GPIO)+=extpower_gpio.o common-$(CONFIG_EXTPOWER_SNOW)+=extpower_snow.o diff --git a/common/gaia_power.c b/common/gaia_power.c index fe83b66efc..38e9f3049e 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -544,12 +544,14 @@ static int wait_for_power_on(void) continue; } +#ifdef HAS_TASK_CHARGER if (charge_keep_power_off()) { CPRINTF("%T battery low. ignoring power on event.\n"); if (value == 1) /* System already on */ power_off(); continue; } +#endif CPRINTF("%T power on %d\n", value); return value; |