mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 04:46:01 +01:00
arm: mvebu: Define env_sf_get_env_addr() for all Armada boards in SPL
SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM. Proper U-Boot removes this direct mapping. So it is available only in SPL. This applies for all 32-bit Armada BootROMs. SPL mvebu code is used only on 32-bit Armada SoCs. So move env_sf_get_env_addr() function from Turris Omnia board to common SPL mvebu code and add proper checks for SPI0 CS0. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
1d323d8306
commit
397626ced6
@ -299,6 +299,19 @@ int board_return_to_bootrom(struct spl_image_info *spl_image,
|
|||||||
hang();
|
hang();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* SPI0 CS0 Flash is mapped to address range 0xD4000000 - 0xD7FFFFFF by BootROM.
|
||||||
|
* Proper U-Boot removes this direct mapping. So it is available only in SPL.
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_SPL_ENV_IS_IN_SPI_FLASH) && \
|
||||||
|
CONFIG_ENV_SPI_BUS == 0 && CONFIG_ENV_SPI_CS == 0 && \
|
||||||
|
CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE <= 64*1024*1024
|
||||||
|
void *env_sf_get_env_addr(void)
|
||||||
|
{
|
||||||
|
return (void *)0xD4000000 + CONFIG_ENV_OFFSET;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void board_init_f(ulong dummy)
|
void board_init_f(ulong dummy)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -282,16 +282,6 @@ static bool omnia_detect_wwan_usb3(const char *wwan_slot)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *env_sf_get_env_addr(void)
|
|
||||||
{
|
|
||||||
/* SPI Flash is mapped to address 0xD4000000 only in SPL */
|
|
||||||
#ifdef CONFIG_SPL_BUILD
|
|
||||||
return (void *)0xD4000000 + CONFIG_ENV_OFFSET;
|
|
||||||
#else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
|
int hws_board_topology_load(struct serdes_map **serdes_map_array, u8 *count)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_SPL_ENV_SUPPORT
|
#ifdef CONFIG_SPL_ENV_SUPPORT
|
||||||
|
Loading…
x
Reference in New Issue
Block a user