From mboxrd@z Thu Jan 1 00:00:00 1970 From: Franklin S Cooper Jr Date: Thu, 2 Mar 2017 13:04:29 -0600 Subject: [U-Boot] [PATCH 25/31] board: ks2: Use board detection to wrap code not specific to K2G ICE evm In-Reply-To: <20170302190435.23212-1-fcooper@ti.com> References: <20170302190435.23212-1-fcooper@ti.com> Message-ID: <20170302190435.23212-26-fcooper@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Some code doesn't apply to K2G ICE evm. Therefore, use board detection to wrap these calls. Signed-off-by: Franklin S Cooper Jr --- board/ti/ks2_evm/board.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/board/ti/ks2_evm/board.c b/board/ti/ks2_evm/board.c index 4792311..c61baee 100644 --- a/board/ti/ks2_evm/board.c +++ b/board/ti/ks2_evm/board.c @@ -45,13 +45,17 @@ int dram_init(void) gd->ram_size = get_ram_size((long *)CONFIG_SYS_SDRAM_BASE, CONFIG_MAX_RAM_BANK_SIZE); #if defined(CONFIG_TI_AEMIF) - aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs); + if (!board_is_k2g_ice()) + aemif_init(ARRAY_SIZE(aemif_configs), aemif_configs); #endif - if (ddr3_size) - ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size); - else - ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, gd->ram_size >> 30); + if (!board_is_k2g_ice()) { + if (ddr3_size) + ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, ddr3_size); + else + ddr3_init_ecc(KS2_DDR3A_EMIF_CTRL_BASE, + gd->ram_size >> 30); + } return 0; } -- 2.10.0