Merge tag 'efi-2021-01-rc3-3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[platform/kernel/u-boot.git] / include / mmc.h
index 93494d9..1d377e0 100644 (file)
@@ -360,6 +360,19 @@ enum mmc_voltage {
 #define MMC_NUM_BOOT_PARTITION 2
 #define MMC_PART_RPMB           3       /* RPMB partition number */
 
+/* timing specification used */
+#define MMC_TIMING_LEGACY      0
+#define MMC_TIMING_MMC_HS      1
+#define MMC_TIMING_SD_HS       2
+#define MMC_TIMING_UHS_SDR12   3
+#define MMC_TIMING_UHS_SDR25   4
+#define MMC_TIMING_UHS_SDR50   5
+#define MMC_TIMING_UHS_SDR104  6
+#define MMC_TIMING_UHS_DDR50   7
+#define MMC_TIMING_MMC_DDR52   8
+#define MMC_TIMING_MMC_HS200   9
+#define MMC_TIMING_MMC_HS400   10
+
 /* Driver model support */
 
 /**
@@ -513,6 +526,14 @@ struct dm_mmc_ops {
         * @return maximum number of blocks for this transfer
         */
        int (*get_b_max)(struct udevice *dev, void *dst, lbaint_t blkcnt);
+
+       /**
+        * hs400_prepare_ddr - prepare to switch to DDR mode
+        *
+        * @dev:        Device to check
+        * @return 0 if success, -ve on error
+        */
+       int (*hs400_prepare_ddr)(struct udevice *dev);
 };
 
 #define mmc_get_ops(dev)        ((struct dm_mmc_ops *)(dev)->driver->ops)
@@ -540,7 +561,7 @@ int mmc_host_power_cycle(struct mmc *mmc);
 int mmc_deferred_probe(struct mmc *mmc);
 int mmc_reinit(struct mmc *mmc);
 int mmc_get_b_max(struct mmc *mmc, void *dst, lbaint_t blkcnt);
-
+int mmc_hs400_prepare_ddr(struct mmc *mmc);
 #else
 struct mmc_ops {
        int (*send_cmd)(struct mmc *mmc,
@@ -552,6 +573,11 @@ struct mmc_ops {
        int (*host_power_cycle)(struct mmc *mmc);
        int (*get_b_max)(struct mmc *mmc, void *dst, lbaint_t blkcnt);
 };
+
+static inline int mmc_hs400_prepare_ddr(struct mmc *mmc)
+{
+       return 0;
+}
 #endif
 
 struct mmc_config {
@@ -707,6 +733,7 @@ struct mmc {
                                  * accessing the boot partitions
                                  */
        u32 quirks;
+       u8 hs400_tuning;
 };
 
 struct mmc_hwpart_conf {