All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <fabio.estevam@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 1/4] MX5: Make the weim structure complete
Date: Wed, 18 May 2011 17:47:47 -0300	[thread overview]
Message-ID: <1305751670-30808-1-git-send-email-fabio.estevam@freescale.com> (raw)

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v2:
- Add CS1_BASE_ADDR for MX51
- Add WEIM Registers
 arch/arm/include/asm/arch-mx5/imx-regs.h |  131 ++++++++++++++++++++++++++++--
 1 files changed, 125 insertions(+), 6 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx5/imx-regs.h b/arch/arm/include/asm/arch-mx5/imx-regs.h
index a1849f8..b65b11f 100644
--- a/arch/arm/include/asm/arch-mx5/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx5/imx-regs.h
@@ -32,6 +32,7 @@
 #define CSD0_BASE_ADDR          0x90000000
 #define CSD1_BASE_ADDR          0xA0000000
 #define NFC_BASE_ADDR_AXI       0xCFFF0000
+#define CS1_BASE_ADDR           0xB8000000
 #elif defined(CONFIG_MX53)
 #define IPU_CTRL_BASE_ADDR      0x18000000
 #define SPBA0_BASE_ADDR         0x50000000
@@ -41,6 +42,7 @@
 #define CSD1_BASE_ADDR          0xB0000000
 #define NFC_BASE_ADDR_AXI       0xF7FF0000
 #define IRAM_BASE_ADDR          0xF8000000
+#define CS1_BASE_ADDR           0xF4000000
 #else
 #error "CPU_TYPE not defined"
 #endif
@@ -129,6 +131,90 @@
 #define SAHARA_BASE_ADDR	(AIPS2_BASE_ADDR + 0x000F8000)
 
 /*
+ * WEIM CSnGCR1
+ */
+#define CSEN(x)	(x)
+#define SWR(x)		((x) << 1)
+#define SRD(x)		((x) << 2)
+#define MUM(x)		((x) << 3)
+#define WFL(x)		((x) << 4)
+#define RFL(x)		((x) << 5)
+#define CRE(x)		((x) << 6)
+#define CREP(x)	((x) << 7)
+#define BL(x)		(((x) & 0x7) << 8)
+#define WC(x)		((x) << 11)
+#define BCD(x)		(((x) & 0x3) << 12)
+#define BCS(x)		(((x) & 0x3) << 14)
+#define DSZ(x)		(((x) & 0x7) << 16)
+#define SP(x)		((x) << 19)
+#define CSREC(x)	(((x) & 0x7) << 20)
+#define AUS(x)		((x) << 23)
+#define GBC(x)		(((x) & 0x7) << 24)
+#define WP(x)		((x) << 27)
+#define PSZ(x)		(((x) & 0x0f << 28)
+
+/*
+ * WEIM CSnGCR2
+ */
+#define ADH(x)		(((x) & 0x3))
+#define DAPS(x)	(((x) & 0x0f << 4)
+#define DAE(x)		((x) << 8)
+#define DAP(x)		((x) << 9)
+#define MUX16_BYP(x)	((x) << 12)
+
+/*
+ * WEIM CSnRCR1
+ */
+#define RCSN(x)	(((x) & 0x7))
+#define RCSA(x)	(((x) & 0x7) << 4)
+#define OEN(x)		(((x) & 0x7) << 8)
+#define OEA(x)		(((x) & 0x7) << 12)
+#define RADVN(x)	(((x) & 0x7) << 16)
+#define RAL(x)		((x) << 19)
+#define RADVA(x)	(((x) & 0x7) << 20)
+#define RWSC(x)	(((x) & 0x3f) << 24)
+
+/*
+ * WEIM CSnRCR2
+ */
+#define RBEN(x)	(((x) & 0x7))
+#define RBE(x)		((x) << 3)
+#define RBEA(x)	(((x) & 0x7) << 4)
+#define RL(x)		(((x) & 0x3) << 8)
+#define PAT(x)		(((x) & 0x7) << 12)
+#define APR(x)		((x) << 15)
+
+/*
+ * WEIM CSnWCR1
+ */
+#define WCSN(x)	(((x) & 0x7))
+#define WCSA(x)	(((x) & 0x7) << 3)
+#define WEN(x)		(((x) & 0x7) << 6)
+#define WEA(x)		(((x) & 0x7) << 9)
+#define WBEN(x)	(((x) & 0x7) << 12)
+#define WBEA(x)	(((x) & 0x7) << 15)
+#define WADVN(x)	(((x) & 0x7) << 18)
+#define WADVA(x)	(((x) & 0x7) << 21)
+#define WWSC(x)	(((x) & 0x3f) << 24)
+#define WBED1(x)	((x) << 30)
+#define WAL(x)		((x) << 31)
+
+/*
+ * WEIM CSnWCR2
+ */
+#define WBED(x)	(x)
+
+/*
+ * WEIM WCR
+ */
+#define BCM(x)		(x)
+#define GBCD(x)	(((x) & 0x3) << 1)
+#define INTEN(x)	((x) << 4)
+#define INTPOL(x)	((x) << 5)
+#define WDOG_EN(x)	((x) << 8)
+#define WDOG_LIMIT(x)	(((x) & 0x3) << 9)
+
+/*
  * Number of GPIO pins per port
  */
 #define GPIO_NUM_PIN            32
@@ -231,12 +317,45 @@ struct clkctl {
 
 /* WEIM registers */
 struct weim {
-	u32	csgcr1;
-	u32	csgcr2;
-	u32	csrcr1;
-	u32	csrcr2;
-	u32	cswcr1;
-	u32	cswcr2;
+	u32	cs0gcr1;
+	u32	cs0gcr2;
+	u32	cs0rcr1;
+	u32	cs0rcr2;
+	u32	cs0wcr1;
+	u32	cs0wcr2;
+	u32	cs1gcr1;
+	u32	cs1gcr2;
+	u32	cs1rcr1;
+	u32	cs1rcr2;
+	u32	cs1wcr1;
+	u32	cs1wcr2;
+	u32	cs2gcr1;
+	u32	cs2gcr2;
+	u32	cs2rcr1;
+	u32	cs2rcr2;
+	u32	cs2wcr1;
+	u32	cs2wcr2;
+	u32	cs3gcr1;
+	u32	cs3gcr2;
+	u32	cs3rcr1;
+	u32	cs3rcr2;
+	u32	cs3wcr1;
+	u32	cs3wcr2;
+	u32	cs4gcr1;
+	u32	cs4gcr2;
+	u32	cs4rcr1;
+	u32	cs4rcr2;
+	u32	cs4wcr1;
+	u32	cs4wcr2;
+	u32	cs5gcr1;
+	u32	cs5gcr2;
+	u32	cs5rcr1;
+	u32	cs5rcr2;
+	u32	cs5wcr1;
+	u32	cs5wcr2;
+	u32	wcr;
+	u32	wiar;
+	u32	ear;
 };
 
 /* GPIO Registers */
-- 
1.6.0.4

             reply	other threads:[~2011-05-18 20:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-18 20:47 Fabio Estevam [this message]
2011-05-18 20:47 ` [U-Boot] [PATCH v3 2/4] MX5: Add iomux structure Fabio Estevam
2011-05-18 20:47   ` [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size Fabio Estevam
2011-05-18 20:47     ` [U-Boot] [PATCH v3 4/4] MX53: Add initial support for MX53ARD Fabio Estevam
2011-05-19  8:46     ` [U-Boot] [PATCH v3 3/4] MX5: Introduce a function for setting the chip select size Stefano Babic
2011-05-19 11:49       ` Fabio Estevam
2011-05-19 12:04         ` Stefano Babic
2011-05-19 19:02     ` Wolfgang Denk

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=1305751670-30808-1-git-send-email-fabio.estevam@freescale.com \
    --to=fabio.estevam@freescale.com \
    --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.