All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 4/8] arm, davinci: add ddr2 definition
Date: Thu, 15 Sep 2011 07:59:36 +0200	[thread overview]
Message-ID: <1316066380-7397-5-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1316066380-7397-1-git-send-email-hs@denx.de>

Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Paulraj Sandeep <s-paulraj@ti.com>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
---
 arch/arm/include/asm/arch-davinci/ddr2_defs.h |   96 +++++++++++++++++++++++++
 1 files changed, 96 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/include/asm/arch-davinci/ddr2_defs.h

diff --git a/arch/arm/include/asm/arch-davinci/ddr2_defs.h b/arch/arm/include/asm/arch-davinci/ddr2_defs.h
new file mode 100644
index 0000000..1b9430c
--- /dev/null
+++ b/arch/arm/include/asm/arch-davinci/ddr2_defs.h
@@ -0,0 +1,96 @@
+/*
+ * Copyright (C) 2011
+ * Heiko Schocher, DENX Software Engineering, hs at denx.de.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+#ifndef _DV_DDR2_DEFS_H_
+#define _DV_DDR2_DEFS_H_
+
+/*
+ * DDR2 Memory Ctrl Register structure
+ * See sprueh7d.pdf for more details.
+ */
+struct dv_ddr2_regs_ctrl {
+	unsigned char	rsvd0[4];	/* 0x00 */
+	unsigned int	sdrstat;	/* 0x04 */
+	unsigned int	sdbcr;		/* 0x08 */
+	unsigned int	sdrcr;		/* 0x0C */
+	unsigned int	sdtimr;		/* 0x10 */
+	unsigned int	sdtimr2;	/* 0x14 */
+	unsigned char	rsvd1[4];	/* 0x18 */
+	unsigned int	sdbcr2;		/* 0x1C */
+	unsigned int	pbbpr;		/* 0x20 */
+	unsigned char	rsvd2[156];	/* 0x24 */
+	unsigned int	irr;		/* 0xC0 */
+	unsigned int	imr;		/* 0xC4 */
+	unsigned int	imsr;		/* 0xC8 */
+	unsigned int	imcr;		/* 0xCC */
+	unsigned char	rsvd3[20];	/* 0xD0 */
+	unsigned int	ddrphycr;	/* 0xE4 */
+	unsigned int	ddrphycr2;	/* 0xE8 */
+	unsigned char	rsvd4[4];	/* 0xEC */
+};
+
+#define DV_DDR_PHY_PWRDNEN		0x40
+#define DV_DDR_PHY_EXT_STRBEN	0x80
+#define DV_DDR_PHY_RD_LATENCY_SHIFT	0
+
+#define DV_DDR_SDTMR1_RFC_SHIFT	25
+#define DV_DDR_SDTMR1_RP_SHIFT	22
+#define DV_DDR_SDTMR1_RCD_SHIFT	19
+#define DV_DDR_SDTMR1_WR_SHIFT	16
+#define DV_DDR_SDTMR1_RAS_SHIFT	11
+#define DV_DDR_SDTMR1_RC_SHIFT	6
+#define DV_DDR_SDTMR1_RRD_SHIFT	3
+#define DV_DDR_SDTMR1_WTR_SHIFT	0
+
+#define DV_DDR_SDTMR2_RASMAX_SHIFT	27
+#define DV_DDR_SDTMR2_XP_SHIFT	25
+#define DV_DDR_SDTMR2_XSNR_SHIFT	16
+#define DV_DDR_SDTMR2_XSRD_SHIFT	8
+#define DV_DDR_SDTMR2_RTP_SHIFT	5
+#define DV_DDR_SDTMR2_CKE_SHIFT	0
+
+#define DV_DDR_SDCR_DDR2TERM1_SHIFT	27
+#define DV_DDR_SDCR_IBANK_POS_SHIFT	26
+#define DV_DDR_SDCR_MSDRAMEN_SHIFT	25
+#define DV_DDR_SDCR_DDRDRIVE1_SHIFT	24
+#define DV_DDR_SDCR_BOOTUNLOCK_SHIFT	23
+#define DV_DDR_SDCR_DDR_DDQS_SHIFT	22
+#define DV_DDR_SDCR_DDR2EN_SHIFT	20
+#define DV_DDR_SDCR_DDRDRIVE0_SHIFT	18
+#define DV_DDR_SDCR_DDREN_SHIFT	17
+#define DV_DDR_SDCR_SDRAMEN_SHIFT	16
+#define DV_DDR_SDCR_TIMUNLOCK_SHIFT	15
+#define DV_DDR_SDCR_BUS_WIDTH_SHIFT	14
+#define DV_DDR_SDCR_CL_SHIFT		9
+#define DV_DDR_SDCR_IBANK_SHIFT	4
+#define DV_DDR_SDCR_PAGESIZE_SHIFT	0
+
+#define DV_DDR_SRCR_LPMODEN_SHIFT	31
+#define DV_DDR_SRCR_MCLKSTOPEN_SHIFT	30
+
+#define DV_DDR_BOOTUNLOCK	(1 << DV_DDR_SDCR_BOOTUNLOCK_SHIFT)
+#define DV_DDR_TIMUNLOCK	(1 << DV_DDR_SDCR_TIMUNLOCK_SHIFT)
+
+#define dv_ddr2_regs_ctrl \
+	((struct dv_ddr2_regs_ctrl *)DAVINCI_DDR_EMIF_CTRL_BASE)
+
+#endif /* _DV_DDR2_DEFS_H_ */
-- 
1.7.6

  parent reply	other threads:[~2011-09-15  5:59 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-15  5:59 [U-Boot] [PATCH 0/8] arm, davinci: add support for the am1808 based enbw_cmc board Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 1/8] arm, davinci: add SYSCFG1 base and register struct Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 2/8] arm, davinci: add some missing defines in hardware.h Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 3/8] arm, davinci, am1808, gpio: add missing defines for bank 8 Heiko Schocher
