summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/arch-sunxi
diff options
context:
space:
mode:
authorDaniel Kochmański <dkochmanski@turtle-solutions.eu>2015-05-29 16:55:41 +0200
committerHans de Goede <hdegoede@redhat.com>2015-07-24 16:17:08 +0200
commit645c48f50eab307a9879a82c4d066e74114ec78a (patch)
tree6172bf372026f375bab16294b1baeaac74b384be /arch/arm/include/asm/arch-sunxi
parent1b26bab12e85e8b0d382d6775e40d14445249574 (diff)
downloadtalos-obmc-uboot-645c48f50eab307a9879a82c4d066e74114ec78a.tar.gz
talos-obmc-uboot-645c48f50eab307a9879a82c4d066e74114ec78a.zip
sunxi: Create helper function veryfing valid boot signature on MMC
This patch extracts checking for valid SD card "eGON.BT0" signature from `board_mmc_init` into function `sunxi_mmc_has_egon_boot_signature`. Buffer for mmc sector is allocated and freed at runtime. `panic` is triggered on malloc failure. Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu> CC: Roy Spliet <r.spliet@ultimaker.com> Cc: Ian Campbell <ijc@hellion.org.uk> [hdegoede@redhat.com: Small bugfix to make it work for devs other then mmc0] Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'arch/arm/include/asm/arch-sunxi')
-rw-r--r--arch/arm/include/asm/arch-sunxi/mmc.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-sunxi/mmc.h b/arch/arm/include/asm/arch-sunxi/mmc.h
index cb52e64873..3da360b177 100644
--- a/arch/arm/include/asm/arch-sunxi/mmc.h
+++ b/arch/arm/include/asm/arch-sunxi/mmc.h
@@ -127,4 +127,5 @@ struct sunxi_mmc {
#define SUNXI_MMC_COMMON_RESET (1 << 18)
struct mmc *sunxi_mmc_init(int sdc_no);
+int sunxi_mmc_has_egon_boot_signature(struct mmc *mmc);
#endif /* _SUNXI_MMC_H */
OpenPOWER on IntegriCloud