Skip to contentSkip to conversation

arch/arm/lib/Makefile: Allow CONFIG_USE_ARCH_MEMSET/MEMCPY with SPL

PATCH New Mike Looijmans 1 participant 1 message Nov 28, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arch/arm/lib/Makefile: Allow CONFIG_USE_ARCH_MEMSET/MEMCPY with SPL

CONFIG_USE_ARCH_MEMSET/MEMCPY are inside a "SPL" check, which makes it impossible to use CONFIG_USE_ARCH_MEMSET combined with a SPL that calls memset. This patch moves that outside of the "if spl" block, allowing the code to be used inside SPL.

One use case is that when using ECC on the Zynq platform, all the DDR RAM must be written to before it's read, otherwise the system will cause a bus error and hang. Without CONFIG_USE_ARCH_MEMSET it takes over 5 seconds to clear 256MB, enabling CONFIG_USE_ARCH_MEMSET reduces that time to less than 3 seconds.

---
 arch/arm/lib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/lib/Makefile +2 -2
index 0051f76..eac6a5d 100644
@@ -30,12 +30,12 @@ obj-$(CONFIG_CMD_BOOTI) += bootm.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
 obj-$(CONFIG_CMD_BOOTZ) += bootm.o zimage.o
 obj-$(CONFIG_SYS_L2_PL310) += cache-pl310.o
-obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o
-obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 else
 obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
 obj-$(CONFIG_SPL_FRAMEWORK) += zimage.o
 endif
+obj-$(CONFIG_USE_ARCH_MEMSET) += memset.o
+obj-$(CONFIG_USE_ARCH_MEMCPY) += memcpy.o
 obj-$(CONFIG_SEMIHOSTING) += semihosting.o
 
 obj-y	+= sections.o
Signature · 1 line
1.9.1