struct hsearch_data env_htab;
+static uchar __env_get_char_spec(int index)
+{
+ return *((uchar *)(gd->env_addr + index));
+}
+uchar env_get_char_spec(int)
+ __attribute__((weak, alias("__env_get_char_spec")));
+
static uchar env_get_char_init(int index)
{
/* if crc was bad, use the default environment */
#endif /* CONFIG_ENV_ADDR_REDUND */
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
#ifdef CONFIG_ENV_ADDR_REDUND
int env_init(void)
{
DECLARE_GLOBAL_DATA_PTR;
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
void env_relocate_spec(void)
{
char buf[CONFIG_ENV_SIZE];
int mmc_get_env_addr(struct mmc *mmc, u32 *env_addr)
__attribute__((weak, alias("__mmc_get_env_addr")));
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
int env_init(void)
{
/* use default */
DECLARE_GLOBAL_DATA_PTR;
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
/*
* This is called before nand_init() so we can't read NAND to
* validate env data.
{
}
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
/*
* Initialize Environment use
*
char *env_name_spec = "NVRAM";
+#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
uchar env_get_char_spec(int index)
{
-#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
uchar c;
nvram_read(&c, CONFIG_ENV_ADDR + index, 1);
return c;
-#else
- return *((uchar *)(gd->env_addr + index));
-#endif
}
+#endif
void env_relocate_spec(void)
{
DECLARE_GLOBAL_DATA_PTR;
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
void env_relocate_spec(void)
{
struct mtd_info *mtd = &onenand_mtd;
static struct spi_flash *env_flash;
-uchar env_get_char_spec(int index)
-{
- return *((uchar *)(gd->env_addr + index));
-}
-
#if defined(CONFIG_ENV_OFFSET_REDUND)
int saveenv(void)
{