From ef36d9ae1646e5aee7c1425ee507d275699a072e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 9 Jul 2016 15:31:47 +0200 Subject: sunxi: Use BROM stored boot_media value to determine our boot-source Now that we know that the BROM stores a value indicating the boot-source at the beginning of SRAM, use that instead of trying to recreate the BROM's boot probing. Signed-off-by: Hans de Goede Acked-by: Ian Campbell --- drivers/mmc/sunxi_mmc.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'drivers') diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 3be9a90a6b..5d8abdc897 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -445,23 +445,6 @@ static int sunxi_mmc_getcd(struct mmc *mmc) return !gpio_get_value(cd_pin); } -int sunxi_mmc_has_egon_boot_signature(struct mmc *mmc) -{ - char *buf = malloc(512); - int valid_signature = 0; - - if (buf == NULL) - panic("Failed to allocate memory\n"); - - if (mmc_getcd(mmc) && mmc_init(mmc) == 0 && - mmc->block_dev.block_read(&mmc->block_dev, 16, 1, buf) == 1 && - strncmp(&buf[4], "eGON.BT0", 8) == 0) - valid_signature = 1; - - free(buf); - return valid_signature; -} - static const struct mmc_ops sunxi_mmc_ops = { .send_cmd = sunxi_mmc_send_cmd, .set_ios = sunxi_mmc_set_ios, -- cgit