[U-Boot] [PATCH] mpc83xx: spd_sdram.c: Disable memory controller before initializing

Kim Phillips kim.phillips at freescale.com
Sat Dec 5 03:43:34 CET 2009


On Fri, 4 Dec 2009 09:51:45 +0100
Stefan Roese <sr at denx.de> wrote:

> The memory controller could already be enabled, when spd_sdram() is
> called. This could be the case for example, when the SDRAM is initialized
> by the JTAG debugger.
> 
> Signed-off-by: Stefan Roese <sr at denx.de>
> Cc: Reinhard Arlt <reinhard.arlt at esd.eu>
> Cc: Kim Phillips <kim.phillips at freescale.com>

thanks for this, Stefan.

> +	/*
> +	 * First disable the memory controller (could be enabled
> +	 * by the debugger)
> +	 */
> +	ddr->sdram_cfg &= ~SDRAM_CFG_MEM_EN;
> +	asm("sync;isync");

I realize that this file already doesn't use accessor functions to any
large extent, but that doesn't mean that we should continue this bad
habit.

Kim


More information about the U-Boot mailing list