diff options
-rw-r--r-- | README | 45 | ||||
-rw-r--r-- | board/daisy/board.h | 1 | ||||
-rw-r--r-- | board/falco/board.h | 2 | ||||
-rw-r--r-- | board/host/board.h | 1 | ||||
-rw-r--r-- | board/mccroskey/board.h | 1 | ||||
-rw-r--r-- | board/peppy/board.h | 2 | ||||
-rw-r--r-- | board/pit/board.h | 3 | ||||
-rw-r--r-- | board/puppy/board.h | 3 | ||||
-rw-r--r-- | board/slippy/board.h | 2 | ||||
-rw-r--r-- | board/snow/board.c | 3 | ||||
-rw-r--r-- | board/snow/board.h | 3 | ||||
-rw-r--r-- | board/spring/board.h | 1 | ||||
-rw-r--r-- | chip/lm4/config_chip.h | 1 | ||||
-rw-r--r-- | chip/stm32/config_chip.h | 10 | ||||
-rw-r--r-- | common/charge_state.c | 4 | ||||
-rw-r--r-- | include/config.h | 42 |
16 files changed, 52 insertions, 72 deletions
diff --git a/README b/README deleted file mode 100644 index c895d8e0ad..0000000000 --- a/README +++ /dev/null @@ -1,45 +0,0 @@ -- EC Lib - -This wraps Blizzard driverlib and implements the EC chip interface defined -by Google. See below diagram for architecture. - - - +--------------------+ - | Host BIOS/OS | - +--------------------+ - - ---- host interface ---- - - +--------------------+ - | Google EC features | - +--------------------+ - - ---- chip interface ---- The interface is defined in - src/platform/ec/chip_interface/*. - +--------------------+ But the real implementation is in EC Lib. - | EC Lib | - +--------------------+ - | Blizzard low level | - | driver, the | - | driverlib. | - +--------------------+ - - -Build Options -============= - -NOTE: see include/config.h for the current list. The information -below will be moved there over time. - -- CONFIG_WATCHDOG_HELP - - Try to detect a watchdog that is about to fire, and print a trace. - This is needed on STM32, where the independent watchdog has no early - warning feature and the windowed watchdog has a very short period. - -- CONFIG_AC_POWER_STATUS - - Monitor the state of the AC power input and drive out a GPIO to - the AP indicating this state. The GPIO will be driven low when - AC power is not connected, and high when it is connected. This - uses GPIO_AC_STATUS for this purpose. diff --git a/board/daisy/board.h b/board/daisy/board.h index 681d09a345..2161650def 100644 --- a/board/daisy/board.h +++ b/board/daisy/board.h @@ -28,6 +28,7 @@ #define CONFIG_KEYBOARD_SUPPRESS_NOISE #define CONFIG_LID_SWITCH #define CONFIG_PMU_TPS65090 +#undef CONFIG_WATCHDOG_HELP /* * Allow dangerous commands all the time, since we don't have a write protect diff --git a/board/falco/board.h b/board/falco/board.h index 5e8633b1d6..259ad966ec 100644 --- a/board/falco/board.h +++ b/board/falco/board.h @@ -16,10 +16,10 @@ #define CONFIG_BOARD_VERSION #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24738 +#define CONFIG_CHARGER_DISCHARGE_ON_AC #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_HASWELL #endif -#define CONFIG_CMD_DISCHARGE_ON_AC #define CONFIG_EXTPOWER_GPIO #define CONFIG_KEYBOARD_BOARD_CONFIG #ifdef HAS_TASK_KEYPROTO diff --git a/board/host/board.h b/board/host/board.h index e9d0e3adbe..d962f3f285 100644 --- a/board/host/board.h +++ b/board/host/board.h @@ -15,6 +15,7 @@ #define CONFIG_LID_SWITCH #define CONFIG_POWER_BUTTON #define CONFIG_TEMP_SENSOR +#undef CONFIG_WATCHDOG /* Keyboard protocol */ #ifdef KB_8042 diff --git a/board/mccroskey/board.h b/board/mccroskey/board.h index 99cfaf6509..e5fa6c79e3 100644 --- a/board/mccroskey/board.h +++ b/board/mccroskey/board.h @@ -17,7 +17,6 @@ /* Debug features */ #define CONFIG_I2C_DEBUG /* FIXME(dhendrix): remove this eventually */ #undef CONFIG_TASK_PROFILING -#define CONFIG_WATCHDOG_HELP /* Optional features */ #define CONFIG_BOARD_PRE_INIT diff --git a/board/peppy/board.h b/board/peppy/board.h index 22de835d20..fe780f771a 100644 --- a/board/peppy/board.h +++ b/board/peppy/board.h @@ -16,10 +16,10 @@ #define CONFIG_BOARD_VERSION #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24707A +#define CONFIG_CHARGER_DISCHARGE_ON_AC #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_HASWELL #endif -#define CONFIG_CMD_DISCHARGE_ON_AC #define CONFIG_EXTPOWER_GPIO #define CONFIG_KEYBOARD_BOARD_CONFIG #ifdef HAS_TASK_KEYPROTO diff --git a/board/pit/board.h b/board/pit/board.h index 7b1cd08eda..036184c5ea 100644 --- a/board/pit/board.h +++ b/board/pit/board.h @@ -11,9 +11,6 @@ /* Use USART1 as console serial port */ #define CONFIG_CONSOLE_UART 1 -/* Debug features */ -#define CONFIG_WATCHDOG_HELP - /* Optional features */ #define CONFIG_BATTERY_BQ20Z453 #define CONFIG_BATTERY_SMART diff --git a/board/puppy/board.h b/board/puppy/board.h index 1618ce7158..39789080e4 100644 --- a/board/puppy/board.h +++ b/board/puppy/board.h @@ -11,9 +11,6 @@ /* Use USART1 as console serial port */ #define CONFIG_CONSOLE_UART 1 -/* Debug features */ -#define CONFIG_WATCHDOG_HELP - /* Optional features */ #define CONFIG_BATTERY_BQ20Z453 #define CONFIG_BATTERY_SMART diff --git a/board/slippy/board.h b/board/slippy/board.h index cd4562f2f7..33f7caedfa 100644 --- a/board/slippy/board.h +++ b/board/slippy/board.h @@ -16,10 +16,10 @@ #define CONFIG_BOARD_VERSION #define CONFIG_CHARGER #define CONFIG_CHARGER_BQ24707A +#define CONFIG_CHARGER_DISCHARGE_ON_AC #ifdef HAS_TASK_CHIPSET #define CONFIG_CHIPSET_HASWELL #endif -#define CONFIG_CMD_DISCHARGE_ON_AC #define CONFIG_EXTPOWER_GPIO #define CONFIG_KEYBOARD_BOARD_CONFIG #ifdef HAS_TASK_KEYPROTO diff --git a/board/snow/board.c b/board/snow/board.c index ef5f8488c8..90bdba1847 100644 --- a/board/snow/board.c +++ b/board/snow/board.c @@ -167,9 +167,6 @@ void board_i2c_post_init(int port) void board_config_post_gpio_init(void) { -#ifdef CONFIG_AC_POWER_STATUS - gpio_set_flags(GPIO_AC_STATUS, GPIO_OUT_HIGH); -#endif #ifdef CONFIG_SPI gpio_set_flags(GPIO_SPI1_NSS, GPIO_INT_BOTH); #endif diff --git a/board/snow/board.h b/board/snow/board.h index 73b67e3610..a9fed8f528 100644 --- a/board/snow/board.h +++ b/board/snow/board.h @@ -15,8 +15,7 @@ #define CONFIG_CONSOLE_UART 1 /* Debug features */ -#undef CONFIG_TASK_PROFILING -#define CONFIG_WATCHDOG_HELP +#undef CONFIG_TASK_PROFILING /* Optional features */ #define CONFIG_BATTERY_BQ20Z453 diff --git a/board/spring/board.h b/board/spring/board.h index f919c99987..412e13284c 100644 --- a/board/spring/board.h +++ b/board/spring/board.h @@ -17,7 +17,6 @@ /* Debug features */ #undef CONFIG_TASK_PROFILING -#define CONFIG_WATCHDOG_HELP /* Optional features */ #define CONFIG_ADC diff --git a/chip/lm4/config_chip.h b/chip/lm4/config_chip.h index c1a60e7013..c2ddbbb702 100644 --- a/chip/lm4/config_chip.h +++ b/chip/lm4/config_chip.h @@ -105,7 +105,6 @@ #define CONFIG_FPU #define CONFIG_I2C #define CONFIG_SWITCH -#define CONFIG_WATCHDOG /* Compile for running from RAM instead of flash */ /* #define COMPILE_FOR_RAM */ diff --git a/chip/stm32/config_chip.h b/chip/stm32/config_chip.h index 009c4971e4..c34a683f7c 100644 --- a/chip/stm32/config_chip.h +++ b/chip/stm32/config_chip.h @@ -37,12 +37,16 @@ /* Number of I2C ports */ #define I2C_PORT_COUNT 2 -/* support programming on-chip flash */ +/* Support programming on-chip flash */ #define CONFIG_FLASH #define CONFIG_FMAP -/* Enable watchdog timer */ -#define CONFIG_WATCHDOG +/* + * Use a timer to print a watchdog warning event before the actual watchdog + * timer fires. This is needed on STM32, where the independent watchdog has no + * early warning feature and the windowed watchdog has a very short period. + */ +#define CONFIG_WATCHDOG_HELP /* Flash protection applies to the next boot, not the current one */ #define CONFIG_FLASH_PROTECT_NEXT_BOOT diff --git a/common/charge_state.c b/common/charge_state.c index 95b366d6b6..8d605ec03e 100644 --- a/common/charge_state.c +++ b/common/charge_state.c @@ -848,11 +848,11 @@ static int charge_command_charge_control(struct host_cmd_handler_args *args) if (rv != EC_SUCCESS) return rv; -#ifdef CONFIG_CMD_DISCHARGE_ON_AC +#ifdef CONFIG_CHARGER_DISCHARGE_ON_AC rv = board_discharge_on_ac(p->mode == CHARGE_CONTROL_DISCHARGE); if (rv != EC_SUCCESS) return rv; -#endif /* CONFIG_CMD_DISCHARGE_ON_AC */ +#endif return EC_RES_SUCCESS; } diff --git a/include/config.h b/include/config.h index 917ba785fb..222b9d5b63 100644 --- a/include/config.h +++ b/include/config.h @@ -35,7 +35,6 @@ * and how/when it should be used vs. a config define. */ -#undef CONFIG_AC_POWER_STATUS #undef CONFIG_ADC #undef CONFIG_BACKLIGHT_X86 @@ -90,6 +89,12 @@ #undef CONFIG_CHARGER_CURRENT_LIMIT /* + * Board supports discharge mode. In this mode, the battery will discharge + * even if AC is present. Used for testing. + */ +#undef CONFIG_CHARGER_DISCHARGE_ON_AC + +/* * Maximum amount of input current the charger can receive, in mA. * * This value should depend on external power adapter, designed charging @@ -110,7 +115,6 @@ #undef CONFIG_CHIPSET_IVYBRIDGE #undef CONFIG_CMD_COMXTEST -#undef CONFIG_CMD_DISCHARGE_ON_AC /* TODO(rspangler): poorly named */ #undef CONFIG_CMD_ECTEMP #undef CONFIG_CMD_PLL #undef CONFIG_CMD_PMU @@ -328,6 +332,9 @@ #undef CONFIG_SWITCH #undef CONFIG_SYSTEM_UNLOCKED +/*****************************************************************************/ +/* Task config */ + /* * List of enabled tasks in ascending priority order. This is normally * defined in each board's ec.tasklist file. @@ -343,18 +350,25 @@ #undef CONFIG_TASK_LIST /* + * List of test tasks. Same format as CONFIG_TASK_LIST, but used to define + * additional tasks for a unit test. Normally defined in + * test/{testname}.tasklist. + */ +#undef CONFIG_TEST_TASK_LIST + +/* * Enable task profiling. * * Boards may #undef this to reduce image size and RAM usage. */ #define CONFIG_TASK_PROFILING +/*****************************************************************************/ + #undef CONFIG_TEMP_SENSOR #undef CONFIG_TEMP_SENSOR_G781 #undef CONFIG_TEMP_SENSOR_TMP006 -#undef CONFIG_TEST_TASK_LIST - #undef CONFIG_UART_BAUD_RATE #undef CONFIG_UART_RX_BUF_SIZE #undef CONFIG_UART_TX_BUF_SIZE @@ -365,8 +379,26 @@ #undef CONFIG_USE_CPCIDVI #undef CONFIG_USE_PLL -#undef CONFIG_WATCHDOG + +/*****************************************************************************/ +/* Watchdog config */ + +/* + * Compile watchdog timer support. The watchdog timer will reboot the system + * if the hook task (which is the lowest-priority task on the system) gets + * starved for CPU time and isn't able to fire its HOOK_TICK event. + */ +#define CONFIG_WATCHDOG + +/* + * Try to detect a watchdog that is about to fire, and print a trace. This is + * required on chips such as STM32 where the watchdog timer simply reboots the + * system without any early warning. + */ #undef CONFIG_WATCHDOG_HELP + +/*****************************************************************************/ + #undef CONFIG_WIRELESS #undef CONFIG_WP_ACTIVE_HIGH |