summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-04-02 10:05:59 -0700
committerChromeBot <chrome-bot@google.com>2013-04-03 11:49:06 -0700
commit9137686ebec50f44300168d48617790edf67bece (patch)
tree6ba470334b39a95bfdaff2dd71f1b66c03ce14e8
parent13c74da5ade0b98c9c024bf72e0c78c5155a8d08 (diff)
downloadchrome-ec-9137686ebec50f44300168d48617790edf67bece.tar.gz
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>
-rw-r--r--board/snow/board.c9
-rw-r--r--board/snow/board.h23
-rw-r--r--board/spring/board.c9
-rw-r--r--board/spring/board.h6
-rw-r--r--common/pmu_tps65090.c2
-rw-r--r--include/pmu_tpschrome.h21
6 files changed, 20 insertions, 50 deletions
diff --git a/board/snow/board.c b/board/snow/board.c
index 83a628ce7c..3316ce87ce 100644
--- a/board/snow/board.c
+++ b/board/snow/board.c
@@ -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;
diff --git a/board/snow/board.h b/board/snow/board.h
index 010c2cde01..9c14b76443 100644
--- a/board/snow/board.h
+++ b/board/snow/board.h
@@ -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 */
diff --git a/board/spring/board.c b/board/spring/board.c
index dd597a1a08..ed9a269516 100644
--- a/board/spring/board.c
+++ b/board/spring/board.c
@@ -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;
diff --git a/board/spring/board.h b/board/spring/board.h
index 4387162df9..32b3612d24 100644
--- a/board/spring/board.h
+++ b/board/spring/board.h
@@ -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);
diff --git a/common/pmu_tps65090.c b/common/pmu_tps65090.c
index 07375e01cd..d35644aca6 100644
--- a/common/pmu_tps65090.c
+++ b/common/pmu_tps65090.c
@@ -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
diff --git a/include/pmu_tpschrome.h b/include/pmu_tpschrome.h
index 57ba4c0a7e..ca7a192d7a 100644
--- a/include/pmu_tpschrome.h
+++ b/include/pmu_tpschrome.h
@@ -244,17 +244,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
*/
void board_hard_reset(void);
@@ -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 */