summaryrefslogtreecommitdiff
path: root/common/env_mmc.c
AgeCommit message (Collapse)Author
2013-05-01env_mmc: add support for redundant environmentMichael Heimpold
This patch add support for storing the environment redundant on mmc devices. Substantially it re-uses the logic from the NAND implementation, that means using an incremental counter for marking newer data. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2013-04-05Revert "env: fix potential stack overflow in environment functions"Tom Rini
Wolfgang requested this be reverted and Rob agreed after further discussion. This was a symptom of a larger problem we need to deal with. This reverts commit 60d7d5a63189c9f77a190c9965861dc15482c2d0. Signed-off-by: Tom Rini <trini@ti.com>
2013-04-02env: fix potential stack overflow in environment functionsRob Herring
Most of the various environment functions create CONFIG_ENV_SIZE buffers on the stack. At least on ARM and PPC which have 4KB stacks, this can overflow the stack if we have large environment sizes. So move all the buffers off the stack to static buffers. Signed-off-by: Rob Herring <rob.herring@calxeda.com>
2013-02-04common: env_mmc: Use __weak annotation to simplify codeFabio Estevam
Using the __weak annotation can make the code cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Marek Vasut <marex@denx.de>
2012-12-13env: Hide '.' variables in env print by defaultJoe Hershberger
When printing all variables with env print, don't print variables that begin with '.'. If env print is called with a '-a' switch, then include variables that begin with '.' (just like the ls command). Variables printed explicitly will be printed even without the -a. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-09-05env_mmc: allow environment to be in an eMMC partitionStephen Warren
eMMC devices may have hardware-level partitions: 2 boot partitions, up to 4 general partitions, plus the user area. This change introduces optional config variable CONFIG_SYS_MMC_ENV_PART to indicate which partition the environment should be stored in: 0=user, 1=boot0, 2=boot1, 4..7=general0..3. This allows the environment to be kept out of the user area, which simplifies the management of OS-/user-level (MBR/GPT) partitions within the user area. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-07-07env_mmc: align buffers using ALLOC_CACHE_ALIGN_BUFFERStephen Warren
This allows MMC drivers to perform cache flusing on the bufffers without issue. Signed-off-by: Stephen Warren <swarren@nvidia.com> Cc: Andy Fleming <afleming@gmail.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2012-01-05env: factor out the env_get_char_spec() functionIgor Grinberg
env_get_char_spec() function is duplicated across multiple environment files. Remove the duplication by providing a default implementation. Add "weak" declaration, so the default implementation can be overridden. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-22env: clean env_mmc.c checkpatch and code styleIgor Grinberg
Cleanup the env_mmc.c checkpatch warnings, errors and coding style. Simplify env_relocate_spec() function implementation. Also mark internal functions as static. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-22env: move extern environment[] to environment.hIgor Grinberg
Extract all extern declarations for environment out of c files into the environment.h header. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
2011-11-22env: move extern default_environment[] to environment.hIgor Grinberg
Extract all extern declarations for default_environment[] out of c files into the environment.h header. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Cc: Stefan Roese <sr@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2011-11-08env: allow to export only selected variablesWolfgang Denk
New syntax: env export [-t | -b | -c] [-s size] addr [var ...] With this change it is possible to provide a list of variables names that shall be exported. Whenno arguments are given, the whole environment gets exported. NOTE: The new handling of the "size" argument means a change to the user API. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-04env_mmc: Allow board code to override the environment addressMingkai Hu
On some boards the environment may not be located at a fixed address in the MMC/SDHC card. This allows those boards to implement their own means to report what address the environment is located at. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Jerry Huang <Chang-Ming.Huang@freescale.com> Signed-off-by: Zhao Chenhui <b35336@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-12-17hashtable: drop all non-reentrant versionsMike Frysinger
The non-reentrant versions of the hashtable functions operate on a single shared hashtable. So if two different people try using these funcs for two different purposes, they'll cause problems for the other. Avoid this by converting all existing hashtable consumers over to the reentrant versions and then punting the non-reentrant ones. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2010-11-14env_mmc: fix compile warningLei Wen
hexport would complain implicit declaration, if we don't add the include file. env_mmc.c: In function 'saveenv': env_mmc.c:109: warning: implicit declaration of function 'hexport' Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-10-17Merge branch 'master' of git://git.denx.de/u-boot-armWolfgang Denk
2010-10-13env_mmc: fix cannot save env issueLei Wen
The env change its implementation after this log, while env mmc didn't change it immediately, which cause issue. Follow to the new style to fix it. commit ea882baf9c17cd142c99e3ff640d3ab01daa5cec Author: Wolfgang Denk <wd@denx.de> Date: Sun Jun 20 23:33:59 2010 +0200 New implementation for internal handling of environment variables. Signed-off-by: Lei Wen <leiwen@marvell.com>
2010-10-13env_mmc: Fix crashing bug encountered after enabling ARM relocationSteve Sakoman
The crash was occuring in env_relocate because it was being called prior to mmc_initialize. This patch moves the MMC initialization earlier in the init process. This patch also cleans up the env_relocate_spec code in env_mmc.c Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org> Acked-by: Stefano Babic <sbabic@denx.de>
2010-10-06env_mmc: Fix broken build due to set_default_env() changeSteve Sakoman
Previously the function was set_default_env(void), it is now set_default_env(const char *s). This patch adds the required parameter. This fixes a broken build on OMAP4430 SDP. Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-09-19Save environment data to mmc.Terry Lv
This patch is to save environment data to mmc card. It uses interfaces defined in generic mmc. Signed-off-by: Terry Lv <r65388@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>