diff options
author | Miao Yan <yanmiaobest@gmail.com> | 2016-05-23 02:37:11 (GMT) |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2016-05-23 07:18:00 (GMT) |
commit | 099b2196e4a693968fd6205ac6d61f6eaab79fb1 (patch) | |
tree | e255d10eb85b684816f07a330b6f4c2622cbd775 /include | |
parent | 34865a65c44d9c0dffb9b5346e66ea9b7757b880 (diff) | |
download | u-boot-099b2196e4a693968fd6205ac6d61f6eaab79fb1.tar.xz |
cmd: qfw: add API to iterate firmware list
This patch is part of the refactor work of qfw. It adds 3 APIs to qfw
core to iterate firmware list.
Signed-off-by: Miao Yan <yanmiaobest@gmail.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/qemu_fw_cfg.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/qemu_fw_cfg.h b/include/qemu_fw_cfg.h index e21f150..19d0ba0 100644 --- a/include/qemu_fw_cfg.h +++ b/include/qemu_fw_cfg.h @@ -87,6 +87,10 @@ struct fw_file { struct list_head list; /* list node to link to fw_list */ }; +struct fw_cfg_file_iter { + struct list_head *entry; /* structure to iterate file list */ +}; + struct fw_cfg_dma_access { __be32 control; __be32 length; @@ -159,4 +163,9 @@ void qemu_fwcfg_free_files(void); */ int qemu_fwcfg_online_cpus(void); +/* helper functions to iterate firmware file list */ +struct fw_file *qemu_fwcfg_file_iter_init(struct fw_cfg_file_iter *iter); +struct fw_file *qemu_fwcfg_file_iter_next(struct fw_cfg_file_iter *iter); +bool qemu_fwcfg_file_iter_end(struct fw_cfg_file_iter *iter); + #endif |