[U-Boot] [PATCH 2/5] fsl: layerscape: guard *env_sf_get_env_addr() on CONFIG_ENV_IS_IN_SPI_FLASH

Priyanka Jain priyanka.jain at nxp.com
Fri Nov 15 12:43:46 UTC 2019



>-----Original Message-----
>From: U-Boot <u-boot-bounces at lists.denx.de> On Behalf Of Tom Rini
>Sent: Thursday, November 14, 2019 8:24 PM
>To: u-boot at lists.denx.de
>Subject: [U-Boot] [PATCH 2/5] fsl: layerscape: guard *env_sf_get_env_addr()
>on CONFIG_ENV_IS_IN_SPI_FLASH
>
>Signed-off-by: Tom Rini <trini at konsulko.com>
>---
> board/freescale/ls1043aqds/ls1043aqds.c | 2 +-
>board/freescale/ls1046aqds/ls1046aqds.c | 2 +-
> board/freescale/ls1088a/ls1088a.c       | 2 ++
> 3 files changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/board/freescale/ls1043aqds/ls1043aqds.c
>b/board/freescale/ls1043aqds/ls1043aqds.c
>index 45f006dab720..8c96b962b788 100644
>--- a/board/freescale/ls1043aqds/ls1043aqds.c
>+++ b/board/freescale/ls1043aqds/ls1043aqds.c
>@@ -525,7 +525,7 @@ u16 flash_read16(void *addr)
> 	return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);  }
>
>-#ifdef CONFIG_TFABOOT
>+#if defined(CONFIG_TFABOOT) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
> void *env_sf_get_env_addr(void)
> {
> 	return (void *)(CONFIG_SYS_FSL_QSPI_BASE + CONFIG_ENV_OFFSET);
>diff --git a/board/freescale/ls1046aqds/ls1046aqds.c
>b/board/freescale/ls1046aqds/ls1046aqds.c
>index 6a51dcd64913..aac5d9aa848f 100644
>--- a/board/freescale/ls1046aqds/ls1046aqds.c
>+++ b/board/freescale/ls1046aqds/ls1046aqds.c
>@@ -482,7 +482,7 @@ u16 flash_read16(void *addr)
> 	return (((val) >> 8) & 0x00ff) | (((val) << 8) & 0xff00);  }
>
>-#ifdef CONFIG_TFABOOT
>+#if defined(CONFIG_TFABOOT) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
> void *env_sf_get_env_addr(void)
> {
> 	return (void *)(CONFIG_SYS_FSL_QSPI_BASE + CONFIG_ENV_OFFSET);
>diff --git a/board/freescale/ls1088a/ls1088a.c
>b/board/freescale/ls1088a/ls1088a.c
>index f1592982a348..4ecf6dce6855 100644
>--- a/board/freescale/ls1088a/ls1088a.c
>+++ b/board/freescale/ls1088a/ls1088a.c
>@@ -1008,8 +1008,10 @@ int is_flash_available(void)  }  #endif
>
>+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
> void *env_sf_get_env_addr(void)
> {
> 	return (void *)(CONFIG_SYS_FSL_QSPI_BASE + CONFIG_ENV_OFFSET);  }
>#endif
>+#endif
>--
>2.17.1
>
>_______________________________________________
>U-Boot mailing list
>U-Boot at lists.denx.de
>https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.de
>nx.de%2Flistinfo%2Fu-
>boot&data=02%7C01%7Cpriyanka.jain%40nxp.com%7Cd0b86cb9adb24b
>ebd0dc08d76912987c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C
>637093400897027895&sdata=xwglW5DT06o623stOvrJ8c9%2FcWQ4BbezS
>oX2TgKdBGw%3D&reserved=0

Reviewed-by: Priyanka Jain <priyanka.jain at nxp.com>


More information about the U-Boot mailing list