diff options
author | Philip Chen <philipchen@google.com> | 2019-09-20 20:26:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-24 00:32:28 +0000 |
commit | d9c0e64d0a055a2b62c529a9f8d6f7b106d6df07 (patch) | |
tree | 290775500252798b971f3bbda9afb31879e1eff5 /board/akemi | |
parent | 304c2f76ae1c213c82842e7db28730e6aa11f9f3 (diff) | |
download | chrome-ec-d9c0e64d0a055a2b62c529a9f8d6f7b106d6df07.tar.gz |
Akemi: Remove the run-time selection for en_pp5000_a
The run-time selection for en_pp5000_a is only needed for Hatch rev0.
Akemi doesn't need it.
BUG=b:141399038
BRANCH=none
TEST=boot akemi
Change-Id: Ibd26b85b69cbcd4e7c9c6b39fa453399246fcefc
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1817024
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Commit-Queue: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Diffstat (limited to 'board/akemi')
-rw-r--r-- | board/akemi/board.c | 36 | ||||
-rw-r--r-- | board/akemi/board.h | 4 | ||||
-rw-r--r-- | board/akemi/gpio.inc | 3 |
3 files changed, 1 insertions, 42 deletions
diff --git a/board/akemi/board.c b/board/akemi/board.c index 7dd2dad30b..92b7599fb3 100644 --- a/board/akemi/board.c +++ b/board/akemi/board.c @@ -355,48 +355,12 @@ static void setup_fans(void) thermal_params[TEMP_SENSOR_2] = thermal_a; } -/* Sets the gpio flags correct taking into account warm resets */ -static void reset_gpio_flags(enum gpio_signal signal, int flags) -{ - /* - * If the system was already on, we cannot set the value otherwise we - * may change the value from the previous image which could cause a - * brownout. - */ - if (system_is_reboot_warm() || system_jumped_to_this_image()) - flags &= ~(GPIO_LOW | GPIO_HIGH); - - gpio_set_flags(signal, flags); -} - -/* Runtime GPIO defaults */ -enum gpio_signal gpio_en_pp5000_a = GPIO_EN_PP5000_A_V1; - -static void board_gpio_set_pp5000(void) -{ - uint32_t board_id = 0; - - /* Errors will count as board_id 0 */ - cbi_get_board_version(&board_id); - - if (board_id == 0) { - reset_gpio_flags(GPIO_EN_PP5000_A_V0, GPIO_OUT_LOW); - /* Change runtime default for V0 */ - gpio_en_pp5000_a = GPIO_EN_PP5000_A_V0; - } else if (board_id >= 1) { - reset_gpio_flags(GPIO_EN_PP5000_A_V1, GPIO_OUT_LOW); - } - -} - static void board_init(void) { /* Initialize Fans */ setup_fans(); /* Enable gpio interrupt for base accelgyro sensor */ gpio_enable_interrupt(GPIO_BASE_SIXAXIS_INT_L); - /* Select correct gpio signal for PP5000_A control */ - board_gpio_set_pp5000(); } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/akemi/board.h b/board/akemi/board.h index 9efdb3c1f0..c95a1d5d7b 100644 --- a/board/akemi/board.h +++ b/board/akemi/board.h @@ -108,10 +108,6 @@ #include "gpio_signal.h" #include "registers.h" -/* GPIO signals updated base on board version. */ -#define GPIO_EN_PP5000_A gpio_en_pp5000_a -extern enum gpio_signal gpio_en_pp5000_a; - enum adc_channel { ADC_TEMP_SENSOR_1, /* ADC0 */ ADC_TEMP_SENSOR_2, /* ADC1 */ diff --git a/board/akemi/gpio.inc b/board/akemi/gpio.inc index ae156d3ffd..0834308e65 100644 --- a/board/akemi/gpio.inc +++ b/board/akemi/gpio.inc @@ -45,8 +45,7 @@ GPIO(PCH_WAKE_L, PIN(7, 4), GPIO_ODR_HIGH) /* EC_PCH_WAKE_O GPIO(PCH_PWRBTN_L, PIN(C, 1), GPIO_ODR_HIGH) /* EC_PCH_PWR_BTN_ODL */ /* Power Sequencing Signals */ -GPIO(EN_PP5000_A_V1, PIN(A, 4), GPIO_DEFAULT) -GPIO(EN_PP5000_A_V0, PIN(7, 3), GPIO_DEFAULT) +GPIO(EN_PP5000_A, PIN(A, 4), GPIO_OUT_LOW) GPIO(EN_A_RAILS, PIN(A, 3), GPIO_OUT_LOW) GPIO(EC_PCH_RSMRST_L, PIN(A, 6), GPIO_OUT_LOW) GPIO(EC_PROCHOT_ODL, PIN(6, 3), GPIO_ODR_HIGH) |