From patchwork Tue Sep 20 09:09:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 672163 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3sdcQH6H4nz9s4x for ; Tue, 20 Sep 2016 19:09:27 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 768774B98A; Tue, 20 Sep 2016 11:09:26 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0-pQft3XKT4W; Tue, 20 Sep 2016 11:09:26 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id F36AB4B951; Tue, 20 Sep 2016 11:09:25 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 42B274B951 for ; Tue, 20 Sep 2016 11:09:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N8cShnSVaPj1 for ; Tue, 20 Sep 2016 11:09:24 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from cvs.linux-mips.org (eddie.linux-mips.org [148.251.95.138]) by theia.denx.de (Postfix) with ESMTP id 13A1F4B6B3 for ; Tue, 20 Sep 2016 11:09:21 +0200 (CEST) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23991984AbcITJJUzjr20 (ORCPT ); Tue, 20 Sep 2016 11:09:20 +0200 Date: Tue, 20 Sep 2016 11:09:12 +0200 From: Ladislav Michl To: U-Boot Mailing List Message-ID: <20160920090912.GB29704@localhost.localdomain> References: <20160920090458.GA29641@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160920090458.GA29641@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Javier Martinez Canillas Subject: [U-Boot] [PATCH 3/3] igep00x0: add Hynix timings X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Tested on IGEPv2 with Micron MT29F4G16ABBDA3W and Hynix H27S4G6F2DKA-BM Signed-off-by: Ladislav Michl --- board/isee/igep00x0/igep00x0.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index 71688cc..669f3dd 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -84,10 +84,22 @@ void get_board_mem_timings(struct board_sdrc_timings *timings) int mfr, id, err = identify_nand_chip(&mfr, &id); timings->mr = MICRON_V_MR_165; - if (!err && mfr == NAND_MFR_MICRON) { - timings->mcfg = MICRON_V_MCFG_200(256 << 20); - timings->ctrla = MICRON_V_ACTIMA_200; - timings->ctrlb = MICRON_V_ACTIMB_200; + if (!err) { + switch (mfr) { + case NAND_MFR_HYNIX: + timings->mcfg = HYNIX_V_MCFG_200(256 << 20); + timings->ctrla = HYNIX_V_ACTIMA_200; + timings->ctrlb = HYNIX_V_ACTIMB_200; + break; + case NAND_MFR_MICRON: + timings->mcfg = MICRON_V_MCFG_200(256 << 20); + timings->ctrla = MICRON_V_ACTIMA_200; + timings->ctrlb = MICRON_V_ACTIMB_200; + break; + default: + /* Should not happen... */ + break; + } timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_200MHz; gpmc_cs0_flash = MTD_DEV_TYPE_NAND; } else {