Module Name: src
Committed By: riz
Date: Wed Oct 31 18:58:09 UTC 2012
Modified Files:
src/sys/dev/nand: files.nand nand.c nand.h
Log Message:
Hook nand_samsung.c into the build, and use it if a legacy chip
from Samsung is found.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/nand/files.nand
cvs rdiff -u -r1.17 -r1.18 src/sys/dev/nand/nand.c
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/nand/nand.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/nand/files.nand
diff -u src/sys/dev/nand/files.nand:1.4 src/sys/dev/nand/files.nand:1.5
--- src/sys/dev/nand/files.nand:1.4 Tue Jun 28 18:14:11 2011
+++ src/sys/dev/nand/files.nand Wed Oct 31 18:58:08 2012
@@ -1,4 +1,4 @@
-# $NetBSD: files.nand,v 1.4 2011/06/28 18:14:11 ahoka Exp $
+# $NetBSD: files.nand,v 1.5 2012/10/31 18:58:08 riz Exp $
define nandbus { }
@@ -9,6 +9,7 @@ file dev/nand/hamming.c nand
file dev/nand/nand_bbt.c nand
file dev/nand/nand_crc.c nand
file dev/nand/nand_micron.c nand
+file dev/nand/nand_samsung.c nand
defpseudodev nandemulator: nandbus
file dev/nand/nandemulator.c nandemulator
Index: src/sys/dev/nand/nand.c
diff -u src/sys/dev/nand/nand.c:1.17 src/sys/dev/nand/nand.c:1.18
--- src/sys/dev/nand/nand.c:1.17 Thu Jul 12 03:05:01 2012
+++ src/sys/dev/nand/nand.c Wed Oct 31 18:58:08 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $ */
+/* $NetBSD: nand.c,v 1.18 2012/10/31 18:58:08 riz Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -34,7 +34,7 @@
/* Common driver for NAND chips implementing the ONFI 2.2 specification */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.17 2012/07/12 03:05:01 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nand.c,v 1.18 2012/10/31 18:58:08 riz Exp $");
#include "locators.h"
@@ -332,6 +332,8 @@ nand_fill_chip_structure_legacy(device_t
switch (chip->nc_manf_id) {
case NAND_MFR_MICRON:
return nand_read_parameters_micron(self, chip);
+ case NAND_MFR_SAMSUNG:
+ return nand_read_parameters_samsung(self, chip);
default:
return 1;
}
Index: src/sys/dev/nand/nand.h
diff -u src/sys/dev/nand/nand.h:1.13 src/sys/dev/nand/nand.h:1.14
--- src/sys/dev/nand/nand.h:1.13 Fri Jul 15 19:19:57 2011
+++ src/sys/dev/nand/nand.h Wed Oct 31 18:58:08 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: nand.h,v 1.13 2011/07/15 19:19:57 cliff Exp $ */
+/* $NetBSD: nand.h,v 1.14 2012/10/31 18:58:08 riz Exp $ */
/*-
* Copyright (c) 2010 Department of Software Engineering,
@@ -428,6 +428,7 @@ extern const struct nand_manufacturer na
* Manufacturer specific parameter functions
*/
int nand_read_parameters_micron(device_t, struct nand_chip *);
+int nand_read_parameters_samsung(device_t, struct nand_chip *);
/* debug inlines */