Skip to content
Snippets Groups Projects
Commit 253c60a5 authored by Philipp Tomsich's avatar Philipp Tomsich Committed by Simon Glass
Browse files

rockchip: mkimage: remove placeholder functions from rkimage


The imagetool framework checks whether function pointer for the verify,
print and extract actions are available and will will handle their
absence appropriately.

This change removes the unnecessary functions and uses the driver
structure to convey available functionality to imagetool.  This is in
fact better than having verify just return 0 (which previously broke
dumpimage, as dumpimage assumed that we had handled the image and did
not continue to probe further).

Signed-off-by: default avatarPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: default avatarSimon Glass <sjg@chromium.org>
parent 24aae93f
No related branches found
No related tags found
No related merge requests found
...@@ -13,16 +13,6 @@ ...@@ -13,16 +13,6 @@
static uint32_t header; static uint32_t header;
static int rkimage_verify_header(unsigned char *buf, int size,
struct image_tool_params *params)
{
return 0;
}
static void rkimage_print_header(const void *buf)
{
}
static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
struct image_tool_params *params) struct image_tool_params *params)
{ {
...@@ -33,11 +23,6 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd, ...@@ -33,11 +23,6 @@ static void rkimage_set_header(void *buf, struct stat *sbuf, int ifd,
rkcommon_rc4_encode_spl(buf, 4, params->file_size); rkcommon_rc4_encode_spl(buf, 4, params->file_size);
} }
static int rkimage_extract_subimage(void *buf, struct image_tool_params *params)
{
return 0;
}
static int rkimage_check_image_type(uint8_t type) static int rkimage_check_image_type(uint8_t type)
{ {
if (type == IH_TYPE_RKIMAGE) if (type == IH_TYPE_RKIMAGE)
...@@ -55,10 +40,10 @@ U_BOOT_IMAGE_TYPE( ...@@ -55,10 +40,10 @@ U_BOOT_IMAGE_TYPE(
4, 4,
&header, &header,
rkcommon_check_params, rkcommon_check_params,
rkimage_verify_header, NULL,
rkimage_print_header, NULL,
rkimage_set_header, rkimage_set_header,
rkimage_extract_subimage, NULL,
rkimage_check_image_type, rkimage_check_image_type,
NULL, NULL,
NULL NULL
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment