/* Compute a 8-bit checksum of a memory area. This algorithm follows the requirements of the Marvell SoC BootROM specifications.  */
static uint8_t image_checksum8(void *start, uint32_t len)
/* Compute a 8-bit checksum of a memory area. This algorithm follows the requirements of the Marvell SoC BootROM specifications.  */
static uint8_t image_checksum8(void *start, uint32_t len)
{
	uint8_t csum = 0;
	uint8_t *p = start;
	if (!len)
		return 0;
	do {
		csum += *p;
		p++;
	} while (--len);
	return csum;
}