#include "../soc-info.h"
-void spl_board_announce_boot_device(void)
-{
- printf("eMMC");
-}
-
struct uniphier_romfunc_table {
void *mmc_send_cmd;
void *mmc_card_blockaddr;
{
const struct uniphier_romfunc_table *table;
- switch (uniphier_get_soc_type()) {
- case SOC_UNIPHIER_LD11:
+ switch (uniphier_get_soc_id()) {
+ case UNIPHIER_LD11_ID:
table = &uniphier_ld11_romfunc_table;
break;
- case SOC_UNIPHIER_LD20:
+ case UNIPHIER_LD20_ID:
table = &uniphier_ld20_romfunc_table;
break;
default:
return 0;
}
-int spl_board_load_image(void)
+static int spl_board_load_image(struct spl_image_info *spl_image,
+ struct spl_boot_device *bootdev)
{
int (*send_cmd)(u32 cmd, u32 arg);
int (*card_blockaddr)(u32 rca);
return ret;
}
- ret = spl_parse_image_header((void *)CONFIG_SYS_TEXT_BASE);
+ ret = spl_parse_image_header(spl_image, (void *)CONFIG_SYS_TEXT_BASE);
if (ret)
return ret;
- ret = (*load_image)(dev_addr, spl_image.load_addr,
- spl_image.size / 512);
+ ret = (*load_image)(dev_addr, spl_image->load_addr,
+ spl_image->size / 512);
if (ret) {
printf("failed to load image\n");
return ret;
return 0;
}
+SPL_LOAD_IMAGE_METHOD("eMMC", 0, BOOT_DEVICE_BOARD, spl_board_load_image);