/* the bootldr command loads an address, checks to see if there is a Boot stream that the on-chip BOOTROM can understand, and loads it via the BOOTROM Callback. It is possible to also add booting from SPI, or TWI, but this function does not currently support that.  */
int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
/* the bootldr command loads an address, checks to see if there is a Boot stream that the on-chip BOOTROM can understand, and loads it via the BOOTROM Callback. It is possible to also add booting from SPI, or TWI, but this function does not currently support that.  */
int do_bootldr(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
	void *addr;
	if (argc < 2)
		addr = (void *)load_addr;
	else
		addr = (void *)simple_strtoul(argv[1], NULL, 16);
	if (ldr_valid_signature(addr)) {
		printf("## Booting ldr image at 0x%p ...\n", addr);
		ldr_load(addr);
		icache_disable();
		dcache_disable();
		ldr_exec(addr);
	} else
		printf("## No ldr image at address 0x%p\n", addr);
	return 0;
}