public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ladislav Michl <ladis@linux-mips.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2 3/3] igep00x0: add Hynix timings
Date: Fri, 4 Nov 2016 12:59:46 +0100	[thread overview]
Message-ID: <20161104115946.GC7713@localhost.localdomain> (raw)
In-Reply-To: <20161104114711.GA7540@localhost.localdomain>

Tested on IGEPv2 with Micron MT29F4G16ABBDA3W and
Hynix H27S4G6F2DKA-BM

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---
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 {
-- 
2.1.4

  parent reply	other threads:[~2016-11-04 11:59 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-20  9:04 [U-Boot] [PATCH 1/3] igep00x0: disable CONFIG_DISPLAY_BOARDINFO Ladislav Michl
2016-09-20  9:07 ` [U-Boot] [PATCH 2/3] igep00x0: consolidate defconfigs Ladislav Michl
2016-09-20 12:52   ` Tom Rini
2016-09-20 22:44     ` Ladislav Michl
2016-09-20 23:45       ` Tom Rini
2016-09-20 23:52         ` Ladislav Michl
2016-09-21  0:26           ` Tom Rini
2016-09-21  9:39             ` Ladislav Michl
2016-09-21 11:46               ` Enric Balletbo Serra
2016-09-21 12:51                 ` Tom Rini
2016-09-21 13:46                   ` Enric Balletbo Serra
2016-09-21 14:02                     ` Tom Rini
2016-09-22  5:12                       ` Ladislav Michl
2016-09-20  9:09 ` [U-Boot] [PATCH 3/3] igep00x0: add Hynix timings Ladislav Michl
2016-09-20 15:41 ` [U-Boot] [PATCH 1/3] igep00x0: disable CONFIG_DISPLAY_BOARDINFO Enric Balletbo Serra
2016-09-20 23:10   ` Ladislav Michl
2016-11-04 11:47   ` Ladislav Michl
2016-11-04 11:55     ` [U-Boot] [PATCHv2 " Ladislav Michl
     [not found]       ` <ef3936d3-3967-bc71-4fdc-7a78b12a3c45@osg.samsung.com>
2016-11-04 17:21         ` Ladislav Michl
2016-11-04 19:34           ` Javier Martinez Canillas
2016-11-04 19:36       ` Javier Martinez Canillas
2016-11-13 20:58       ` [U-Boot] [U-Boot, PATCHv2, " Tom Rini
2016-11-04 11:57     ` [U-Boot] [PATCHv2 2/3] igep00x0: consolidate defconfigs Ladislav Michl
2016-11-04 19:37       ` Javier Martinez Canillas
2016-11-13 20:58       ` [U-Boot] [U-Boot,PATCHv2,2/3] " Tom Rini
2016-11-04 11:59     ` Ladislav Michl [this message]
2016-11-04 19:39       ` [U-Boot] [PATCHv2 3/3] igep00x0: add Hynix timings Javier Martinez Canillas
2016-11-13 20:58       ` [U-Boot] [U-Boot,PATCHv2,3/3] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161104115946.GC7713@localhost.localdomain \
    --to=ladis@linux-mips.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox