summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-07-18 11:31:37 -0400
committerTom Rini <trini@konsulko.com>2019-07-18 11:31:37 -0400
commit0de815356474912ef5bef9a69f0327a5a93bb2c2 (patch)
tree92db8fda09396081f58a0c5fb182e72fbc3fdd50 /include
parent9a06eb800c1bdc68aa81fcad6d4f404e12dfff33 (diff)
parentbf88d2b023063a0c46d7617a4f6897d5d561662d (diff)
Merge branch '2019-07-17-master-imports'
- Various FS/disk related fixes with security implications. - Proper fix for the pci_ep test. - Assorted bugfixes - Some MediaTek updates. - 'env erase' support.
Diffstat (limited to 'include')
-rw-r--r--include/configs/qemu-arm.h5
-rw-r--r--include/environment.h17
-rw-r--r--include/ext_common.h1
-rw-r--r--include/power-domain.h2
4 files changed, 24 insertions, 1 deletions
diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index 65fdb1e929..35e3c5ad7a 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -46,8 +46,13 @@
#define CONFIG_SYS_CBSIZE 512
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_TEXT_BASE
+#ifdef CONFIG_TFABOOT
+#define CONFIG_SYS_FLASH_BASE 0x4000000
+#define CONFIG_SYS_MAX_FLASH_BANKS 1
+#else
#define CONFIG_SYS_FLASH_BASE 0x0
#define CONFIG_SYS_MAX_FLASH_BANKS 2
+#endif
#define CONFIG_SYS_MAX_FLASH_SECT 256 /* Sector: 256K, Bank: 64M */
#endif /* __CONFIG_H */
diff --git a/include/environment.h b/include/environment.h
index cd96676141..de67cf4f0e 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -200,6 +200,7 @@ enum env_operation {
ENVOP_INIT, /* we want to call the init function */
ENVOP_LOAD, /* we want to call the load function */
ENVOP_SAVE, /* we want to call the save function */
+ ENVOP_ERASE, /* we want to call the erase function */
};
struct env_driver {
@@ -226,6 +227,15 @@ struct env_driver {
int (*save)(void);
/**
+ * erase() - Erase the environment on storage
+ *
+ * This method is optional and required for 'eraseenv' to work.
+ *
+ * @return 0 if OK, -ve on error
+ */
+ int (*erase)(void);
+
+ /**
* init() - Set up the initial pre-relocation environment
*
* This method is optional.
@@ -304,6 +314,13 @@ int env_load(void);
int env_save(void);
/**
+ * env_erase() - Erase the environment on storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_erase(void);
+
+/**
* env_fix_drivers() - Updates envdriver as per relocation
*/
void env_fix_drivers(void);
diff --git a/include/ext_common.h b/include/ext_common.h
index 17c92f1750..1c10c50474 100644
--- a/include/ext_common.h
+++ b/include/ext_common.h
@@ -21,6 +21,7 @@
#define __EXT_COMMON__
#include <command.h>
#define SECTOR_SIZE 0x200
+#define LOG2_SECTOR_SIZE 9
/* Magic value used to identify an ext2 filesystem. */
#define EXT2_MAGIC 0xEF53
diff --git a/include/power-domain.h b/include/power-domain.h
index 00996057b0..07370709fe 100644
--- a/include/power-domain.h
+++ b/include/power-domain.h
@@ -151,7 +151,7 @@ static inline int power_domain_on(struct power_domain *power_domain)
#endif
/**
- * power_domain_off - Disable power ot a power domain.
+ * power_domain_off - Disable power to a power domain.
*
* @power_domain: A power domain struct that was previously successfully
* requested by power_domain_get().