From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SumDR-0000fP-BV for barebox@lists.infradead.org; Fri, 27 Jul 2012 15:12:34 +0000 Date: Fri, 27 Jul 2012 17:12:29 +0200 From: Sascha Hauer Message-ID: <20120727151229.GE30009@pengutronix.de> References: <1343396404-10288-1-git-send-email-j.weitzel@phytec.de> <1343396404-10288-3-git-send-email-j.weitzel@phytec.de> <20120727141346.GV22657@game.jcrosoft.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120727141346.GV22657@game.jcrosoft.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: barebox-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 2/3] OMAP4460: ram init changes To: Jean-Christophe PLAGNIOL-VILLARD Cc: barebox@lists.infradead.org On Fri, Jul 27, 2012 at 04:13:46PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote: > On 15:40 Fri 27 Jul , Jan Weitzel wrote: > > configure Memory Adapter for 4460 > > > > Signed-off-by: Jan Weitzel > > --- > > arch/arm/mach-omap/include/mach/omap4-silicon.h | 4 ++++ > > arch/arm/mach-omap/omap4_generic.c | 21 +++++++++++++++++++-- > > 2 files changed, 23 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm/mach-omap/include/mach/omap4-silicon.h b/arch/arm/mach-omap/include/mach/omap4-silicon.h > > index d5517c5..4082bac 100644 > > --- a/arch/arm/mach-omap/include/mach/omap4-silicon.h > > +++ b/arch/arm/mach-omap/include/mach/omap4-silicon.h > > @@ -101,6 +101,10 @@ > > #define DMM_LISA_MAP_SYS_SIZE_MASK (7 << 20) > > #define DMM_LISA_MAP_SYS_SIZE_SHIFT 20 > > #define DMM_LISA_MAP_SYS_ADDR_MASK (0xFF << 24) > > + > > +/* Memory Adapter (4460 onwards) */ > > +#define OMAP44XX_MA_BASE 0x482AF000 > > + > > /* > > * Hardware Register Details > > */ > > diff --git a/arch/arm/mach-omap/omap4_generic.c b/arch/arm/mach-omap/omap4_generic.c > > index 07aa2b4..a368759 100644 > > --- a/arch/arm/mach-omap/omap4_generic.c > > +++ b/arch/arm/mach-omap/omap4_generic.c > > @@ -29,6 +29,10 @@ > > #define OMAP4460_CONTROL_ID_CODE_ES1_0 0x0B94E02F > > #define OMAP4460_CONTROL_ID_CODE_ES1_1 0x2B94E02F > > > > +/* EMIF_L3_CONFIG register value */ > > +#define EMIF_L3_CONFIG_VAL_SYS_10_LL_0 0x0A0000FF > > +#define EMIF_L3_CONFIG_VAL_SYS_10_MPU_3_LL_0 0x0A300000 > > + > > void __noreturn reset_cpu(unsigned long addr) > > { > > writel(PRM_RSTCTRL_RESET, PRM_RSTCTRL); > > @@ -270,8 +274,7 @@ static void reset_phy(unsigned int base) > > void omap4_ddr_init(const struct ddr_regs *ddr_regs, > > const struct dpll_param *core) > > { > > - unsigned int rev; > > - rev = omap4_revision(); > > + unsigned int rev = omap4_revision(); > > > > if (rev == OMAP4430_ES2_0) { > > writel(0x9e9e9e9e, 0x4A100638); > > @@ -294,6 +297,13 @@ void omap4_ddr_init(const struct ddr_regs *ddr_regs, > > *(volatile int*)(OMAP44XX_DMM_BASE + DMM_LISA_MAP_2) = 0x00000000; > > *(volatile int*)(OMAP44XX_DMM_BASE + DMM_LISA_MAP_3) = 0xFF020100; > > > > + if (rev >= OMAP4460_ES1_0) { > > + writel(0x80640300, OMAP44XX_MA_BASE + DMM_LISA_MAP_0); > > + > > + *(volatile int*)(OMAP44XX_MA_BASE + DMM_LISA_MAP_2) = 0x00000000; > > + *(volatile int*)(OMAP44XX_MA_BASE + DMM_LISA_MAP_3) = 0xFF020100; > ?? There are bad examples in this file already, see the context of this patch. Should be fixed before we add more stuff. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox