mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 11/12] pcm043: enable l2x0 cache
Date: Tue, 30 Mar 2010 13:06:54 +0200	[thread overview]
Message-ID: <1269947215-18214-12-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1269947215-18214-1-git-send-email-s.hauer@pengutronix.de>

Also, initialize the MMU in a postcore_initcall to enable
it earlier.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/mach-imx/Kconfig |    3 ++-
 board/pcm043/pcm043.c     |   15 ++++++++-------
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index eeb392a..10561f0 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -228,7 +228,8 @@ config MACH_PCM043
         bool "phyCORE-i.MX35"
         select HAS_CFI
 	select HAVE_MMU
-        select MACH_HAS_LOWLEVEL_INIT
+	select MACH_HAS_LOWLEVEL_INIT
+	select ARCH_HAS_L2X0
         help
           Say Y here if you are using Phytec's phyCORE-i.MX35 (pcm043) equipped
           with a Freescale i.MX35 Processor
diff --git a/board/pcm043/pcm043.c b/board/pcm043/pcm043.c
index 7b0bad1..2ce7e3a 100644
--- a/board/pcm043/pcm043.c
+++ b/board/pcm043/pcm043.c
@@ -145,7 +145,7 @@ static struct device_d imx_ipu_fb_dev = {
 };
 
 #ifdef CONFIG_MMU
-static void pcm043_mmu_init(void)
+static int pcm043_mmu_init(void)
 {
 	mmu_init();
 
@@ -159,20 +159,21 @@ static void pcm043_mmu_init(void)
 #else
 	arm_create_section(0x0,        TEXT_BASE,   1, PMD_SECT_DEF_UNCACHED);
 #endif
+
 	mmu_enable();
+
+#ifdef CONFIG_CACHE_L2X0
+	l2x0_init((void __iomem *)0x30000000, 0x00030024, 0x00000000);
+#endif
+	return 0;
 }
-#else
-static void pcm043_mmu_init(void)
-{
-}
+postcore_initcall(pcm043_mmu_init);
 #endif
 
 static int imx35_devices_init(void)
 {
 	uint32_t reg;
 
-	pcm043_mmu_init();
-
 	/* CS0: Nor Flash */
 	writel(0x0000cf03, CSCR_U(0));
 	writel(0x10000d03, CSCR_L(0));
-- 
1.7.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-03-30 11:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 11:06 More patches for next merge window Sascha Hauer
2010-03-30 11:06 ` [PATCH 01/12] make reset_cpu a __noreturn function Sascha Hauer
2010-03-30 11:06 ` [PATCH 02/12] make panic and hang __noreturn functions Sascha Hauer
2010-03-30 11:06 ` [PATCH 03/12] introduce a arch_shutdown call and call it from shutdown_barebox Sascha Hauer
2010-03-30 11:06 ` [PATCH 04/12] blackfin: implement arch_shutdown call Sascha Hauer
2010-03-30 11:06 ` [PATCH 05/12] go command: shutdown barebox before calling an application Sascha Hauer
2010-03-30 11:06 ` [PATCH 06/12] remove now unused arch_execute Sascha Hauer
2010-03-30 11:06 ` [PATCH 07/12] ARM: replace cleanup_before_linux with the generic shutdown_barebox function Sascha Hauer
2010-03-30 11:06 ` [PATCH 08/12] pass arguments to dma_* as unsigned long as the kernel does Sascha Hauer
2010-03-30 11:06 ` [PATCH 09/12] ARM: Add a wrapper around dma_* functions Sascha Hauer
2010-03-30 11:06 ` [PATCH 10/12] add l2x0 cache support Sascha Hauer
2010-03-30 11:06 ` Sascha Hauer [this message]
2010-03-30 11:06 ` [PATCH 12/12] netx eth driver: remove local definition of ARRAY_SIZE Sascha Hauer

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=1269947215-18214-12-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox