All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/8] MX35: added ESDC structure to imx-regs
@ 2011-09-16  9:46 Stefano Babic
  2011-09-16  9:46 ` [U-Boot] [PATCH 2/8] MX35: add pins definition for UART3 Stefano Babic
                   ` (11 more replies)
  0 siblings, 12 replies; 29+ messages in thread
From: Stefano Babic @ 2011-09-16  9:46 UTC (permalink / raw)
  To: u-boot

The structure and PLL defines are added to
the imx-regs.h file and dropped from board
header files.

Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 arch/arm/include/asm/arch-mx35/imx-regs.h |   30 +++++++++++++++++++++++++++++
 board/freescale/mx35pdk/mx35pdk.h         |   18 -----------------
 2 files changed, 30 insertions(+), 18 deletions(-)

diff --git a/arch/arm/include/asm/arch-mx35/imx-regs.h b/arch/arm/include/asm/arch-mx35/imx-regs.h
index e741fb0..08fd2d5 100644
--- a/arch/arm/include/asm/arch-mx35/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx35/imx-regs.h
@@ -147,6 +147,19 @@
 #define PLL_MFI(x)		(((x) & 0xf) << 10)
 #define PLL_MFN(x)		(((x) & 0x3ff) << 0)
 
+#define _PLL_BRM(x)	((x) << 31)
+#define _PLL_PD(x)	(((x) - 1) << 26)
+#define _PLL_MFD(x)	(((x) - 1) << 16)
+#define _PLL_MFI(x)	((x) << 10)
+#define _PLL_MFN(x)	(x)
+#define _PLL_SETTING(brm, pd, mfd, mfi, mfn) \
+	(_PLL_BRM(brm) | _PLL_PD(pd) | _PLL_MFD(mfd) | _PLL_MFI(mfi) |\
+	 _PLL_MFN(mfn))
+
+#define CCM_MPLL_532_HZ	_PLL_SETTING(1, 1, 12, 11, 1)
+#define CCM_MPLL_399_HZ _PLL_SETTING(0, 1, 16, 8, 5)
+#define CCM_PPLL_300_HZ _PLL_SETTING(0, 1, 4, 6, 1)
+
 #define CSCR_U(x)	(WEIM_CTRL_CS#x + 0)
 #define CSCR_L(x)	(WEIM_CTRL_CS#x + 4)
 #define CSCR_A(x)	(WEIM_CTRL_CS#x + 8)
@@ -286,6 +299,23 @@ struct wdog_regs {
 	u16 wmcr;	/* Misc Control */
 };
 
+struct esdc_regs {
+	u32	esdctl0;
+	u32	esdcfg0;
+	u32	esdctl1;
+	u32	esdcfg1;
+	u32	esdmisc;
+	u32	reserved[4];
+	u32	esdcdly[5];
+	u32	esdcdlyl;
+};
+
+#define ESDC_MISC_RST		(1 << 1)
+#define ESDC_MISC_MDDR_EN	(1 << 2)
+#define ESDC_MISC_MDDR_DL_RST	(1 << 3)
+#define ESDC_MISC_DDR_EN	(1 << 8)
+#define ESDC_MISC_DDR2_EN	(1 << 9)
+
 /*
  * NFMS bit in RCSR register for pagesize of nandflash
  */
diff --git a/board/freescale/mx35pdk/mx35pdk.h b/board/freescale/mx35pdk/mx35pdk.h
index 409aeb2..6aeb218 100644
--- a/board/freescale/mx35pdk/mx35pdk.h
+++ b/board/freescale/mx35pdk/mx35pdk.h
@@ -59,24 +59,6 @@
 #define CCM_CCMR_CONFIG		0x003F4208
 #define CCM_PDR0_CONFIG		0x00801000
 
-#define PLL_BRM_OFFSET	31
-#define PLL_PD_OFFSET	26
-#define PLL_MFD_OFFSET	16
-#define PLL_MFI_OFFSET	10
-
-#define _PLL_BRM(x)	((x) << PLL_BRM_OFFSET)
-#define _PLL_PD(x)	(((x) - 1) << PLL_PD_OFFSET)
-#define _PLL_MFD(x)	(((x) - 1) << PLL_MFD_OFFSET)
-#define _PLL_MFI(x)	((x) << PLL_MFI_OFFSET)
-#define _PLL_MFN(x)	(x)
-#define _PLL_SETTING(brm, pd, mfd, mfi, mfn) \
-	(_PLL_BRM(brm) | _PLL_PD(pd) | _PLL_MFD(mfd) | _PLL_MFI(mfi) |\
-	 _PLL_MFN(mfn))
-
-#define CCM_MPLL_532_HZ	_PLL_SETTING(1, 1, 12, 11, 1)
-#define CCM_MPLL_399_HZ _PLL_SETTING(0, 1, 16, 8, 5)
-#define CCM_PPLL_300_HZ _PLL_SETTING(0, 1, 4, 6, 1)
-
 /* MEMORY SETTING */
 #define ESDCTL_0x92220000	0x92220000
 #define ESDCTL_0xA2220000	0xA2220000
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2011-10-24  9:58 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-16  9:46 [U-Boot] [PATCH 1/8] MX35: added ESDC structure to imx-regs Stefano Babic
2011-09-16  9:46 ` [U-Boot] [PATCH 2/8] MX35: add pins definition for UART3 Stefano Babic
2011-09-16  9:46 ` [U-Boot] [PATCH 3/8] MX35: add reset cause as provided by other i.MX Stefano Babic
2011-09-16  9:46 ` [U-Boot] [PATCH 4/8] MX35: factorize common assembly code Stefano Babic
2011-09-16  9:46 ` [U-Boot] [PATCH 5/8] ARM: moved general function to arm/lib Stefano Babic
2011-09-28 18:22   ` Stefano Babic
2011-10-06 21:30   ` Wolfgang Denk
2011-10-06 22:11     ` stefano babic
2011-10-06 22:25       ` Wolfgang Denk
2011-09-16  9:46 ` [U-Boot] [PATCH 6/8] I2C: added I2C-2 and I2C-3 to MX35 Stefano Babic
2011-09-19  6:14   ` Heiko Schocher
2011-09-16  9:46 ` [U-Boot] [PATCH 7/8] MX35: Drop unnecessary prototypes from imx-regs.h Stefano Babic
2011-09-16  9:46 ` [U-Boot] [PATCH 8/8] MX35: add support for flea3 board Stefano Babic
2011-09-16 11:48   ` Fabio Estevam
2011-09-16 11:56     ` Stefano Babic
2011-09-16 11:49   ` Fabio Estevam
2011-09-16 11:50     ` Stefano Babic
2011-09-20 11:53   ` [U-Boot] [PATCH V2 " Stefano Babic
2011-10-06 21:29   ` [U-Boot] [PATCH " Wolfgang Denk
2011-09-20 14:12 ` [U-Boot] [PATCH V3 " Stefano Babic
2011-10-06 21:28   ` Wolfgang Denk
2011-10-06 22:03     ` stefano babic
2011-10-06 22:38 ` [U-Boot] [PATCH V4 " Stefano Babic
     [not found]   ` <CAOMZO5DqqOiUfeCTKFQTy33_fTsUHAMhSQ59bU0PnuU1AZ8Ckg@mail.gmail.com>
2011-10-08 12:24     ` Stefano Babic
2011-10-08 12:33 ` [U-Boot] [PATCH V5 " Stefano Babic
2011-10-15  8:06 ` [U-Boot] [PATCH V2 5/8] ARM: moved general function to arm/lib Stefano Babic
2011-10-15 10:15   ` Albert ARIBAUD
2011-10-15 11:12     ` Stefano Babic
2011-10-24  9:58 ` [U-Boot] [PATCH V6] MX35: add support for flea3 board Stefano Babic

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.