From patchwork Fri Nov 4 11:59:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ladislav Michl X-Patchwork-Id: 691243 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 3t9L4n6tjjz9vG6 for ; Fri, 4 Nov 2016 23:00:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4943BA7602; Fri, 4 Nov 2016 13:00:24 +0100 (CET) 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 QMpnpBa7K8fu; Fri, 4 Nov 2016 13:00:24 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D6AEA75EE; Fri, 4 Nov 2016 13:00:23 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D33A3A75EE for ; Fri, 4 Nov 2016 13:00:20 +0100 (CET) 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 tszS398ZLtqs for ; Fri, 4 Nov 2016 13:00:20 +0100 (CET) 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 8F2CDA75E6 for ; Fri, 4 Nov 2016 13:00:16 +0100 (CET) Received: (from localhost user: 'ladis' uid#1021 fake: STDIN (ladis@eddie.linux-mips.org)) by eddie.linux-mips.org id S23992241AbcKDMAQXS5BL (ORCPT ); Fri, 4 Nov 2016 13:00:16 +0100 Date: Fri, 4 Nov 2016 12:59:46 +0100 From: Ladislav Michl To: Enric Balletbo Serra Message-ID: <20161104115946.GC7713@localhost.localdomain> References: <20160920090458.GA29641@localhost.localdomain> <20161104114711.GA7540@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161104114711.GA7540@localhost.localdomain> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: U-Boot Mailing List , Javier Martinez Canillas Subject: [U-Boot] [PATCHv2 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 Reviewed-by: Javier Martinez Canillas Tested-by: Javier Martinez Canillas --- Changes in v2: - None 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 {