summaryrefslogtreecommitdiff
path: root/fs/jffs2/jffs2_1pass.c
Commit message (Collapse)AuthorAgeLines
* jffs2:jffs2_1pass.c: remove double bracesJeroen Hofstee2014-06-11-1/+1
| | | | | | | | | Clang interpretes an if condition like  "if ((a = b) == NULL) as it tries to assign a value in a statement. Hence if you do "if ((something)) it warns you that you might be confused. Hence drop the double braces for plane if statements. Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
* JFFS2: Correct jffs2_1pass_build_lists to use lldivTom Rini2013-12-13-1/+3
| | | | | | Since part_info size became 64bit we need to use lldiv here. Signed-off-by: Tom Rini <trini@ti.com>
* linux/compat.h: rename from linux/mtd/compat.hMike Frysinger2012-04-30-1/+1
| | | | | | This lets us use it in more places than just mtd code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* fs/jffs2/jffs2_1pass.c: fix warning: variable ... set but not usedWolfgang Denk2011-10-09-10/+4
| | | | | | | | | | Fix: jffs2_1pass.c: In function 'jffs2_1pass_read_inode': jffs2_1pass.c:699:7: warning: variable 'ret' set but not used [-Wunused-but-set-variable] jffs2_1pass.c: In function 'jffs2_1pass_build_lists': jffs2_1pass.c:1578:14: warning: variable 'empty_start' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix misc spelling errors found by lintianLoïc Minier2011-04-12-1/+1
| | | | Signed-off-by: Loïc Minier <loic.minier@linaro.org>
* jffs2, suen3: Fix compiler warningHeiko Schocher2010-03-31-15/+22
| | | | | | | | | | | $ ./MAKEALL suen3 jffs2_1pass.c: In function 'get_fl_mem': jffs2_1pass.c:399: warning: unused variable 'id' jffs2_1pass.c: In function 'get_node_mem': jffs2_1pass.c:423: warning: unused variable 'id' Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Tom <Tom.Rix@windriver.com>
* JFFS2: drop support for LZARI compression modeWolfgang Denk2010-01-15-6/+2
| | | | | | | | | | | | | | | | | | Support for LZARI compression mode was added based on a MTD CVS snapshot of March 13, 2005. However, fs/jffs2/compr_lzari.c contains contradictory licensing terms: the original copyright clause says "All rights reserved. Permission granted for non-commercial use.", but later reference to the file 'LICENCE' in the jffs2 directory was added which says GPL v2 or later. As no boards ever used LZARI compression, and this file is also not present in recent MTD code, we resolve this conflict by removing the conflicting file and references to it. Also copy the referenced but missing file 'LICENCE' from the current MTD source tree. Signed-off-by: Wolfgang Denk <wd@denx.de>
* jffs2: some fixes to summary supportIlya Yanok2009-08-21-41/+81
| | | | | | | | | | | | This patch fixes some issues with JFFS2 summary support in U-Boot. 1/ Summary support made compilation configurable (as summary support considered expiremental even in Linux). 2/ Summary code can do unaligned 16-bit and 32-bit memory accesses. We need to get data byte by byte to exclude data aborts. 3/ Make summary scan in two passes so we can safely fall back to full scan if we found unsupported entry in the summary. Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* jffs2: clean the cache in case of malloc fails in build_listsIlya Yanok2009-08-18-3/+14
| | | | | | | | We should call jffs2_clean_cache() if we return from jffs2_build_lists() with an error to prevent usage of incomplete lists. Also we should free() a local buffer to prevent memory leaks. Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* Remove legacy NAND and disk on chip code.Scott Wood2009-07-16-20/+0
| | | | | | | | | | | | | Legacy NAND had been scheduled for removal. Any boards that use this were already not building in the previous release due to an #error. The disk on chip code in common/cmd_doc.c relies on legacy NAND, and it has also been removed. There is newer disk on chip code in drivers/mtd/nand; someone with access to hardware and sufficient time and motivation can try to get that working, but for now disk on chip is not supported. Signed-off-by: Scott Wood <scottwood@freescale.com>
* jffs2: include <linux/mtd/compat.h> instead of defining own min_tIlya Yanok2008-12-16-5/+1
| | | | | | | | | | | | Include <linux/mtd/compat.h> header for min_t definition instead of providing our own one. Removes warnings in case of OneNAND support enabled. Although I thinks it's a bit silly to include <linux/mtd/compat.h> just for min_t... Signed-off-by: Ilya Yanok <yanok@emcraft.com> Acked-by: Stefan Roese <sr@denx.de>
* jffs2: cache data_crc resultsIlya Yanok2008-12-09-1/+4
| | | | | | | | | | | | | As we moved data_crc() invocation from jffs2_1pass_build_lists() to jffs2_1pass_read_inode() data_crc is going to be calculated on each inode access. This patch adds caching of data_crc() results. There is no significant improvement in speed (because of flash access caching added in previous patch I think, crc in RAM is really fast) but this patch impacts memory usage -- every b_node structure uses 12 bytes instead of 8. Signed-off-by: Alexey Neyman <avn@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* jffs2: summary supportIlya Yanok2008-12-09-1/+186
| | | | | | | This patch adds support for reading fs information from summary node instead of scanning full eraseblock. Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* jffs2: add buffer to cache flash accessesIlya Yanok2008-12-09-44/+72
| | | | | | | | | | With this patch JFFS2 code allocates memory buffer of max_totlen size (size of the largest node, calculated during scan time) and uses it to store entire node. Speeds up loading. If malloc fails we use old ways to do things. Signed-off-by: Alexey Neyman <avn@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* jffs2: rewrite jffs2 scanning code based on Linux oneIlya Yanok2008-12-09-56/+171
| | | | | | | | | | | Rewrites jffs2_1pass_build_lists() function in style of Linux's jffs2_scan_medium() and jffs2_scan_eraseblock(). This includes: - Caching flash acceses - Smart dealing with free space Signed-off-by: Alexey Neyman <avn@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* jffs2: fix searching for latest version in jffs2_1pass_list_inodes()Ilya Yanok2008-12-09-3/+2
| | | | | | | | | We need to update i_version inside cycle to find really latest version inside jffs2_1pass_list_inodes(). With that fixed we can use isize inside dump_inode() instead of calling expensive jffs2_1pass_read_inode(). Signed-off-by: Alexey Neyman <avn@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com>
* JFFS2: Eliminate compiler error when both NAND and OneNAND are enabled.Scott Wood2008-10-31-7/+5
| | | | | Reported-by: Alessandro Rubini <rubini-list@gnudd.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-7/+7
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Add JFFS2 command support on OneNANDKyungmin Park2008-09-06-0/+118
| | | | Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* fs: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-31-5/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* drivers/mtd/nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-3/+3
| | | | | | rename CFG_NAND_LEGACY to CONFIG_NAND_LEGACY Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Fix printf() format issues with sizeof_t types by using %zuWolfgang Denk2008-07-14-4/+6
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix some more printf() format problems.Wolfgang Denk2008-07-13-2/+2
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* Fix some more printf() format issues.Jean-Christophe PLAGNIOL-VILLARD2008-07-13-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* jffs2_1pass.c: add watchdog supportStuart Wood2008-06-29-0/+3
| | | | Signed-off-by: Stuart Wood <stuart.wood@labxtechnologies.com>
* Cleanup nand_info[] declaration.Stelian Pop2008-05-28-3/+0
| | | | | | | | | The nand_info array is declared as extern in several .c files. Those days, nand.h contains a reference to the array, so there is no need to declare it elsewhere. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Scott Wood <scottwood@freescale.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-9/+9
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* jffs2_1pass.c: fix incompatible pointer type warningWolfgang Denk2008-04-28-4/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* fix comments with new drivers organizationMarcel Ziswiler2008-01-09-1/+1
| | | | Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
* fs/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger2007-07-10-1/+1
| | | | | | | | Fixed some broken instances of "#ifdef CMD_CFG_IDE" too. Those always evaluated TRUE, and thus were always compiled even when IDE really wasn't defined/wanted. Signed-off-by: Jon Loeliger <jdl@freescale.com>
* fs/: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-09-10/+10
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* Fixing some typos etc. introduced mainly by cfg patches.Wolfgang Denk2007-07-05-3/+6
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* fs/: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-04-8/+8
| | | | | | | | | | | | | | This is a compatibility step that allows both the older form and the new form to co-exist for a while until the older can be removed entirely. All transformations are of the form: Before: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) After: #if (CONFIG_COMMANDS & CFG_CMD_AUTOSCRIPT) || defined(CONFIG_CMD_AUTOSCRIPT) Signed-off-by: Jon Loeliger <jdl@freescale.com>
* Fix JFFS2 support for legacy NAND driver.Marian Balakowicz2006-04-08-6/+28
| | | | Some more NAND cleanup and small fixes.
* Add crc of data to jffs2 (in jffs2_1pass_build_lists()).Wolfgang Denk2006-03-12-1/+2
| | | | Patch by Rick Bronson, 15 Jun 2005
* Re-factoring the legacy NAND code (legacy NAND now only in board-specificBartlomiej Sieka2006-03-05-10/+14
| | | | | | | code and in SoC code). Boards using the old way have CFG_NAND_LEGACY and BOARDLIBS = drivers/nand_legacy/libnand_legacy.a added. Build breakage for NETTA.ERR and NETTA_ISDN - will go away when the new NAND support is implemented for these boards.
* Merge with /home/wd/git/u-boot/testing-NAND/ to add new NAND handling.Bartlomiej Sieka2006-02-24-4/+4
|\
| * Update of new NAND codeWolfgang Denk2005-09-14-4/+4
| | | | | | | | Patch by Ladislav Michl, 13 Sep 2005
* | Merge with /home/m8/git/u-bootWolfgang Denk2005-10-15-1/+1
|\ \
| * | Added support for TQM834x boards.Marian Balakowicz2005-10-11-1/+1
| |/
* | Cleanup for GCC-4.xWolfgang Denk2005-10-13-9/+9
|/
* Fix return values of the jffs2 commands ls/fsload/fsinfo,Wolfgang Denk2005-08-16-2/+2
| | | | | | so we can use them to, e.g., check the existence of a file with "if ls foo; then this; else that; fi" in the hush shell Patch by Andreas Engel, 16 August 2005
* Add configuration for IFM AEV FIFO board.Wolfgang Denk2005-08-10-3/+3
| | | | Minor coding style cleanup.
* Add common (with Linux) MTD partition scheme and "mtdparts" commandWolfgang Denk2005-08-08-38/+94
| | | | | | | | Old, obsolete and duplicated code was cleaned up and replace by the new partitioning method. There are two possible approaches now: * define a single, static partition * use mtdparts command line option and dynamic partitioning Default is static partitioning.
* It's better to handle LZO and LZARI compression mdoes for JFFS2 withwdenk2005-05-05-9/+5
| | | | a single #define.
* Major upate of JFFS2 code; now in sync with snapshot of MTD CVS ofwdenk2005-05-05-1/+17
| | | | | March 13, 2005); new configuration options CONFIG_JFFS2_LZO and CONFIG_JFFS2_LZARI are added. Both are undefined by default.
* Fix problem with symbolic links in JFFS2 code.wdenk2005-05-04-1/+5
|
* Patch by Klaus Heydeck, 12 May 2004:wdenk2004-05-12-1/+1
| | | | | | Using external watchdog for KUP4 boards in mpc8xx/cpu.c; load_sernum_ethaddr() for KUP4 boards in lib_ppc/board.c; various changes to KUP4 board specific files
* * Fix memory leak in the NAND-specific JFFS2 codewdenk2004-05-05-3/+6
| | | | * Fix SL811 USB controller when attached to a USB hub
* * Fix minor NAND JFFS2 related issuewdenk2004-05-03-1/+1
| | | | | | | | | * Fixes for SL811 USB controller: - implement workaround for broken memory stick - improve error handling * Increase packet send timeout to 10 ms in cpu/mpc8xx/scc.c to better cope with congested networks.