From c6448a1a81aa86ef6d77a2667886a746d396d1b9 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Tue, 8 Oct 2019 13:12:02 -0600 Subject: cometlake: Cleanup GPIO_PCH_SYS_PWROK Change GPIO_EC_PCH_SYS_PWROK to GPIO_PCH_SYS_PWROK on cometlake to conform with naming convention used on other Intel processors. Leave gpio.inc files unchanged and add a mapping from GPIO_EC_PCH_SYS_PWROK to GPIO_PCH_SYS_PWROK in the board files. BUG=none BRANCH=none TEST=make buildall -j TEST=boot kohaku Change-Id: I722cb06dd90ee5d7e426664508f54a5cbe19de4a Signed-off-by: Keith Short Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1848251 Reviewed-by: Vijay P Hiremath Reviewed-by: Denis Brockus Reviewed-by: Edward Hill Commit-Queue: Denis Brockus --- board/akemi/board.h | 17 +++++++++-------- board/dratini/board.h | 17 +++++++++-------- board/hatch/board.h | 17 +++++++++-------- board/helios/board.h | 17 +++++++++-------- board/kindred/board.h | 17 +++++++++-------- board/kohaku/board.h | 17 +++++++++-------- board/volteer/board.h | 1 + power/cometlake.c | 6 +++--- 8 files changed, 58 insertions(+), 51 deletions(-) diff --git a/board/akemi/board.h b/board/akemi/board.h index 630416914d..f51ebac148 100644 --- a/board/akemi/board.h +++ b/board/akemi/board.h @@ -94,14 +94,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/dratini/board.h b/board/dratini/board.h index 0b5de1c353..6b0f1e34c7 100644 --- a/board/dratini/board.h +++ b/board/dratini/board.h @@ -101,14 +101,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/hatch/board.h b/board/hatch/board.h index c6aaaac68f..22d10862b5 100644 --- a/board/hatch/board.h +++ b/board/hatch/board.h @@ -107,14 +107,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/helios/board.h b/board/helios/board.h index 98bfb7fb80..fa0ff93c57 100644 --- a/board/helios/board.h +++ b/board/helios/board.h @@ -85,14 +85,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/kindred/board.h b/board/kindred/board.h index b88695b31f..46aff07d8b 100644 --- a/board/kindred/board.h +++ b/board/kindred/board.h @@ -103,14 +103,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/kohaku/board.h b/board/kohaku/board.h index 5bd67bdc93..36b519cf0b 100644 --- a/board/kohaku/board.h +++ b/board/kohaku/board.h @@ -131,14 +131,15 @@ * then redefined here to so it's more clear which signal is being used for * which purpose. */ -#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L -#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L -#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL -#define GPIO_AC_PRESENT GPIO_ACOK_OD -#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L -#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L -#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L -#define GPIO_EN_PP5000 GPIO_EN_PP5000_A +#define GPIO_PCH_RSMRST_L GPIO_EC_PCH_RSMRST_L +#define GPIO_PCH_SLP_S0_L GPIO_SLP_S0_L +#define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL +#define GPIO_AC_PRESENT GPIO_ACOK_OD +#define GPIO_RSMRST_L_PGOOD GPIO_PG_EC_RSMRST_L +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK +#define GPIO_PCH_SLP_S3_L GPIO_SLP_S3_L +#define GPIO_PCH_SLP_S4_L GPIO_SLP_S4_L +#define GPIO_EN_PP5000 GPIO_EN_PP5000_A #ifndef __ASSEMBLER__ diff --git a/board/volteer/board.h b/board/volteer/board.h index 6f74322440..782c77036a 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -56,6 +56,7 @@ #define GPIO_PCH_WAKE_L GPIO_EC_PCH_WAKE_ODL #define GPIO_PCH_PWRBTN_L GPIO_EC_PCH_PWR_BTN_ODL #define GPIO_PCH_RTCRST GPIO_EC_PCH_RTCRST +#define GPIO_PCH_SYS_PWROK GPIO_EC_PCH_SYS_PWROK #define GPIO_POWER_BUTTON_L GPIO_H1_EC_PWR_BTN_ODL #define GPIO_CPU_PROCHOT GPIO_EC_PROCHOT_ODL #define GPIO_SYS_RESET_L GPIO_SYS_RST_ODL diff --git a/power/cometlake.c b/power/cometlake.c index b69b075db9..62d5fbe6f7 100644 --- a/power/cometlake.c +++ b/power/cometlake.c @@ -166,17 +166,17 @@ enum power_state power_handle_state(enum power_state state) case POWER_S0: /* - * Check value of PG_EC_ALL_SYS_PWRGD to see if EC_PCH_SYS_PWROK + * Check value of PG_EC_ALL_SYS_PWRGD to see if PCH_SYS_PWROK * needs to be changed. If it's low->high transition, requires a * 2msec delay. */ all_sys_pwrgd_in = gpio_get_level(GPIO_PG_EC_ALL_SYS_PWRGD); - all_sys_pwrgd_out = gpio_get_level(GPIO_EC_PCH_SYS_PWROK); + all_sys_pwrgd_out = gpio_get_level(GPIO_PCH_SYS_PWROK); if (all_sys_pwrgd_in != all_sys_pwrgd_out) { if (all_sys_pwrgd_in) msleep(2); - gpio_set_level(GPIO_EC_PCH_SYS_PWROK, all_sys_pwrgd_in); + gpio_set_level(GPIO_PCH_SYS_PWROK, all_sys_pwrgd_in); } break; -- cgit v1.2.1