From 6e8d4788b96147a75ebdb9fb8e4de9e799d35252 Mon Sep 17 00:00:00 2001 From: Steve Sakoman Date: Thu, 4 Mar 2010 20:34:31 -0800 Subject: [PATCH] drivers/k9f1g08r0a.c: additional nand vendor/device id's --- drivers/k9f1g08r0a.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/k9f1g08r0a.c b/drivers/k9f1g08r0a.c index 2d635fe..8968a1b 100644 --- a/drivers/k9f1g08r0a.c +++ b/drivers/k9f1g08r0a.c @@ -41,8 +41,10 @@ * of part/manufacturer */ #define MT29F1G_MFR 0x2c /* Micron */ +#define MT29F1G_MFR2 0x20 /* numonyx */ #define MT29F1G_ID 0xa1 /* x8, 1GiB */ -#define MT29F2G_ID 0xba /* x16, 2GiB */ +#define MT29F2G_ID 0xba /* x16, 2GiB */ +#define MT29F4G_ID 0xbc /* x16, 4GiB */ #define ADDR_COLUMN 1 #define ADDR_PAGE 2 @@ -181,10 +183,14 @@ int nand_chip() NAND_DISABLE_CE(); - if (get_cpu_rev() == CPU_3430_ES2) - return (mfr != MT29F1G_MFR || !(id == MT29F1G_ID || id == MT29F2G_ID)); - else - return (mfr != K9F1G08R0A_MFR || id != K9F1G08R0A_ID); + if (((mfr == MT29F1G_MFR || mfr == MT29F1G_MFR2) && + (id == MT29F1G_ID || id == MT29F2G_ID || id == MT29F4G_ID)) || + (mfr == K9F1G08R0A_MFR && (id == K9F1G08R0A_ID))) { + return 0; + } else { + printf("Unknown chip: mfr was 0x%02x, id was 0x%02x\n", mfr, id); + return 1; + } } /* read a block data to buf -- 2.39.5