summaryrefslogtreecommitdiff
path: root/plat/st
diff options
context:
space:
mode:
authorYann Gautier <yann.gautier@st.com>2019-03-07 10:54:34 +0100
committerYann Gautier <yann.gautier@st.com>2019-03-07 10:56:17 +0100
commit42beea8d70804e9b9f7f87e7c7ef0b95d824ce09 (patch)
treef9b03336d4169ddb1920d059494c604a4cd655ed /plat/st
parentf009c5f312476cdfc0704a3c8a9c66b7fe5b6586 (diff)
stm32mp1: zeromem device_info struct
The change of the structure highlighted the fact that all fields are not correctly initialized with zeroes. Replace the other memset in the function with zeromem, as it is faster. Change-Id: I27f45a64e34637f79fa519f486bf5936721ef396 Signed-off-by: Yann Gautier <yann.gautier@st.com>
Diffstat (limited to 'plat/st')
-rw-r--r--plat/st/common/bl2_io_storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plat/st/common/bl2_io_storage.c b/plat/st/common/bl2_io_storage.c
index c8bb559f..f1721602 100644
--- a/plat/st/common/bl2_io_storage.c
+++ b/plat/st/common/bl2_io_storage.c
@@ -194,7 +194,8 @@ void stm32mp_io_setup(void)
case BOOT_API_CTX_BOOT_INTERFACE_SEL_FLASH_EMMC:
dmbsy();
- memset(&params, 0, sizeof(struct stm32_sdmmc2_params));
+ zeromem(&device_info, sizeof(struct mmc_device_info));
+ zeromem(&params, sizeof(struct stm32_sdmmc2_params));
if (boot_context->boot_interface_selected ==
BOOT_API_CTX_BOOT_INTERFACE_SEL_FLASH_EMMC) {