From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 09/14] ARM i.MX: Add header file for WEIM cs setup
Date: Mon, 24 Sep 2012 12:46:18 +0200 [thread overview]
Message-ID: <1348483583-12586-10-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1348483583-12586-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c | 1 +
arch/arm/boards/imx27ads/imx27ads.c | 1 +
arch/arm/boards/pcm038/pcm038.c | 1 +
arch/arm/boards/pcm038/pcm970.c | 1 +
arch/arm/mach-imx/imx27.c | 9 +++++++++
arch/arm/mach-imx/include/mach/imx27-regs.h | 10 ----------
arch/arm/mach-imx/include/mach/weim.h | 7 +++++++
7 files changed, 20 insertions(+), 10 deletions(-)
create mode 100644 arch/arm/mach-imx/include/mach/weim.h
diff --git a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
index 0ffe43f..cff4f77 100644
--- a/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -37,6 +37,7 @@
#include <io.h>
#include <mach/imx-nand.h>
#include <mach/imx-pll.h>
+#include <mach/weim.h>
#include <mach/imxfb.h>
#include <ns16550.h>
#include <asm/mmu.h>
diff --git a/arch/arm/boards/imx27ads/imx27ads.c b/arch/arm/boards/imx27ads/imx27ads.c
index f9416e1..22c6e40 100644
--- a/arch/arm/boards/imx27ads/imx27ads.c
+++ b/arch/arm/boards/imx27ads/imx27ads.c
@@ -23,6 +23,7 @@
#include <io.h>
#include <fec.h>
#include <mach/gpio.h>
+#include <mach/weim.h>
#include <partition.h>
#include <fs.h>
#include <fcntl.h>
diff --git a/arch/arm/boards/pcm038/pcm038.c b/arch/arm/boards/pcm038/pcm038.c
index a51825b..58b1ec9 100644
--- a/arch/arm/boards/pcm038/pcm038.c
+++ b/arch/arm/boards/pcm038/pcm038.c
@@ -31,6 +31,7 @@
#include <io.h>
#include <mach/imx-nand.h>
#include <mach/imx-pll.h>
+#include <mach/weim.h>
#include <mach/imxfb.h>
#include <i2c/i2c.h>
#include <mach/spi.h>
diff --git a/arch/arm/boards/pcm038/pcm970.c b/arch/arm/boards/pcm038/pcm970.c
index d392ea4..b8fc65b 100644
--- a/arch/arm/boards/pcm038/pcm970.c
+++ b/arch/arm/boards/pcm038/pcm970.c
@@ -18,6 +18,7 @@
#include <platform_ide.h>
#include <mach/imx-regs.h>
#include <mach/iomux-mx27.h>
+#include <mach/weim.h>
#include <mach/gpio.h>
#include <mach/devices-imx27.h>
#include <usb/ulpi.h>
diff --git a/arch/arm/mach-imx/imx27.c b/arch/arm/mach-imx/imx27.c
index 76bb910..0c92385 100644
--- a/arch/arm/mach-imx/imx27.c
+++ b/arch/arm/mach-imx/imx27.c
@@ -13,6 +13,7 @@
#include <common.h>
#include <mach/imx-regs.h>
+#include <mach/weim.h>
#include <sizes.h>
#include <init.h>
#include <io.h>
@@ -22,6 +23,14 @@ int imx_silicon_revision(void)
return CID >> 28;
}
+void imx27_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
+ unsigned additional)
+{
+ writel(upper, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x0);
+ writel(lower, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x4);
+ writel(additional, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x8);
+}
+
/*
* Initialize MAX on i.MX27. necessary to give the DMA engine
* higher priority to the memory than the CPU. Needed for proper
diff --git a/arch/arm/mach-imx/include/mach/imx27-regs.h b/arch/arm/mach-imx/include/mach/imx27-regs.h
index 6e47b28..5db1a3c 100644
--- a/arch/arm/mach-imx/include/mach/imx27-regs.h
+++ b/arch/arm/mach-imx/include/mach/imx27-regs.h
@@ -278,14 +278,4 @@
#define ESDCFG_TWTR (1 << 20)
#define ESDCFG_TXP(x) (((x) & 0x3) << 21)
-#ifndef __ASSEMBLY__
-#include <io.h>
-static inline void imx27_setup_weimcs(size_t cs, unsigned upper, unsigned lower, unsigned additional)
-{
- writel(upper, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x0);
- writel(lower, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x4);
- writel(additional, MX27_WEIM_BASE_ADDR + (cs * 0x10) + 0x4);
-}
-#endif /* __ASSEMBLY__ */
-
#endif /* _IMX27_REGS_H */
diff --git a/arch/arm/mach-imx/include/mach/weim.h b/arch/arm/mach-imx/include/mach/weim.h
new file mode 100644
index 0000000..bc9b51e
--- /dev/null
+++ b/arch/arm/mach-imx/include/mach/weim.h
@@ -0,0 +1,7 @@
+#ifndef __MACH_WEIM_H
+#define __MACH_WEIM_H
+
+void imx27_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
+ unsigned additional);
+
+#endif /* __MACH_WEIM_H */
--
1.7.10.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-09-24 10:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 10:46 [PATCH] i.MX register cleanups Sascha Hauer
2012-09-24 10:46 ` [PATCH 01/14] ARM i.MX31: give register base addresses a proper MX31_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 02/14] ARM i.MX35: give register base addresses a proper MX35_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 03/14] ARM i.MX21: give register base addresses a proper MX21_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 04/14] ARM i.MX1: give register base addresses a proper MX1_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 05/14] ARM i.MX27: give register base addresses a proper MX27_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 06/14] ARM i.MX25: give register base addresses a proper MX25_ prefix Sascha Hauer
2012-09-24 10:46 ` [PATCH 07/14] ARM i.MX/MXS: Allow to include imx*-regs.h directly Sascha Hauer
2012-09-24 10:46 ` [PATCH 08/14] ARM i.MX51: Use defines rather than hardcoded addresses Sascha Hauer
2012-09-24 10:46 ` Sascha Hauer [this message]
2012-09-24 10:46 ` [PATCH 10/14] ARM i.MX1: Add function to setup chipselect Sascha Hauer
2012-09-24 10:46 ` [PATCH 11/14] ARM i.MX21: " Sascha Hauer
2012-09-24 10:46 ` [PATCH 12/14] ARM i.MX31: " Sascha Hauer
2012-09-24 10:46 ` [PATCH 13/14] ARM i.MX35: " Sascha Hauer
2012-09-24 10:46 ` [PATCH 14/14] ARM i.MX25: " Sascha Hauer
2012-09-24 12:04 ` Roberto Nibali
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=1348483583-12586-10-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