diff options
author | Manish Pandey <manish.pandey2@arm.com> | 2019-12-03 22:57:57 +0000 |
---|---|---|
committer | TrustedFirmware Code Review <review@review.trustedfirmware.org> | 2019-12-03 22:57:57 +0000 |
commit | 45d4611563038486890b40d61e41b68213326afc (patch) | |
tree | 5b259814be2b5d32ad8a835c6df38c3293509e73 /plat | |
parent | 530a5cbccb172a847b2434e145ae2ebb6bf141c8 (diff) | |
parent | d52331d01e0efae36e837af90887a8aed33ff604 (diff) | |
download | platform_external_arm-trusted-firmware-45d4611563038486890b40d61e41b68213326afc.tar.gz platform_external_arm-trusted-firmware-45d4611563038486890b40d61e41b68213326afc.tar.bz2 platform_external_arm-trusted-firmware-45d4611563038486890b40d61e41b68213326afc.zip |
Merge "plat/rockchip: initialize reset and poweroff GPIOs with known invalid value" into integration
Diffstat (limited to 'plat')
-rw-r--r-- | plat/rockchip/common/params_setup.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/plat/rockchip/common/params_setup.c b/plat/rockchip/common/params_setup.c index 8c2e5e911..b2fd2011e 100644 --- a/plat/rockchip/common/params_setup.c +++ b/plat/rockchip/common/params_setup.c @@ -6,6 +6,7 @@ #include <assert.h> #include <errno.h> +#include <limits.h> #include <string.h> #include <lib/bl_aux_params/bl_aux_params.h> @@ -21,8 +22,8 @@ #include <plat_params.h> #include <plat_private.h> -static struct bl_aux_gpio_info rst_gpio; -static struct bl_aux_gpio_info poweroff_gpio; +static struct bl_aux_gpio_info rst_gpio = { .index = UINT_MAX } ; +static struct bl_aux_gpio_info poweroff_gpio = { .index = UINT_MAX }; static struct bl_aux_gpio_info suspend_gpio[10]; uint32_t suspend_gpio_cnt; static struct bl_aux_rk_apio_info suspend_apio; @@ -174,11 +175,17 @@ uint32_t rockchip_get_uart_clock(void) struct bl_aux_gpio_info *plat_get_rockchip_gpio_reset(void) { + if (rst_gpio.index == UINT_MAX) + return NULL; + return &rst_gpio; } struct bl_aux_gpio_info *plat_get_rockchip_gpio_poweroff(void) { + if (poweroff_gpio.index == UINT_MAX) + return NULL; + return &poweroff_gpio; } |