summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKever Yang <kever.yang@rock-chips.com>2016-07-22 17:22:50 +0800
committerSimon Glass <sjg@chromium.org>2016-07-31 07:24:20 -0600
commit46683f3da191a4c2156d5473c23b9923c461912c (patch)
tree215fabaa1e45e5bbc1f8e1766c2c152f63445696 /include
parent5c928d02044345b843202f23540c3765468c1d6f (diff)
mmc-uclass: correct the device number
Not like the mmc-legacy which the devnum starts from 1, it starts from 0 in mmc-uclass, so the device number should be (devnum + 1) in get_mmc_num(). Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include')
-rw-r--r--include/mmc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 8f309f1f71..dd47f34e9d 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -503,6 +503,12 @@ void mmc_set_clock(struct mmc *mmc, uint clock);
struct mmc *find_mmc_device(int dev_num);
int mmc_set_dev(int dev_num);
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
+ */
int get_mmc_num(void);
int mmc_hwpart_config(struct mmc *mmc, const struct mmc_hwpart_conf *conf,
enum mmc_hwpart_conf_mode mode);