mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
Revert "Enable snow I2C host auto detection"
This reverts commit 024c44cd96.
board/snow/board.c
board/snow/board.h
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:10622
TEST=build snow ec image without warning
Change-Id: I65660383873907722933b41249e17dd1f83d8fde
Reviewed-on: https://gerrit.chromium.org/gerrit/28698
Commit-Ready: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
@@ -80,41 +80,6 @@ const struct gpio_info gpio_list[GPIO_COUNT] = {
|
||||
{"KB_OUT12", GPIO_C, (1<<7), GPIO_KB_OUTPUT, NULL},
|
||||
};
|
||||
|
||||
#ifdef CONFIG_I2C_HOST_AUTO
|
||||
static int i2c_host_port = -1;
|
||||
|
||||
/* Detect if tps65090 pmu is present on a i2c bus.
|
||||
* This hack makes one single ec binary to work on boards with different
|
||||
* stuffing options.
|
||||
*
|
||||
* TODO: Revert i2c host port detection after all dev boards been reworked or
|
||||
* deprecated. Issue: http://crosbug.com/p/10622
|
||||
*/
|
||||
static int tps65090_is_present(int bus)
|
||||
{
|
||||
const int tps65090_addr = 0x90;
|
||||
const int charger_ctrl_offset0 = 4;
|
||||
int rv, reg;
|
||||
|
||||
rv = i2c_read8(bus, tps65090_addr, charger_ctrl_offset0, ®);
|
||||
|
||||
if (rv == EC_SUCCESS)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_i2c_host_port(void)
|
||||
{
|
||||
/* Default I2C host configuration is I2C1(0).
|
||||
* If PMU doesn't ack on I2C2(1), set the host port to 0.
|
||||
*/
|
||||
if (i2c_host_port == -1)
|
||||
i2c_host_port = tps65090_is_present(1) ? 1 : 0;
|
||||
|
||||
return i2c_host_port;
|
||||
}
|
||||
#endif /* CONFIG_I2C_HOST_AUTO */
|
||||
|
||||
void configure_board(void)
|
||||
{
|
||||
uint32_t val;
|
||||
|
||||
@@ -47,8 +47,6 @@
|
||||
#define CONFIG_SMART_BATTERY
|
||||
#define CONFIG_PMU_TPS65090
|
||||
#define CONFIG_PMU_BOARD_INIT
|
||||
/* #define CONFIG_I2C_HOST_AUTO */
|
||||
/* #define I2C_PORT_HOST board_i2c_host_port() */
|
||||
#define I2C_PORT_HOST 1
|
||||
#define I2C_PORT_BATTERY I2C_PORT_HOST
|
||||
#define I2C_PORT_CHARGER I2C_PORT_HOST
|
||||
@@ -112,9 +110,6 @@ void matrix_interrupt(enum gpio_signal signal);
|
||||
/* Signal to AP that data is waiting */
|
||||
void board_interrupt_host(int active);
|
||||
|
||||
/* Auto detect EC i2c host port */
|
||||
int board_i2c_host_port(void);
|
||||
|
||||
/* Initialize PMU registers using board settings */
|
||||
void board_pmu_init(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user