fsl: layerscape: guard *env_sf_get_env_addr() on CONFIG_ENV_IS_IN_SPI_FLASH
These functions can only be built and used when we have ENV_IS_IN_SPI_FLASH, use that as a guard. Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
a8992e788a
commit
dbcb4dae36
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user