mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
Clean up board.c files
Just renaming functions and reordering #defines; no functional changes. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all EC boards Change-Id: I90e9ea860110625012cd5fb99de966283ec82880 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/47179 Reviewed-by: Vic Yang <victoryang@chromium.org>
This commit is contained in:
committed by
ChromeBot
parent
13c74da5ad
commit
9137686ebe
@@ -243,14 +243,7 @@ void board_hard_reset(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMU_BOARD_INIT
|
||||
|
||||
/**
|
||||
* Initialize PMU register settings
|
||||
*
|
||||
* PMU init settings depend on board configuration. This function should be
|
||||
* called inside PMU init function.
|
||||
*/
|
||||
int board_pmu_init(void)
|
||||
int pmu_board_init(void)
|
||||
{
|
||||
int ver, failure = 0;
|
||||
|
||||
|
||||
@@ -15,20 +15,25 @@
|
||||
#define CONFIG_CONSOLE_UART 1
|
||||
|
||||
/* Debug features */
|
||||
#define CONFIG_PANIC_HELP
|
||||
#define CONFIG_ASSERT_HELP
|
||||
#define CONFIG_CONSOLE_CMDHELP
|
||||
#define CONFIG_PANIC_HELP
|
||||
#define CONFIG_WATCHDOG_HELP
|
||||
|
||||
/* Optional features */
|
||||
#define CONFIG_BATTERY_BQ20Z453
|
||||
#define CONFIG_CHIPSET_GAIA
|
||||
#define CONFIG_CMD_PMU
|
||||
#define CONFIG_CONFIGURE_BOARD_LATE
|
||||
#define CONFIG_HOST_COMMAND_STATUS
|
||||
#define CONFIG_I2C
|
||||
#define CONFIG_I2C_ARBITRATION
|
||||
#define CONFIG_KEYBOARD_PROTOCOL_MKBP
|
||||
#define CONFIG_KEYBOARD_SUPPRESS_NOISE
|
||||
#define CONFIG_PMU_BOARD_INIT
|
||||
#define CONFIG_PMU_TPS65090
|
||||
#define CONFIG_SMART_BATTERY
|
||||
#undef CONFIG_TASK_PROFILING
|
||||
#define CONFIG_WATCHDOG_HELP
|
||||
|
||||
/* use STOP mode when we have nothing to do */
|
||||
#define CONFIG_LOW_POWER_IDLE
|
||||
@@ -44,9 +49,6 @@
|
||||
#define KB_OUT_PORT_LIST GPIO_B, GPIO_C
|
||||
|
||||
/* Charging */
|
||||
#define CONFIG_SMART_BATTERY
|
||||
#define CONFIG_PMU_TPS65090
|
||||
#define CONFIG_PMU_BOARD_INIT
|
||||
#define I2C_PORT_HOST 1
|
||||
#define I2C_PORT_BATTERY I2C_PORT_HOST
|
||||
#define I2C_PORT_CHARGER I2C_PORT_HOST
|
||||
@@ -55,11 +57,6 @@
|
||||
#define GPIO_AP_CLAIM GPIO_SPI1_NSS /* AP claims bus */
|
||||
#define GPIO_EC_CLAIM GPIO_SPI1_MISO /* EC claims bus */
|
||||
|
||||
#define CONFIG_CMD_PMU
|
||||
|
||||
/* Battery */
|
||||
#define CONFIG_BATTERY_BQ20Z453
|
||||
|
||||
/* Timer selection */
|
||||
#define TIM_CLOCK_MSB 3
|
||||
#define TIM_CLOCK_LSB 4
|
||||
@@ -124,12 +121,6 @@ void configure_board(void);
|
||||
|
||||
void configure_board_late(void);
|
||||
|
||||
/* Initialize PMU registers using board settings */
|
||||
int board_pmu_init(void);
|
||||
|
||||
/* Force the pmu to reset everything on the board */
|
||||
void board_hard_reset(void);
|
||||
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#endif /* __BOARD_H */
|
||||
|
||||
@@ -221,14 +221,7 @@ void board_hard_reset(void)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PMU_BOARD_INIT
|
||||
|
||||
/**
|
||||
* Initialize PMU register settings
|
||||
*
|
||||
* PMU init settings depend on board configuration. This function should be
|
||||
* called inside PMU init function.
|
||||
*/
|
||||
int board_pmu_init(void)
|
||||
int pmu_board_init(void)
|
||||
{
|
||||
int failure = 0;
|
||||
|
||||
|
||||
@@ -148,12 +148,6 @@ enum charging_state;
|
||||
|
||||
void configure_board(void);
|
||||
|
||||
/* Initialize PMU registers using board settings */
|
||||
int board_pmu_init(void);
|
||||
|
||||
/* Force the pmu to reset everything on the board */
|
||||
void board_hard_reset(void);
|
||||
|
||||
/* Set ILIM pin control type */
|
||||
void board_ilim_config(enum ilim_config config);
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ void pmu_init(void)
|
||||
failure = 0;
|
||||
#ifdef CONFIG_PMU_BOARD_INIT
|
||||
if (!failure)
|
||||
failure = board_pmu_init();
|
||||
failure = pmu_board_init();
|
||||
#else
|
||||
/* Init configuration
|
||||
* Fast charge timer : 2 hours
|
||||
|
||||
@@ -243,17 +243,6 @@ int pmu_enable_ext_control(int enable);
|
||||
*/
|
||||
int pmu_set_fastcharge(enum FASTCHARGE_TIMEOUT timeout);
|
||||
|
||||
/**
|
||||
* Get AC state
|
||||
*
|
||||
* @return 0 AC off
|
||||
* @return 1 AC on
|
||||
*
|
||||
* This is a board specific function as we get the PMU VACG signal
|
||||
* through a GPIO.
|
||||
*/
|
||||
int board_get_ac(void);
|
||||
|
||||
/**
|
||||
* Reset the entire board if it is capable
|
||||
*/
|
||||
@@ -274,5 +263,15 @@ enum charging_state charge_get_state(void);
|
||||
*/
|
||||
int charge_keep_power_off(void);
|
||||
|
||||
#ifdef CONFIG_PMU_BOARD_INIT
|
||||
/**
|
||||
* Initialize PMU registers using board settings.
|
||||
*
|
||||
* Boards may supply this function if needed. This will be called from
|
||||
* pmu_init().
|
||||
*/
|
||||
int pmu_board_init(void);
|
||||
#endif
|
||||
|
||||
#endif /* __CROS_EC_TPSCHROME_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user