#include <usb.h>
#include <mmc.h>
#include <palmas.h>
+#include <spl.h>
#include <asm/gpio.h>
#include <asm/arch/sys_proto.h>
return 0;
}
+/*
+ * Routine: mmc_get_env_part
+ * Description: setup environment storage device partition.
+ */
+#ifdef CONFIG_SYS_MMC_ENV_PART
+uint mmc_get_env_part(struct mmc *mmc)
+{
+ u32 bootmode = gd->arch.omap_boot_params.omap_bootmode;
+ uint bootpart = CONFIG_SYS_MMC_ENV_PART;
+
+ /*
+ * If booted from eMMC boot partition then force eMMC
+ * FIRST boot partition to be env storage
+ */
+ if (bootmode == BOOT_DEVICE_MMC2_2)
+ bootpart = 1;
+
+ return bootpart;
+}
+#endif
+
#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
#define SB_T54_CD_GPIO 228
#define SB_T54_WP_GPIO 229
#define CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 1 /* SLOT2: eMMC(1) */
+#define CONFIG_SYS_MMC_ENV_PART 0
#define CONFIG_ENV_OFFSET 0xc0000 /* (in bytes) 768 KB */
#define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)