if E0 flag is not set, sdram is defenetly not configured. Signed-off-by: Oleksij Rempel <linux@xxxxxxxxxxxxxxxx> --- arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h b/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h index 4deae06..d74d2c2 100644 --- a/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h +++ b/arch/mips/boards/netgear-wg102/include/board/board_pbl_start.h @@ -18,6 +18,7 @@ #include <asm/pbl_macros.h> #include <mach/pbl_macros.h> +#include <mach/ar2312_regs.h> #include <mach/debug_ll.h> @@ -40,10 +41,17 @@ /* check if SDRAM is already configured, * if yes, we are probably starting * as second stage loader and can skip configuration */ + la t0, KSEG1 | AR2312_MEM_CFG1 + lw t1, 0(t0) + and t0, t1, MEM_CFG1_E0 + beq zero, t0, 1f + nop + pbl_probe_mem t0, t1, KSEG1 beq t0, t1, sdram_configured nop +1: /* start SDRAM configuration */ pbl_ar2312_x16_sdram -- 1.8.1.2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox