diff options
Diffstat (limited to 'plat/rockchip')
-rw-r--r-- | plat/rockchip/common/params_setup.c | 11 | ||||
-rw-r--r-- | plat/rockchip/rk3399/drivers/dram/dfs.c | 6 |
2 files changed, 12 insertions, 5 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; } diff --git a/plat/rockchip/rk3399/drivers/dram/dfs.c b/plat/rockchip/rk3399/drivers/dram/dfs.c index 3b627d287..816372bfc 100644 --- a/plat/rockchip/rk3399/drivers/dram/dfs.c +++ b/plat/rockchip/rk3399/drivers/dram/dfs.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -78,10 +78,10 @@ static struct rk3399_sdram_default_config lpddr4_default_config = { .zqcsi = 0 }; -static uint32_t get_cs_die_capability(struct rk3399_sdram_params *sdram_config, +static uint32_t get_cs_die_capability(struct rk3399_sdram_params *ram_config, uint8_t channel, uint8_t cs) { - struct rk3399_sdram_channel *ch = &sdram_config->ch[channel]; + struct rk3399_sdram_channel *ch = &ram_config->ch[channel]; uint32_t bandwidth; uint32_t die_bandwidth; uint32_t die; |