/* The PBL can load up to 64 bytes at a time, so we split the U-Boot image into 64 byte chunks. PBL needs a command for each piece, of the form "81xxxxxx", where "xxxxxx" is the offset. Calculate the start offset by subtracting the size of the u-boot image from the top of the allowable 24-bit range.  */
static void generate_pbl_cmd(void)
/* The PBL can load up to 64 bytes at a time, so we split the U-Boot image into 64 byte chunks. PBL needs a command for each piece, of the form "81xxxxxx", where "xxxxxx" is the offset. Calculate the start offset by subtracting the size of the u-boot image from the top of the allowable 24-bit range.  */
static void generate_pbl_cmd(void)
{
	uint32_t val = next_pbl_cmd;
	next_pbl_cmd += 0x40;
	int i;
	for (i = 3; i >= 0; i--) {
		*pmem_buf++ = (val >> (i * 8)) & 0xff;
		pbl_size++;
	}
}