int board_late_init(void)
{
	puts("MODE:  ");

	switch (spl_boot_device_raw()) {
	case BOOT_DEVICE_MMC1:
		printf("eMMC Boot\n");
		setenv("bootmode", "emmcboot");
		break;
	case BOOT_DEVICE_NAND:
		printf("NAND Boot\n");
		setenv("bootmode", "nandboot");
		nand_denali_wp_disable();
		break;
	case BOOT_DEVICE_NOR:
		printf("NOR Boot\n");
		setenv("bootmode", "norboot");
		break;
	case BOOT_DEVICE_USB:
		printf("USB Boot\n");
		setenv("bootmode", "usbboot");
		break;
	default:
		printf("Unknown\n");
		break;
	}

	if (uniphier_set_fdt_file())
		printf("fdt_file environment was not set correctly\n");

	return 0;
}
Exemple #2
0
u32 spl_boot_device(void)
{
	u32 ret;

	ret = spl_boot_device_raw();

	return ret == BOOT_DEVICE_USB ? BOOT_DEVICE_NOR : ret;
}