diff options
author | Corneliu Doban <cdoban@broadcom.com> | 2020-11-09 11:49:16 +0530 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-01-16 14:48:23 -0500 |
commit | 12fc1f3bb2237c6eee7bc775599c14df5c997534 (patch) | |
tree | 756c055097ae73e582fc9e83393ea78d725fe3ed /include/part.h | |
parent | 9a3122f769d2e0bd0bc213b98bc251f92e3ff979 (diff) | |
download | u-boot-12fc1f3bb2237c6eee7bc775599c14df5c997534.tar.gz u-boot-12fc1f3bb2237c6eee7bc775599c14df5c997534.tar.xz u-boot-12fc1f3bb2237c6eee7bc775599c14df5c997534.zip |
cmd: gpt: add eMMC and GPT support
Add eMMC and GPT support.
- GPT partition list and command to create the GPT added to u-boot
environment
- eMMC boot commands added to u-boot environment
- new gpt commands (enumarate and setenv) that are used by broadcom
update scripts and boot commands
- eMMC specific u-boot configurations with environment saved in eMMC
and GPT support
Signed-off-by: Corneliu Doban <cdoban@broadcom.com>
Signed-off-by: Rayagonda Kokatanur <rayagonda.kokatanur@broadcom.com>
[trini: Make gpt_setenv initialize ret to -1, given relevant return
error values]
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/part.h')
-rw-r--r-- | include/part.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h index fac36364bd..815515aa80 100644 --- a/include/part.h +++ b/include/part.h @@ -9,6 +9,7 @@ #include <blk.h> #include <ide.h> #include <uuid.h> +#include <linker_lists.h> #include <linux/list.h> struct block_drvr { @@ -481,5 +482,33 @@ int layout_mbr_partitions(struct disk_partition *p, int count, #endif +#ifdef CONFIG_PARTITIONS +/** + * part_driver_get_count() - get partition driver count + * + * @return - number of partition drivers + */ +static inline int part_driver_get_count(void) +{ + return ll_entry_count(struct part_driver, part_driver); +} + +/** + * part_driver_get_first() - get first partition driver + * + * @return - pointer to first partition driver on success, otherwise NULL + */ +static inline struct part_driver *part_driver_get_first(void) +{ + return ll_entry_start(struct part_driver, part_driver); +} + +#else +static inline int part_driver_get_count(void) +{ return 0; } + +static inline struct part_driver *part_driver_get_first(void) +{ return NULL; } +#endif /* CONFIG_PARTITIONS */ #endif /* _PART_H */ |