Skip to contentSkip to conversation

socfpga: Fix SOCFPGA build error for Altera dev kit

PATCH In review Chin Liang See 2 participants 2 messages Jul 22, 2014 – Aug 30, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 socfpga: Fix SOCFPGA build error for Altera dev kit

To fix the build error when build for Altera dev kit, not virtual target. At same time, set the build for Altera dev kit as default instead virtual target. With that, U-Boot is booting well and SPL still lack of few drivers.

Cc Pavel Machek <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>
---
 arch/arm/cpu/armv7/socfpga/clock_manager.c       |    1 -
 arch/arm/cpu/armv7/socfpga/config.mk             |    3 +++
 arch/arm/cpu/armv7/socfpga/spl.c                 |    2 ++
 arch/arm/include/asm/arch-socfpga/scan_manager.h |    2 ++
 board/altera/socfpga/Makefile                    |    2 +-
 include/configs/socfpga_cyclone5.h               |    2 +-
 6 files changed, 9 insertions(+), 3 deletions(-)
arch/arm/cpu/armv7/socfpga/clock_manager.c +0 -1
index 23d697d..85a1a70 100644
@@ -188,7 +188,6 @@ void cm_basic_init(const cm_config_t *cfg)
 	 * Time starts here
 	 * must wait 7 us from BGPWRDN_SET(0) to VCO_ENABLE_SET(1)
 	 */
-	reset_timer();
 	start = get_timer(0);
 	/* timeout in unit of us as CONFIG_SYS_HZ = 1000*1000 */
 	timeout = 7;
arch/arm/cpu/armv7/socfpga/config.mk +3 -0
index 3d18491..2a99c72 100644
@@ -6,3 +6,6 @@
 ifndef CONFIG_SPL_BUILD
 ALL-y	+= u-boot.img
 endif
+
+# Added for handoff support
+PLATFORM_RELFLAGS += -Iboard/$(VENDOR)/$(BOARD)
arch/arm/cpu/armv7/socfpga/spl.c +2 -0
index 4bed19d..27efde6 100644
@@ -14,6 +14,8 @@
 #include <spl.h>
 #include <asm/arch/system_manager.h>
 #include <asm/arch/freeze_controller.h>
+#include <asm/arch/clock_manager.h>
+#include <asm/arch/scan_manager.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
arch/arm/include/asm/arch-socfpga/scan_manager.h +2 -0
index f9be621..b2686d3 100644
@@ -87,4 +87,6 @@ extern const uint32_t iocsr_scan_chain2_table[
 extern const uint32_t iocsr_scan_chain3_table[
 	((CONFIG_HPS_IOCSR_SCANCHAIN3_LENGTH / 32) + 1)];
 
+int scan_mgr_configure_iocsr(void);
+
 #endif /* _SCAN_MANAGER_H_ */
board/altera/socfpga/Makefile +1 -1
index de339ec..44baa00 100644
@@ -7,4 +7,4 @@
 #
 
 obj-y	:= socfpga_cyclone5.o
-obj-$(CONFIG_SPL_BUILD) += pinmux_config.o
+obj-$(CONFIG_SPL_BUILD) += pinmux_config.o iocsr_config.o
include/configs/socfpga_cyclone5.h +1 -1
index 262e744..589f2e3 100644
@@ -15,7 +15,7 @@
  * High level configuration
  */
 /* Virtual target or real hardware */
-#define CONFIG_SOCFPGA_VIRTUAL_TARGET
+#undef CONFIG_SOCFPGA_VIRTUAL_TARGET
 
 #define CONFIG_ARMV7
 #define CONFIG_SYS_DCACHE_OFF
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 10 lines · Chin Liang See

To fix the build error when build for Altera dev kit, not virtual target. At same time, set the build for Altera dev kit as default instead virtual target. With that, U-Boot is booting well and SPL still lack of few drivers.

Cc Pavel Machek <[email protected]>
Cc Marek Vasut <[email protected]>
Cc Tom Rini <[email protected]>
Cc Albert Aribaud <[email protected]>

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140830/859eee1a/attachment.pgp>