Patchwork [U-Boot,V2,2/3] mx31: add ESD control registers

login
register
mail settings
Submitter Helmut Raiger
Date Oct. 14, 2011, 8:05 a.m.
Message ID <1318579550-22843-2-git-send-email-helmut.raiger@hale.at>
Download mbox | patch
Permalink /patch/119722/
State Accepted
Commit a6d9de436c3930addf98a54f62d936426a9917a4
Headers show

Comments

Helmut Raiger - Oct. 14, 2011, 8:05 a.m.
This allows to initialize DDR memory in C code.
Currently all mx31 boards use assembler code (lowlevel_init.S)

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
---
 V2: new in V2

 arch/arm/include/asm/arch-mx31/imx-regs.h |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Stefano Babic - Oct. 14, 2011, 1:29 p.m.
On 10/14/2011 10:05 AM, Helmut Raiger wrote:
> This allows to initialize DDR memory in C code.
> Currently all mx31 boards use assembler code (lowlevel_init.S)
> 
> Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
> ---
>  V2: new in V2
> 
>  arch/arm/include/asm/arch-mx31/imx-regs.h |   13 +++++++++++++
>  1 files changed, 13 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/include/asm/arch-mx31/imx-regs.h b/arch/arm/include/asm/arch-mx31/imx-regs.h
> index 40abc34..f7a39f1 100644
> --- a/arch/arm/include/asm/arch-mx31/imx-regs.h
> +++ b/arch/arm/include/asm/arch-mx31/imx-regs.h
> @@ -484,6 +484,17 @@ struct mx31_weim {
>  	struct mx31_weim_cscr cscr[6];
>  };
>  
> +/* ESD control registers */
> +struct esdc_regs {
> +	u32 ctl0;
> +	u32 cfg0;
> +	u32 ctl1;
> +	u32 cfg1;
> +	u32 misc;
> +	u32 dly[5];
> +	u32 dlyl;
> +};
> +
>  #endif
>  
>  #define __REG(x)     (*((volatile u32 *)(x)))
> @@ -548,6 +559,8 @@ struct mx31_weim {
>  #define ESDCTL_BL(x)			((x) << 7)
>  #define ESDCTL_PRCT(x)			((x) << 0)
>  
> +#define ESDCTL_BASE_ADDR	0xB8001000
> +
>  /* 13 fields of the upper CS control register */
>  #define CSCR_U(sp, wp, bcd, bcs, psz, pme, sync, dol, \
>  		cnc, wsc, ew, wws, edc) \

Acked-by: Stefano Babic <sbabic@denx.de>

Best regards,
Stefano Babic

Patch

diff --git a/arch/arm/include/asm/arch-mx31/imx-regs.h b/arch/arm/include/asm/arch-mx31/imx-regs.h
index 40abc34..f7a39f1 100644
--- a/arch/arm/include/asm/arch-mx31/imx-regs.h
+++ b/arch/arm/include/asm/arch-mx31/imx-regs.h
@@ -484,6 +484,17 @@  struct mx31_weim {
 	struct mx31_weim_cscr cscr[6];
 };
 
+/* ESD control registers */
+struct esdc_regs {
+	u32 ctl0;
+	u32 cfg0;
+	u32 ctl1;
+	u32 cfg1;
+	u32 misc;
+	u32 dly[5];
+	u32 dlyl;
+};
+
 #endif
 
 #define __REG(x)     (*((volatile u32 *)(x)))
@@ -548,6 +559,8 @@  struct mx31_weim {
 #define ESDCTL_BL(x)			((x) << 7)
 #define ESDCTL_PRCT(x)			((x) << 0)
 
+#define ESDCTL_BASE_ADDR	0xB8001000
+
 /* 13 fields of the upper CS control register */
 #define CSCR_U(sp, wp, bcd, bcs, psz, pme, sync, dol, \
 		cnc, wsc, ew, wws, edc) \