2011-09-15  5:59 ` Heiko Schocher [this message]
2011-09-15  5:59 ` [U-Boot] [PATCH 5/8] arm, davinci: add NOR Boot Configuration Word Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 6/8] arm, davinci, am1808: add lowlevel functions for booting from NOR Heiko Schocher
2011-09-26  8:02   ` Christian Riesch
2011-09-26  8:28     ` Heiko Schocher
2011-09-27  6:57       ` Christian Riesch
2011-09-27  7:27         ` Heiko Schocher
2011-09-27  8:37           ` Christian Riesch
2011-09-27  8:50             ` Heiko Schocher
2011-09-27 10:36               ` Christian Riesch
2011-09-27 11:18         ` Heiko Schocher
2011-09-30  6:57   ` Christian Riesch
2011-09-30  7:11     ` Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 7/8] arm, davinci, da8xx: add cpuinfo Heiko Schocher
2011-09-15  5:59 ` [U-Boot] [PATCH 8/8] arm, davinci: add support for am1808 based enbw_cmc board Heiko Schocher
2011-09-15  7:39   ` Igor Grinberg
2011-09-15  7:56     ` Heiko Schocher
2011-09-19  5:50   ` [U-Boot] [PATCH v2 " Heiko Schocher
2011-09-23 20:47     ` Paulraj, Sandeep
2011-09-26  5:43       ` Heiko Schocher
2011-09-26  6:03         ` Paulraj, Sandeep
2011-09-26  6:08           ` Heiko Schocher
2011-09-27  7:05           ` Albert ARIBAUD
2011-09-30  7:55     ` Christian Riesch
2011-09-30  8:46       ` Heiko Schocher
2011-09-30  9:02         ` Christian Riesch
2011-09-30  9:32           ` Heiko Schocher

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=1316066380-7397-5-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --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.