All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Looijmans <mike.looijmans@topic.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arch/arm/lib/Makefile: Allow CONFIG_USE_ARCH_MEMSET/MEMCPY with SPL
Date: Mon, 28 Nov 2016 09:27:30 +0100	[thread overview]
Message-ID: <1480321650-5454-1-git-send-email-mike.looijmans@topic.nl> (raw)

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.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 arch/arm/lib/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 0051f76..eac6a5d 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -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
-- 
1.9.1

                 reply	other threads:[~2016-11-28  8:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1480321650-5454-1-git-send-email-mike.looijmans@topic.nl \
    --to=mike.looijmans@topic.nl \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.