projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ARM: uniphier: include <asm/system.h> instead of <asm/cache.h> from psci.c
[oweals/u-boot.git]
/
env
/
sata.c
diff --git
a/env/sata.c
b/env/sata.c
index a77029774e1f5f46baa09ce09abc18d13f1bde77..8bfcc94306d3a2a8b12ba9f18379d901e0ce7628 100644
(file)
--- a/
env/sata.c
+++ b/
env/sata.c
@@
-1,7
+1,6
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2010-2016 Freescale Semiconductor, Inc.
/*
* (C) Copyright 2010-2016 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/* #define DEBUG */
*/
/* #define DEBUG */
@@
-9,14
+8,15
@@
#include <common.h>
#include <command.h>
#include <common.h>
#include <command.h>
-#include <environment.h>
+#include <env.h>
+#include <env_internal.h>
#include <linux/stddef.h>
#include <errno.h>
#include <memalign.h>
#include <sata.h>
#include <search.h>
#include <linux/stddef.h>
#include <errno.h>
#include <memalign.h>
#include <sata.h>
#include <search.h>
-#if defined(CONFIG_ENV_
SIZE_REDUND) || defined(CONFIG_ENV_
OFFSET_REDUND)
+#if defined(CONFIG_ENV_OFFSET_REDUND)
#error ENV REDUND not supported
#endif
#error ENV REDUND not supported
#endif
@@
-24,8
+24,6
@@
#error CONFIG_ENV_OFFSET or CONFIG_ENV_SIZE not defined
#endif
#error CONFIG_ENV_OFFSET or CONFIG_ENV_SIZE not defined
#endif
-DECLARE_GLOBAL_DATA_PTR;
-
__weak int sata_get_env_dev(void)
{
return CONFIG_SYS_SATA_ENV_DEV;
__weak int sata_get_env_dev(void)
{
return CONFIG_SYS_SATA_ENV_DEV;
@@
-68,7
+66,7
@@
static int env_sata_save(void)
return 1;
printf("Writing to SATA(%d)...", env_sata);
return 1;
printf("Writing to SATA(%d)...", env_sata);
- if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET,
&
env_new)) {
+ if (write_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET,
(u_char *)
env_new)) {
puts("failed\n");
return 1;
}
puts("failed\n");
return 1;
}
@@
-109,13
+107,11
@@
static void env_sata_load(void)
}
if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) {
}
if (read_env(sata, CONFIG_ENV_SIZE, CONFIG_ENV_OFFSET, buf)) {
-
set_default_env(NULL
);
+
env_set_default(NULL, 0
);
return -EIO;
}
return -EIO;
}
- env_import(buf, 1);
-
- return 0;
+ return env_import(buf, 1);
}
U_BOOT_ENV_LOCATION(sata) = {
}
U_BOOT_ENV_LOCATION(sata) = {