Convert CONFIG_SAMSUNG_ONENAND to Kconfig
[platform/kernel/u-boot.git] / include / mmc.h
index 244d2dc..073b01f 100644 (file)
@@ -390,7 +390,7 @@ struct mmc_uclass_priv {
  * will be available.
  *
  * @dev:       Device
- * @return associated mmc struct pointer if available, else NULL
+ * Return: associated mmc struct pointer if available, else NULL
  */
 struct mmc *mmc_get_mmc_dev(const struct udevice *dev);
 
@@ -561,6 +561,7 @@ struct mmc_ops {
        int (*getwp)(struct mmc *mmc);
        int (*host_power_cycle)(struct mmc *mmc);
        int (*get_b_max)(struct mmc *mmc, void *dst, lbaint_t blkcnt);
+       int (*wait_dat0)(struct mmc *mmc, int state, int timeout_us);
 };
 
 static inline int mmc_hs400_prepare_ddr(struct mmc *mmc)
@@ -768,7 +769,7 @@ struct mmc *mmc_create(const struct mmc_config *cfg, void *priv);
  * @dev:       MMC device to set up
  * @mmc:       MMC struct
  * @cfg:       MMC configuration
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int mmc_bind(struct udevice *dev, struct mmc *mmc,
             const struct mmc_config *cfg);
@@ -778,7 +779,7 @@ void mmc_destroy(struct mmc *mmc);
  * mmc_unbind() - Unbind a MMC device's child block device
  *
  * @dev:       MMC device
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int mmc_unbind(struct udevice *dev);
 int mmc_initialize(struct bd_info *bis);
@@ -793,7 +794,7 @@ int mmc_deinit(struct mmc *mmc);
  *
  * @dev:       MMC device
  * @cfg:       MMC configuration
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg);
 
@@ -803,7 +804,7 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg);
  *
  * @dev:       MMC device
  * @cfg:       MMC configuration
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int mmc_pwrseq_get_power(struct udevice *dev, struct mmc_config *cfg);
 #endif
@@ -814,7 +815,7 @@ int mmc_read(struct mmc *mmc, u64 src, uchar *dst, int size);
  * mmc_voltage_to_mv() - Convert a mmc_voltage in mV
  *
  * @voltage:   The mmc_voltage to convert
- * @return the value in mV if OK, -EINVAL on error (invalid mmc_voltage value)
+ * Return: the value in mV if OK, -EINVAL on error (invalid mmc_voltage value)
  */
 int mmc_voltage_to_mv(enum mmc_voltage voltage);
 
@@ -823,7 +824,7 @@ int mmc_voltage_to_mv(enum mmc_voltage voltage);
  * @mmc:       MMC struct
  * @clock:     bus frequency in Hz
  * @disable:   flag indicating if the clock must on or off
- * @return 0 if OK, -ve on error
+ * Return: 0 if OK, -ve on error
  */
 int mmc_set_clock(struct mmc *mmc, uint clock, bool disable);
 
@@ -837,7 +838,7 @@ void print_mmc_devices(char separator);
 /**
  * get_mmc_num() - get the total MMC device number
  *
- * @return 0 if there is no MMC device, else the number of devices
+ * Return: 0 if there is no MMC device, else the number of devices
  */
 int get_mmc_num(void);
 int mmc_switch_part(struct mmc *mmc, unsigned int part_num);
@@ -898,7 +899,7 @@ int mmc_set_bkops_enable(struct mmc *mmc);
  *
  * @param mmc  Pointer to a MMC device struct
  * @param quiet        Be quiet, do not print error messages when card is not detected.
- * @return 0 on success, <0 on error.
+ * Return: 0 on success, <0 on error.
  */
 int mmc_get_op_cond(struct mmc *mmc, bool quiet);
 
@@ -909,7 +910,7 @@ int mmc_get_op_cond(struct mmc *mmc, bool quiet);
  * initializatin.
  *
  * @param mmc  Pointer to a MMC device struct
- * @return 0 on success, <0 on error.
+ * Return: 0 on success, <0 on error.
  */
 int mmc_start_init(struct mmc *mmc);
 
@@ -956,11 +957,21 @@ int mmc_get_env_dev(void);
  * mmc_get_blk_desc() - Get the block descriptor for an MMC device
  *
  * @mmc:       MMC device
- * @return block device if found, else NULL
+ * Return: block descriptor if found, else NULL
  */
 struct blk_desc *mmc_get_blk_desc(struct mmc *mmc);
 
 /**
+ * mmc_get_blk() - Get the block device for an MMC device
+ *
+ * @dev:       MMC device
+ * @blkp:      Returns pointer to probed block device on sucesss
+ *
+ * Return: 0 on success, -ve on error
+ */
+int mmc_get_blk(struct udevice *dev, struct udevice **blkp);
+
+/**
  * mmc_send_ext_csd() - read the extended CSD register
  *
  * @mmc:       MMC device