summaryrefslogtreecommitdiffstats
path: root/common/env_nand.c
Commit message (Collapse)AuthorAgeFilesLines
* env_nand.c: print error message and fail gracefullyWolfgang Denk2010-01-271-0/+7
| | | | | | | | | env_nand.c would crash silently if a malloc() for the environment buffers failed; make it print an error message and fail gracefully, i. e. use the default environment then. Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: John Rigby <jcrigby@gmail.com>
* env: kill off default_environment_sizeMike Frysinger2009-08-091-1/+0
| | | | | | | | | 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>
* Remove legacy NAND and disk on chip code.Scott Wood2009-07-161-4/+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>
* nand_spl: read environment early, when booting from NAND using nand_splGuennadi Liakhovetski2009-07-071-13/+30
| | | | | | | | | | | | 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>
* env_nand: remove unused variable.Guennadi Liakhovetski2009-07-071-10/+0
| | | | | | | Remove an unused "total" variable in multiple functions. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
* rename CONFIG_CMD_ENV to CONFIG_CMD_SAVEENVMike Frysinger2009-02-181-2/+2
| | | | | | | | 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>
* env_nand: fix env memory releasederek@siconix.com2009-02-061-2/+4
| | | | | | | 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>
* rename CFG_ENV macros to CONFIG_ENVJean-Christophe PLAGNIOL-VILLARD2008-09-101-40/+40
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* env_nand: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-09-101-5/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* rename CFG_ENV_IS_IN_NAND in CONFIG_ENV_IS_IN_NANDJean-Christophe PLAGNIOL-VILLARD2008-09-101-2/+2
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* NAND: Do not write or read a whole block if it is larger than the environmentGuennadi Liakhovetski2008-08-121-9/+9
| | | | | | | | 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>
* Merge branch 'master' of git://www.denx.de/git/u-boot-nand-flashWolfgang Denk2008-07-101-4/+4
|\
| * NAND: Fix warning due to missing env_ptr casts to u_char * in env_nand.c.Marcel Ziswiler2008-07-091-4/+4
| | | | | | | | | | | | | | | | | | | | 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>
* | Remove code duplication for setting the default environmentHarald Welte2008-07-101-13/+1
|/ | | | | | | | | | | 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>
* Coding Style CleanupWolfgang Denk2008-06-281-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* NAND: Add missing declaration to non-redundant saveenv().Philip Balister2008-06-161-1/+2
| | | | Signed-off-by: Scott Wood <scottwood@freescale.com>
* env_nand.c: Added bad block management for environment variablesStuart Wood2008-06-061-20/+99
| | | | | | | | | | 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>
* Cleanup nand_info[] declaration.Stelian Pop2008-05-281-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-211-1/+1
| | | | | | | | | | | 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>
* Fix warning in env_nand.c if compiled for DaVinci Schmoogiedirk.behme@googlemail.com2008-04-301-3/+3
| | | | | | | | | | | | | | 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>
* common/env_nand.c: fix one more incompatible pointer type issueWolfgang Denk2008-04-291-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* NAND: fix some strict-aliasing compiler warningsWolfgang Denk2008-04-281-1/+1
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* fix comments with new drivers organizationMarcel Ziswiler2008-01-091-1/+1
| | | | Signed-off-by: Marcel Ziswiler <marcel@ziswiler.com>
* common/: Remove lingering references to CFG_CMD_* symbols.Jon Loeliger2007-07-101-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>
* common/* non-cmd*: Remove obsolete references to CONFIG_COMMANDSJon Loeliger2007-07-081-1/+1
| | | | Signed-off-by: Jon Loeliger <jdl@freescale.com>
* common/ non-cmd: Augment CONFIG_COMMANDS tests with defined(CONFIG_CMD_*).Jon Loeliger2007-07-041-1/+1
| | | | | | | | | | | | | | 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>
* Add NAND environment support for PPC440EPx Sequoia NAND boot configStefan Roese2006-09-121-1/+49
| | | | Patch by Stefan Roese, 12 Sep 2006
* GCC-4.x fixes: clean up global data pointer initialization for all boards.Wolfgang Denk2006-03-311-10/+1
|
* Merge with http://www.denx.de/git/u-boot.gitMarkus Klotzbuecher2006-03-241-9/+11
|\
| * Some code cleanup for GCC 4.xWolfgang Denk2006-03-111-6/+6
| |
* | Support for redundant environment in NAND Flash.Markus Klotzbuecher2006-03-201-13/+102
|/
* Some minor fixes to environment in NAND code.Markus Klotzbuecher2006-03-081-1/+1
|
* Re-factoring the legacy NAND code (legacy NAND now only in board-specificBartlomiej Sieka2006-03-051-21/+26
| | | | | | | 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.
* Remove unneeded #include <malloc.h>Wolfgang Denk2005-09-251-1/+0
| | | | Patch by Ladislav Michl, 22 Feb 2005
* Patch by Josef Wagner, 04 Jun 2004:wdenk2004-06-191-1/+1
| | | | | | | | | | - 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
* Patch by Jian Zhang, 20 May 2004:wdenk2004-06-091-0/+171
add support for environment in NAND flash
OpenPOWER on IntegriCloud