ARM: socfpga: Disable D cache in SPL
Subsystems (3)
PATCH 1/4 ARM: socfpga: Disable D cache in SPL
The bootrom seems to leave the D-cache in messed up state, make sure the SPL disables it so it can not interfere with operation.
--- arch/arm/mach-socfpga/spl_a10.c | 2 ++ include/configs/socfpga_arria10_socdk.h | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-socfpga/spl_a10.c +2 -0
@@ -77,6 +77,8 @@ void spl_board_init(void)void board_init_f (ulong dummy) { +dcache_disable (); +socfpga_init_security_policies ();socfpga_sdram_remap_zero ();
include/configs/socfpga_arria10_socdk.h +0 -2
@@ -15,8 +15,6 @@/* * U-Boot general configurations */ -/* Cache options */ -#define CONFIG_SYS_DCACHE_OFF /* Memory configurations */ #define PHYS_SDRAM_1_SIZE 0x40000000
Signature · 1 line
2.20.1
PATCH 2/4 ARM: socfpga: Drop CONFIG_SYS_NAND_BAD_BLOCK_POS
This is not used anywhere, so drop it.
--- include/configs/socfpga_common.h | 1 - 1 file changed, 1 deletion(-)
include/configs/socfpga_common.h +0 -1
@@ -280,7 +280,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL NAND boot support */ #ifdef CONFIG_SPL_NAND_SUPPORT -#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000#endif
Signature · 1 line
2.20.1
Chee
PATCH 2/4 ARM: socfpga: Drop CONFIG_SYS_NAND_BAD_BLOCK_POS
Quoted 7 lines · Marek Vasut
This is not used anywhere, so drop it.
Signed-off-by Marek Vasut <[email protected]>Cc Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Tien Fong Chee <[email protected]>
Quoted 17 lines
---
include/configs/socfpga_common.h | 1 -1 file changed, 1 deletion(-)include/configs/socfpga_common.h +0
-0@@ -280,7 +280,6 @@ unsigned int cm_get_qspi_controller_clk_hz(void);
/* SPL NAND boot support */
#ifdefCONFIG_SPL_NAND_SUPPORT
-#defineCONFIG_SYS_NAND_BAD_BLOCK_POS0
#defineCONFIG_SYS_NAND_U_BOOT_OFFS0x40000
#endif
PATCH 3/4 ARM: socfpga: Fix Arria10 SPI and NAND U-Boot offset
In reply to Marek VasutThe SPL size on Gen5 is 4*64kiB, but on A10 it is 4*256kiB. Handle the difference.
--- include/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)
include/configs/socfpga_common.h +8 -0
@@ -275,12 +275,20 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL QSPI boot support */ #ifdef CONFIG_SPL_SPI_SUPPORT +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 +#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x100000 +#endif #endif /* SPL NAND boot support */ #ifdef CONFIG_SPL_NAND_SUPPORT +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000 +#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x100000 +#endif #endif /*
Signature · 1 line
2.20.1
PATCH 3/4 ARM: socfpga: Fix Arria10 SPI and NAND U-Boot offset
Quoted 9 lines · Marek Vasut
The SPL size on Gen5 is 4*64kiB, but on A10 it is 4*256kiB. Handle the difference.
Signed-off-by Marek Vasut <[email protected]>Cc Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Tien Fong Chee <[email protected]>
Quoted 32 lines
--- include/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)include/configs/socfpga_common.h +8
-1@@ -275,12 +275,20 @@ unsigned int cm_get_qspi_controller_clk_hz(void);/* SPL QSPI boot support */ #ifdef CONFIG_SPL_SPI_SUPPORT +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 +#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x100000 +#endif #endif /* SPL NAND boot support */ #ifdef CONFIG_SPL_NAND_SUPPORT +#if defined(CONFIG_TARGET_SOCFPGA_GEN5 )#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000 +#elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10 ) +#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x100000 +#endif #endif /* -- 2.20.1
PATCH 4/4 ARM: socfpga: Fix A10 SoCDK Kconfig
In reply to Marek VasutThe Kconfig checked for SoCFPGA Arria10 as a platform, instead of checking for specific board configuration, which works with one single platform in tree, but not with multiple. Fix it.
--- board/altera/arria10-socdk/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/altera/arria10-socdk/Kconfig +1 -1
@@ -1,4 +1,4 @@ -if TARGET_SOCFPGA_ARRIA10 +if TARGET_SOCFPGA_ARRIA10_SOCDK config SYS_CPU default "armv7"
Signature · 1 line
2.20.1
Chee
PATCH 4/4 ARM: socfpga: Fix A10 SoCDK Kconfig
Quoted 9 lines · Marek Vasut
The
Kconfigchecked for SoCFPGA Arria10 as a platform, instead of checking for specific board configuration, which works with one single platform in tree, but not with multiple. Fix it.Signed-off-by Marek Vasut <[email protected]>Cc Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Tien Fong Chee <[email protected]>
Quoted 15 lines
---
board/altera/arria10-socdk/Kconfig | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)board/altera/arria10-socdk/Kconfig +1
-1@@ -1,4 +1,4 @@ -if TARGET_SOCFPGA_ARRIA10 +if TARGET_SOCFPGA_ARRIA10_SOCDK
configSYS_CPU
default "armv7"
Chee
PATCH 1/4 ARM: socfpga: Disable D cache in SPL
In reply to Marek VasutQuoted 8 lines · Marek Vasut
The bootrom seems to leave the D-cache in messed up state, make sure the SPL disables it so it can not interfere with operation.
Signed-off-by Marek Vasut <[email protected]>Cc Chin Liang See <[email protected]>Cc Dinh Nguyen <[email protected]>Cc Simon Goldschmidt <[email protected]>Cc Tien Fong Chee <[email protected]>
Quoted 33 lines
---
arch/arm/mach-socfpga/spl_a10.c | 2 ++
include/configs/socfpga_arria10_socdk.h | 2 --2 files changed, 2 insertions(+), 2 deletions(-)arch/arm/mach- renamed from arch/arm/mach-socfpga/spl_a10.c +0
-0
socfpga/spl_a10.c
indexc97eacb424..c8e73d47c0100644arch/arm/mach-socfpga/spl_a10.c +0
-0@@ -77,6 +77,8 @@ void spl_board_init(void)
voidboard_init_f(ulong dummy)
{arch/arm/mach-socfpga/spl_a10.c +2
-0+dcache_disable (); +
socfpga_init_security_policies();
socfpga_sdram_remap_zero();include/configs/socfpga_arria10_socdk.h +0
-2@@ -15,8 +15,6 @@ /** U-Boot general configurations */ -/* Cache options */ -#define CONFIG_SYS_DCACHE_OFF
/* Memory configurations */
#definePHYS_SDRAM_1_SIZE0x40000000