summaryrefslogtreecommitdiff
path: root/drivers/mmc/mmc-uclass.c
Commit message (Collapse)AuthorAgeLines
* mmc: init mmc block devices on probeFiach Antaw2017-02-09-0/+12
| | | | | | | | | MMC devices accessed exclusively via the driver model were not being initialized before being exposed as block devices, causing issues in scenarios where the MMC device is first accessed via the uclass block interface. Signed-off-by: Fiach Antaw <fiach.antaw@uqconnect.edu.au>
* mmc: mmc-uclass: use the fixed devnum with alias nodeJaehoon Chung2017-02-09-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there are alias nodes as "mmc", use the devnum as alias index number. This patch is for fixing a problem of Exynos4 series. Problem is the below thing. Current legacy mode: EXYNOS DWMMC: 0, SAMSUNG SDHCI: 1 After using DM: SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1 Dev index is swapped. Then u-boot can't find the kernel image..because it is already set to 0 as mmcdev. If change from legacy to DM, also needs to touch all exynos4 config file. For using simply, just supporting the fixed devnum with alias node is better than it. Usage: alaise { .... mmc0 = &sdhci2; /* eMMC */ mmc1 = &sdhci1; /* SD */ ... } Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* mmc: refactor two core functionsMasahiro Yamada2016-10-28-13/+2
| | | | | | Drop unneeded variables and assignments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* dm: mmc: Support eraseSimon Glass2016-10-09-0/+1
| | | | | | | At present erase is not suported with CONFIG_DM_OPS. Add it so that MMC devices can be erased. Signed-off-by: Simon Glass <sjg@chromium.org>
* mmc: display mmc list information like mmc_legacy typeXu Ziyuan2016-08-05-1/+1
| | | | | | | | | | | | | | | | | | | | | It's nicer to see this: => mmc list dwmmc@ff0c0000: 0 dwmmc@ff0f0000: 1 (eMMC) than this: => mmc list dwmmc@ff0c0000: 0dwmmc@ff0f0000: 1 (eMMC) With the former, it's much clearer which mmc devices are on. Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com> Acked-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Tested-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
* mmc-uclass: correct the device numberKever Yang2016-07-31-3/+3
| | | | | | | | | 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>
* dm: mmc: Add a way to use driver model for MMC operationsSimon Glass2016-07-11-0/+66
| | | | | | | | | | | | The driver model conversion for MMC has moved in small steps. The first step was to have an MMC device (CONFIG_DM_MMC). The second was to use a child block device (CONFIG_BLK). The final one is to use driver model for MMC operations (CONFIG_DM_MMC_OP). Add support for this. The immediate priority is to make all boards that use DM_MMC also use those other two options. This will allow them to be removed. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Move CONFIG_BLK code into the mmc uclassSimon Glass2016-07-11-0/+80
| | | | | | Rather than having #ifdef in mmc.c, move this code into the uclass file. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Implement the MMC functions for block devicesSimon Glass2016-05-17-0/+106
| | | | | | | | Implement the functions in mmc_legacy.c for driver-model block devices, so that MMC can use driver model for these. This allows CONFIG_BLK to be enabled with DM_MMC. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: mmc: Add an MMC uclassSimon Glass2015-07-21-0/+34
Add basic support for MMC, providing a uclass which can set up an MMC device. This allows MMC drivers to move to using driver model. Signed-off-by: Simon Glass <sjg@chromium.org>