summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-09-07 05:26:50 +0300
committerTom Rini <trini@konsulko.com>2022-09-29 23:07:57 +0300
commitd9d7c20b731788c5c8018ce8e5c6e86bb01413df (patch)
treebef57bf8b4eb59dc9b6d41c0454cde3e0fa3ad0f /boot
parentc56b2bb9b9fcdd0c9ff2a76e34495b58bd98559a (diff)
downloadu-boot-d9d7c20b731788c5c8018ce8e5c6e86bb01413df.tar.xz
treewide: Drop bootm_headers_t typedef
This is not needed and we should avoid typedefs. Use the struct instead. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/bootm.c16
-rw-r--r--boot/bootm_os.c28
-rw-r--r--boot/image-board.c14
-rw-r--r--boot/image-fdt.c6
-rw-r--r--boot/image-fit.c16
5 files changed, 40 insertions, 40 deletions
diff --git a/boot/bootm.c b/boot/bootm.c
index e3233fdf89..2b0dc0b36b 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -41,10 +41,10 @@
DECLARE_GLOBAL_DATA_PTR;
-bootm_headers_t images; /* pointers to os/initrd/fdt images */
+struct bootm_headers images; /* pointers to os/initrd/fdt images */
static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[], bootm_headers_t *images,
+ char *const argv[], struct bootm_headers *images,
ulong *os_data, ulong *os_len);
__weak void board_quiesce_devices(void)
@@ -52,7 +52,7 @@ __weak void board_quiesce_devices(void)
}
#ifdef CONFIG_LMB
-static void boot_start_lmb(bootm_headers_t *images)
+static void boot_start_lmb(struct bootm_headers *images)
{
ulong mem_start;
phys_size_t mem_size;
@@ -65,7 +65,7 @@ static void boot_start_lmb(bootm_headers_t *images)
}
#else
#define lmb_reserve(lmb, base, size)
-static inline void boot_start_lmb(bootm_headers_t *images) { }
+static inline void boot_start_lmb(struct bootm_headers *images) { }
#endif
static int bootm_start(struct cmd_tbl *cmdtp, int flag, int argc,
@@ -397,7 +397,7 @@ static int handle_decomp_error(int comp_type, size_t uncomp_size,
#endif
#ifndef USE_HOSTCC
-static int bootm_load_os(bootm_headers_t *images, int boot_progress)
+static int bootm_load_os(struct bootm_headers *images, int boot_progress)
{
image_info_t os = images->os;
ulong load = os.load;
@@ -688,7 +688,7 @@ int bootm_process_cmdline_env(int flags)
* unless the image type is standalone.
*/
int do_bootm_states(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[], int states, bootm_headers_t *images,
+ char *const argv[], int states, struct bootm_headers *images,
int boot_progress)
{
boot_os_fn *boot_fn;
@@ -878,7 +878,7 @@ static image_header_t *image_get_kernel(ulong img_addr, int verify)
* address and length, otherwise NULL
*/
static const void *boot_get_kernel(struct cmd_tbl *cmdtp, int flag, int argc,
- char *const argv[], bootm_headers_t *images,
+ char *const argv[], struct bootm_headers *images,
ulong *os_data, ulong *os_len)
{
#if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
@@ -1002,7 +1002,7 @@ static int bootm_host_load_image(const void *fit, int req_image_type,
{
const char *fit_uname_config = NULL;
ulong data, len;
- bootm_headers_t images;
+ struct bootm_headers images;
int noffset;
ulong load_end, buf_size;
uint8_t image_type;
diff --git a/boot/bootm_os.c b/boot/bootm_os.c
index 079224ce58..649f92a75b 100644
--- a/boot/bootm_os.c
+++ b/boot/bootm_os.c
@@ -24,7 +24,7 @@
DECLARE_GLOBAL_DATA_PTR;
static int do_bootm_standalone(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
int (*appl)(int, char *const[]);
@@ -65,7 +65,7 @@ static void __maybe_unused fit_unsupported_reset(const char *msg)
#ifdef CONFIG_BOOTM_NETBSD
static int do_bootm_netbsd(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*loader)(struct bd_info *, image_header_t *, char *, char *);
image_header_t *os_hdr, *hdr;
@@ -137,7 +137,7 @@ static int do_bootm_netbsd(int flag, int argc, char *const argv[],
#ifdef CONFIG_BOOTM_RTEMS
static int do_bootm_rtems(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*entry_point)(struct bd_info *);
@@ -170,7 +170,7 @@ static int do_bootm_rtems(int flag, int argc, char *const argv[],
#if defined(CONFIG_BOOTM_OSE)
static int do_bootm_ose(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*entry_point)(void);
@@ -203,7 +203,7 @@ static int do_bootm_ose(int flag, int argc, char *const argv[],
#if defined(CONFIG_BOOTM_PLAN9)
static int do_bootm_plan9(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*entry_point)(void);
char *s;
@@ -252,7 +252,7 @@ static int do_bootm_plan9(int flag, int argc, char *const argv[],
#if defined(CONFIG_BOOTM_VXWORKS) && \
(defined(CONFIG_PPC) || defined(CONFIG_ARM))
-static void do_bootvx_fdt(bootm_headers_t *images)
+static void do_bootvx_fdt(struct bootm_headers *images)
{
#if defined(CONFIG_OF_LIBFDT)
int ret;
@@ -311,7 +311,7 @@ static void do_bootvx_fdt(bootm_headers_t *images)
}
static int do_bootm_vxworks_legacy(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
if (flag != BOOTM_STATE_OS_GO)
return 0;
@@ -329,7 +329,7 @@ static int do_bootm_vxworks_legacy(int flag, int argc, char *const argv[],
}
int do_bootm_vxworks(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
char *bootargs;
int pos;
@@ -365,7 +365,7 @@ int do_bootm_vxworks(int flag, int argc, char *const argv[],
#if defined(CONFIG_CMD_ELF)
static int do_bootm_qnxelf(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
char *local_args[2];
char str[16];
@@ -403,7 +403,7 @@ static int do_bootm_qnxelf(int flag, int argc, char *const argv[],
#ifdef CONFIG_INTEGRITY
static int do_bootm_integrity(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*entry_point)(void);
@@ -436,7 +436,7 @@ static int do_bootm_integrity(int flag, int argc, char *const argv[],
#ifdef CONFIG_BOOTM_OPENRTOS
static int do_bootm_openrtos(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
void (*entry_point)(void);
@@ -462,7 +462,7 @@ static int do_bootm_openrtos(int flag, int argc, char *const argv[],
#ifdef CONFIG_BOOTM_OPTEE
static int do_bootm_tee(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
int ret;
@@ -490,7 +490,7 @@ static int do_bootm_tee(int flag, int argc, char *const argv[],
#ifdef CONFIG_BOOTM_EFI
static int do_bootm_efi(int flag, int argc, char *const argv[],
- bootm_headers_t *images)
+ struct bootm_headers *images)
{
int ret;
efi_status_t efi_ret;
@@ -589,7 +589,7 @@ __weak void board_preboot_os(void)
}
int boot_selected_os(int argc, char *const argv[], int state,
- bootm_headers_t *images, boot_os_fn *boot_fn)
+ struct bootm_headers *images, boot_os_fn *boot_fn)
{
arch_preboot_os();
board_preboot_os();
diff --git a/boot/image-board.c b/boot/image-board.c
index 98f903f93f..fe4455778a 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -301,7 +301,7 @@ int genimg_get_format(const void *img_addr)
* 0, no FIT support or no configuration found
* 1, configuration found
*/
-int genimg_has_config(bootm_headers_t *images)
+int genimg_has_config(struct bootm_headers *images)
{
if (CONFIG_IS_ENABLED(FIT) && images->fit_uname_cfg)
return 1;
@@ -320,7 +320,7 @@ int genimg_has_config(bootm_headers_t *images)
* Return: 0 if OK, -ENOPKG if no ramdisk (but an error should not be reported),
* other -ve value on other error
*/
-static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
+static int select_ramdisk(struct bootm_headers *images, const char *select, u8 arch,
ulong *rd_datap, ulong *rd_lenp)
{
const char *fit_uname_config;
@@ -482,7 +482,7 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
* 1, if ramdisk image is found but corrupted, or invalid
* rd_start and rd_end are set to 0 if no ramdisk exists
*/
-int boot_get_ramdisk(int argc, char *const argv[], bootm_headers_t *images,
+int boot_get_ramdisk(int argc, char *const argv[], struct bootm_headers *images,
u8 arch, ulong *rd_start, ulong *rd_end)
{
ulong rd_data, rd_len;
@@ -646,7 +646,7 @@ error:
return -1;
}
-int boot_get_setup(bootm_headers_t *images, u8 arch,
+int boot_get_setup(struct bootm_headers *images, u8 arch,
ulong *setup_start, ulong *setup_len)
{
if (!CONFIG_IS_ENABLED(FIT))
@@ -655,7 +655,7 @@ int boot_get_setup(bootm_headers_t *images, u8 arch,
return boot_get_setup_fit(images, arch, setup_start, setup_len);
}
-int boot_get_fpga(int argc, char *const argv[], bootm_headers_t *images,
+int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images,
u8 arch, const ulong *ld_start, ulong * const ld_len)
{
ulong tmp_img_addr, img_data, img_len;
@@ -758,7 +758,7 @@ static void fit_loadable_process(u8 img_type,
fit_loadable_handler->handler(img_data, img_len);
}
-int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
+int boot_get_loadable(int argc, char *const argv[], struct bootm_headers *images,
u8 arch, const ulong *ld_start, ulong * const ld_len)
{
/*
@@ -919,7 +919,7 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd)
return 0;
}
-int image_setup_linux(bootm_headers_t *images)
+int image_setup_linux(struct bootm_headers *images)
{
ulong of_size = images->ft_len;
char **of_flat_tree = &images->ft_addr;
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index e75d051c87..78417bd889 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -291,7 +291,7 @@ error:
* other -ve value on other error
*/
-static int select_fdt(bootm_headers_t *images, const char *select, u8 arch,
+static int select_fdt(struct bootm_headers *images, const char *select, u8 arch,
ulong *fdt_addrp)
{
const char *buf;
@@ -470,7 +470,7 @@ static int select_fdt(bootm_headers_t *images, const char *select, u8 arch,
* of_flat_tree and of_size are set to 0 if no fdt exists
*/
int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
- bootm_headers_t *images, char **of_flat_tree, ulong *of_size)
+ struct bootm_headers *images, char **of_flat_tree, ulong *of_size)
{
ulong img_addr;
ulong fdt_addr;
@@ -602,7 +602,7 @@ __weak int arch_fixup_fdt(void *blob)
return 0;
}
-int image_setup_libfdt(bootm_headers_t *images, void *blob,
+int image_setup_libfdt(struct bootm_headers *images, void *blob,
int of_size, struct lmb *lmb)
{
ulong *initrd_start = &images->initrd_start;
diff --git a/boot/image-fit.c b/boot/image-fit.c
index f16eab9df3..6e503f827d 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -1969,8 +1969,8 @@ static int fit_image_select(const void *fit, int rd_noffset, int verify)
return 0;
}
-int fit_get_node_from_config(bootm_headers_t *images, const char *prop_name,
- ulong addr)
+int fit_get_node_from_config(struct bootm_headers *images,
+ const char *prop_name, ulong addr)
{
int cfg_noffset;
void *fit_hdr;
@@ -2031,7 +2031,7 @@ static const char *fit_get_image_type_property(int type)
return "unknown";
}
-int fit_image_load(bootm_headers_t *images, ulong addr,
+int fit_image_load(struct bootm_headers *images, ulong addr,
const char **fit_unamep, const char **fit_uname_configp,
int arch, int image_type, int bootstage_id,
enum fit_load_op load_op, ulong *datap, ulong *lenp)
@@ -2289,8 +2289,8 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
return noffset;
}
-int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
- ulong *setup_start, ulong *setup_len)
+int boot_get_setup_fit(struct bootm_headers *images, uint8_t arch,
+ ulong *setup_start, ulong *setup_len)
{
int noffset;
ulong addr;
@@ -2310,9 +2310,9 @@ int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
}
#ifndef USE_HOSTCC
-int boot_get_fdt_fit(bootm_headers_t *images, ulong addr,
- const char **fit_unamep, const char **fit_uname_configp,
- int arch, ulong *datap, ulong *lenp)
+int boot_get_fdt_fit(struct bootm_headers *images, ulong addr,
+ const char **fit_unamep, const char **fit_uname_configp,
+ int arch, ulong *datap, ulong *lenp)
{
int fdt_noffset, cfg_noffset, count;
const void *fit;