mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
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
3 changed files with 4 additions and 2 deletions
|
@ -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 a new issue