X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tools%2Frkspi.c;h=faa18fcd183c3de3fc464b9cfc205c6124d80bea;hb=6915dcf35987d654b491524f151e56b91e0d0ec9;hp=87bd1a9e6eb950cab10962076bc8719dd5a8cda8;hpb=5c84ad097d829bb1e6460438f33e1536b23b3c9b;p=u-boot diff --git a/tools/rkspi.c b/tools/rkspi.c index 87bd1a9e6e..faa18fcd18 100644 --- a/tools/rkspi.c +++ b/tools/rkspi.c @@ -1,9 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * (C) Copyright 2015 Google, Inc * Written by Simon Glass * - * SPDX-License-Identifier: GPL-2.0+ - * * See README.rockchip for details of the rkspi format */ @@ -17,16 +16,6 @@ enum { RKSPI_SECT_LEN = RK_BLK_SIZE * 4, }; -static int rkspi_verify_header(unsigned char *buf, int size, - struct image_tool_params *params) -{ - return 0; -} - -static void rkspi_print_header(const void *buf) -{ -} - static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd, struct image_tool_params *params) { @@ -58,11 +47,6 @@ static void rkspi_set_header(void *buf, struct stat *sbuf, int ifd, } } -static int rkspi_extract_subimage(void *buf, struct image_tool_params *params) -{ - return 0; -} - static int rkspi_check_image_type(uint8_t type) { if (type == IH_TYPE_RKSPI) @@ -78,7 +62,7 @@ static int rkspi_check_image_type(uint8_t type) static int rkspi_vrec_header(struct image_tool_params *params, struct image_type_params *tparams) { - int padding = rkcommon_vrec_header(params, tparams, 2048); + int padding = rkcommon_vrec_header(params, tparams, RK_INIT_SIZE_ALIGN); /* * The file size has not been adjusted at this point (our caller will * eventually add the header/padding to the file_size), so we need to @@ -112,10 +96,10 @@ U_BOOT_IMAGE_TYPE( 0, NULL, rkcommon_check_params, - rkspi_verify_header, - rkspi_print_header, + rkcommon_verify_header, + rkcommon_print_header, rkspi_set_header, - rkspi_extract_subimage, + NULL, rkspi_check_image_type, NULL, rkspi_vrec_header