]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/samsung/smdk5420/smdk5420.c
exynos: config: Move common options to the common headers and tidy up
[karo-tx-uboot.git] / board / samsung / smdk5420 / smdk5420.c
index 8021f779e0c1008d6794810fc15584a724f074f5..57cc92c50b9729ea746b40cbedb928aa7ddac277 100644 (file)
@@ -19,6 +19,7 @@
 #include <power/tps65090_pmic.h>
 #include <i2c.h>
 #include <lcd.h>
+#include <mmc.h>
 #include <parade.h>
 #include <spi.h>
 #include <usb.h>
@@ -49,9 +50,9 @@ static int has_edp_bridge(void)
 
 void exynos_lcd_power_on(void)
 {
+#ifdef CONFIG_POWER_TPS65090
        int ret;
 
-#ifdef CONFIG_POWER_TPS65090
        ret = tps65090_init();
        if (ret < 0) {
                printf("%s: tps65090_init() failed\n", __func__);
@@ -111,3 +112,32 @@ int board_usb_init(int index, enum usb_init_type init)
        return dwc3_uboot_init(&dwc3_device_data);
 }
 #endif
+#ifdef CONFIG_SET_DFU_ALT_INFO
+char *get_dfu_alt_system(char *interface, char *devstr)
+{
+       return getenv("dfu_alt_system");
+}
+
+char *get_dfu_alt_boot(char *interface, char *devstr)
+{
+       struct mmc *mmc;
+       char *alt_boot;
+       int dev_num;
+
+       dev_num = simple_strtoul(devstr, NULL, 10);
+
+       mmc = find_mmc_device(dev_num);
+       if (!mmc)
+               return NULL;
+
+       if (mmc_init(mmc))
+               return NULL;
+
+       if (IS_SD(mmc))
+               alt_boot = CONFIG_DFU_ALT_BOOT_SD;
+       else
+               alt_boot = CONFIG_DFU_ALT_BOOT_EMMC;
+
+       return alt_boot;
+}
+#endif