]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - drivers/mmc/mmc-uclass.c
mmc: Add a execute_tuning() callback to the mmc operations.
[people/ms/u-boot.git] / drivers / mmc / mmc-uclass.c
index 9c6a8ba476004d32589fd7b90a01e0b5a1f90b96..60cc0ac4cc8b63afc108c4fd4c9c3591ca2b5c01 100644 (file)
@@ -92,6 +92,20 @@ int mmc_getcd(struct mmc *mmc)
        return dm_mmc_get_cd(mmc->dev);
 }
 
+int dm_mmc_execute_tuning(struct udevice *dev, uint opcode)
+{
+       struct dm_mmc_ops *ops = mmc_get_ops(dev);
+
+       if (!ops->execute_tuning)
+               return -ENOSYS;
+       return ops->execute_tuning(dev, opcode);
+}
+
+int mmc_execute_tuning(struct mmc *mmc, uint opcode)
+{
+       return dm_mmc_execute_tuning(mmc->dev, opcode);
+}
+
 struct mmc *mmc_get_mmc_dev(struct udevice *dev)
 {
        struct mmc_uclass_priv *upriv;