summaryrefslogtreecommitdiff
path: root/common/env_nand.c
AgeCommit message (Collapse)Author
2009-08-09env: kill off default_environment_sizeMike Frysinger
The only environment type that uses this variable is spi flash, and that is only because it is reimplementing the common set_default_env() function. So fix the spi flash code and kill off the default_environment_size in the process. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-16Remove legacy NAND and disk on chip code.Scott Wood
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>
2009-07-07nand_spl: read environment early, when booting from NAND using nand_splGuennadi Liakhovetski
Currently, when booting from NAND using nand_spl, in the beginning the default environment is used until later in boot process the dynamic environment is read out. This way environment variables that must be interpreted early, like the baudrate or "silent", cannot be modified dynamically and remain at their default values. Fix this problem by reading out main and redundand (if used) copies of the environment in the nand_spl code. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-07-07env_nand: remove unused variable.Guennadi Liakhovetski
Remove an unused "total" variable in multiple functions. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
2009-02-18rename CONFIG_CMD_ENV to CONFIG_CMD_SAVEENVMike Frysinger
The CONFIG_CMD_ENV option controls enablement of the `saveenv` command rather than a generic "env" command, or anything else related to the environment. So, let's make sure the define is named accordingly. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-02-06env_nand: fix env memory releasederek@siconix.com
This fixes a bug that tmp environment memory not being released. Signed-off-by: Derek Ou <dou@siconix.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-09-10rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10env_nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-10rename CFG_ENV_IS_IN_NAND in CONFIG_ENV_IS_IN_NANDJean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-08-12NAND: Do not write or read a whole block if it is larger than the environmentGuennadi Liakhovetski
Environment can be smaller than NAND block size, do not need to read a whole block and minimum for writing is one page. Also remove an unused variable. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-07-10Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flashWolfgang Denk
2008-07-10Remove code duplication for setting the default environmentHarald Welte
common/env_common.c (default_env): new function that resets the environment to the default value common/env_common.c (env_relocate): use default_env instead of own copy common/env_nand.c (env_relocate_spec): use default_env instead of own copy include/environment.h: added default_env prototype Signed-off-by: Werner Almesberger <werner@openmoko.org> Signed-off-by: Harald Welte <laforge@openmoko.org>
2008-07-09NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c.Marcel Ziswiler
The writeenv() and readenv() calls introduced by the recently added bad block management for environment variables were missing casts therefore producing compile time warnings. While at it fixing some typo in a comment and indentation. Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-06-28Coding Style CleanupWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-06-16NAND: Add missing declaration to non-redundant saveenv().Philip Balister
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-06-06env_nand.c: Added bad block management for environment variablesStuart Wood
Modified to check for bad blocks and to skipping over them when CFG_ENV_RANGE has been defined. CFG_ENV_RANGE must be larger than CFG_ENV_SIZE and aligned to the NAND flash block size. Signed-off-by: Stuart Wood <stuart.wood@labxtechnologies.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-05-28Cleanup nand_info[] declaration.Stelian Pop
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>
2008-05-21Big white-space cleanup.Wolfgang Denk
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>
2008-04-30Fix warning in env_nand.c if compiled for DaVinci Schmoogiedirk.behme@googlemail.com
Fix warnings nv_nand.c: In function 'saveenv': env_nand.c:200: warning: passing argument 3 of 'nand_write' from incompatible pointer type env_nand.c: In function 'env_relocate_spec': env_nand.c:275: warning: passing argument 3 of 'nand_read' from incompatible pointer type if compiled for davinci_schmoogie_config. Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Ack by: Sergey Kubushyn <ksi@koi8.net>
2008-04-29common/env_nand.c: fix one more incompatible pointer type issueWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-04-28NAND: fix some strict-aliasing compiler warningsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-01-09fix comments with new drivers organizationMarcel Ziswiler
Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
2007-07-10common/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger
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>
2007-07-08common/* non-cmd*: Remove obsolete references to CONFIG_COMMANDSJon Loeliger
Signed-off-by: Jon Loeliger <jdl@freescale.com>
2007-07-04common/ non-cmd: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger
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>
2006-09-12Add NAND environment support for PPC440EPx Sequoia NAND boot configStefan Roese
Patch by Stefan Roese, 12 Sep 2006
2006-03-31GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk
2006-03-24Merge with http://www.denx.de/git/u-boot.gitMarkus Klotzbuecher
2006-03-20Support for redundant environment in NAND Flash.Markus Klotzbuecher
2006-03-11Some code cleanup for GCC 4.xWolfgang Denk
2006-03-08Some minor fixes to environment in NAND code.Markus Klotzbuecher
2006-03-05Re-factoring the legacy NAND code (legacy NAND now only in board-specificBartlomiej Sieka
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.
2005-09-25Remove unneeded #include <malloc.h>Wolfgang Denk
Patch by Ladislav Michl, 22 Feb 2005
2004-06-19Patch by Josef Wagner, 04 Jun 2004:wdenk
- DDR Ram support for PM520 (MPC5200) - support for different flash types (PM520) - USB / IDE / CF-Card / DiskOnChip support for PM520 - 8 bit boot rom support for PM520/CE520 - Add auto SDRAM module detection for MicroSys CPC45 board (MPC8245) - I2C and RTC support for CPC45 - support of new flash type (28F160C3T) for CPC45
2004-06-09Patch by Jian Zhang, 20 May 2004:wdenk
add support for environment in NAND flash