mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 3/4] ARM: imx6: use l2x0 header for register definitions
Date: Mon, 12 Oct 2015 15:54:51 +0200	[thread overview]
Message-ID: <1444658092-26864-3-git-send-email-l.stach@pengutronix.de> (raw)
In-Reply-To: <1444658092-26864-1-git-send-email-l.stach@pengutronix.de>

Instead of using a redundant definition. This makes things a bit cleaner
and also avoids to introduce another private define in the next patch.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 arch/arm/mach-imx/imx6.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-imx/imx6.c b/arch/arm/mach-imx/imx6.c
index ceabe19dc2ab..509ac8460216 100644
--- a/arch/arm/mach-imx/imx6.c
+++ b/arch/arm/mach-imx/imx6.c
@@ -23,6 +23,7 @@
 #include <mach/imx6-regs.h>
 #include <mach/generic.h>
 #include <asm/mmu.h>
+#include <asm/cache-l2x0.h>
 
 #define SI_REV 0x260
 
@@ -195,8 +196,6 @@ int imx6_devices_init(void)
 	return 0;
 }
 
-#define L310_PREFETCH_CTRL		0xF60
-
 static int imx6_mmu_init(void)
 {
 	void __iomem *l2x0_base = IOMEM(0x00a02000);
@@ -205,8 +204,8 @@ static int imx6_mmu_init(void)
 	if (!cpu_is_mx6())
 		return 0;
 
-	/* Configure the L2 PREFETCH and POWER registers */
-	val = readl(l2x0_base + L310_PREFETCH_CTRL);
+	/* configure the PREFETCH register */
+	val = readl(l2x0_base + L2X0_PREFETCH_CTRL);
 	val |= 0x70800000;
 
 	/*
@@ -221,7 +220,7 @@ static int imx6_mmu_init(void)
 	if (cpu_is_mx6q())
 		val &= ~(1 << 30 | 1 << 23);
 
-	writel(val, l2x0_base + L310_PREFETCH_CTRL);
+	writel(val, l2x0_base + L2X0_PREFETCH_CTRL);
 
 	l2x0_init(l2x0_base, 0x0, ~0UL);
 
-- 
2.6.0


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

  parent reply	other threads:[~2015-10-12 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-12 13:54 [PATCH 1/4] ARM: l2x0: correct indentation Lucas Stach
2015-10-12 13:54 ` [PATCH 2/4] ARM: l2x0: move outer cache flush on disable to user Lucas Stach
2015-10-12 13:54 ` Lucas Stach [this message]
2015-10-12 13:54 ` [PATCH 4/4] ARM: imx6: set shared attribute override bit in PL310 Lucas Stach
2015-10-13  8:45 ` [PATCH 1/4] ARM: l2x0: correct indentation 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=1444658092-26864-3-git-send-email-l.stach@pengutronix.de \
    --to=l.stach@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