summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/nand/Makefile2
-rw-r--r--package/nand/src/nand.c45
2 files changed, 1 insertions, 46 deletions
diff --git a/package/nand/Makefile b/package/nand/Makefile
index 07be2c23e..668cb4e5c 100644
--- a/package/nand/Makefile
+++ b/package/nand/Makefile
@@ -5,7 +5,7 @@ include ${ADK_TOPDIR}/rules.mk
PKG_NAME:= nand
PKG_VERSION:= 1.0
-PKG_RELEASE:= 3
+PKG_RELEASE:= 4
PKG_DESCR:= nand flash utility
PKG_SECTION:= sys/fs
diff --git a/package/nand/src/nand.c b/package/nand/src/nand.c
index 29b06e162..85df62677 100644
--- a/package/nand/src/nand.c
+++ b/package/nand/src/nand.c
@@ -94,7 +94,6 @@ int nand_info(const char *nand) {
int fd, ret;
mtd_info_t nandinfo;
- //struct nand_oobinfo oobinfo;
loff_t offset;
if ((fd = nand_open(nand, O_RDONLY)) < 0) {
@@ -131,17 +130,6 @@ int nand_info(const char *nand) {
}
}
}
-
- /*
- if (ioctl(fd, MEMGETOOBSEL, &oobinfo) != 0) {
- fprintf(stderr, "Unable to get NAND oobinfo\n");
- return 1;
- }
-
- if (oobinfo.useecc == MTD_NANDECC_AUTOPLACE) {
- fprintf(stdout, "NAND device/driver supports autoplacement of OOB\n");
- }
- */
return 0;
}
@@ -214,7 +202,6 @@ int nand_write(const char *img, const char *nand, int quiet) {
static bool pad = true;
static const char *standard_input = "-";
- static bool autoplace = true;
static bool markbad = true;
static int mtdoffset = 0;
int cnt = 0;
@@ -227,8 +214,6 @@ int nand_write(const char *img, const char *nand, int quiet) {
struct mtd_oob_buf oob;
loff_t offs;
int ret, readlen;
- int oobinfochanged = 0;
- struct nand_oobinfo old_oobinfo;
erase_buffer(oobbuf, sizeof(oobbuf));
@@ -255,28 +240,6 @@ int nand_write(const char *img, const char *nand, int quiet) {
exit (EXIT_FAILURE);
}
- if (autoplace) {
- /* Read the current oob info */
- if (ioctl (fd, MEMGETOOBSEL, &old_oobinfo) != 0) {
- perror ("MEMGETOOBSEL");
- close (fd);
- exit (EXIT_FAILURE);
- }
-
- // autoplace ECC ?
- /*
- if (autoplace && (old_oobinfo.useecc != MTD_NANDECC_AUTOPLACE)) {
-
- if (ioctl (fd, MEMSETOOBSEL, &autoplace_oobinfo) != 0) {
- perror ("MEMSETOOBSEL");
- close (fd);
- exit (EXIT_FAILURE);
- }
- oobinfochanged = 1;
- }
- */
- }
-
oob.length = meminfo.oobsize;
oob.ptr = oobbuf;
@@ -465,14 +428,6 @@ closeall:
close(ifd);
restoreoob:
- /*
- if (oobinfochanged == 1) {
- if (ioctl (fd, MEMSETOOBSEL, &old_oobinfo) != 0) {
- perror ("MEMSETOOBSEL");
- close (fd);
- exit (EXIT_FAILURE);
- }
- }
close(fd);
/*