diff options
author | Waldemar Brodkorb <wbrodkorb@conet.de> | 2015-03-04 09:21:57 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbrodkorb@conet.de> | 2015-03-04 09:21:57 +0100 |
commit | 4fc74012b67cfc62c5481b8d7b6d95052f40c2bf (patch) | |
tree | d6f7c860195c63564d98f53c143acbf0082ea3ca /package/nand/src/nand.c | |
parent | 68b4cb5aaa95eb39401bcbaa7c517cfd31c3edcf (diff) | |
parent | 9919c4bc2f53037331313edace085c386c2af4cc (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'package/nand/src/nand.c')
-rw-r--r-- | package/nand/src/nand.c | 45 |
1 files changed, 0 insertions, 45 deletions
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); /* |