- pad_size = ROUND(rkcommon_get_spl_size(params), 0x800);
- params->orig_file_size = pad_size;
-
- /* We will double the image size due to the SPI format */
- pad_size += RK_SPL_HDR_START;
- pad_size *= 2;
- debug("pad_size %x\n", pad_size);
+ /*
+ * Converting to the SPI format (i.e. splitting each 4K page into two
+ * 2K subpages and then padding these 2K pages up to take a complete
+ * 4K sector again) which will double the image size.
+ */
+ params->file_size = ROUND(params->file_size, RKSPI_SECT_LEN) << 1;