aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/uniphier-sd.c
AgeCommit message (Collapse)AuthorFilesLines
2016-09-14mmc: uniphier-sd: migrate to CONFIG_BLKMasahiro Yamada1-26/+24
This is the state-of-the-art MMC driver implementation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2016-08-28mmc: uniphier-sd: just return if already set to desired clock rateMasahiro Yamada1-2/+5
With this, we can save unnecessary udelay(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: return error code if unsupported width is givenMasahiro Yamada1-5/+9
With the CONFIG_DM_MMC_OPS migration, the .set_ios callback can return an integer now. Return an appropriate error value rather than sudden death by BUG(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: move uniphier_sd_init() belowMasahiro Yamada1-21/+19
No more reason to define this function above the ops structure. Move it near the caller. Also, change its return type to void because it never fails. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: migrate to CONFIG_DM_MMC_OPSMasahiro Yamada1-47/+50
Catch up with the DM migration. As struct dm_mmc_ops does not have .init callback, call the init function directly from the probe function. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-28mmc: uniphier-sd: add static qualifiers to probe and remove callbacksMasahiro Yamada1-2/+2
They are both only referenced in this file. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-08-05mmc: use the generic error numberJaehoon Chung1-1/+1
Use the generic error number instead of specific error number. If use the generic error number, it can debug more easier. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Minkyu Kang <mk7.kang@samsung.com>
2016-07-24ARM: uniphier: use (devm_)ioremap() instead of map_sysmem()Masahiro Yamada1-4/+3
This does not have much impact on behavior, but makes code look more more like Linux. The use of devm_ioremap() often helps to delete .remove callbacks entirely. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-19clk: convert API to match reset/mailbox styleStephen Warren1-7/+8
The following changes are made to the clock API: * The concept of "clocks" and "peripheral clocks" are unified; each clock provider now implements a single set of clocks. This provides a simpler conceptual interface to clients, and better aligns with device tree clock bindings. * Clocks are now identified with a single "struct clk", rather than requiring clients to store the clock provider device and clock identity values separately. For simple clock consumers, this isolates clients from internal details of the clock API. * clk.h is split so it only contains the client/consumer API, whereas clk-uclass.h contains the provider API. This aligns with the recently added reset and mailbox APIs. * clk_ops .of_xlate(), .request(), and .free() are added so providers can customize these operations if needed. This also aligns with the recently added reset and mailbox APIs. * clk_disable() is added. * All users of the current clock APIs are updated. * Sandbox clock tests are updated to exercise clock lookup via DT, and clock enable/disable. * rkclk_get_clk() is removed and replaced with standard APIs. Buildman shows no clock-related errors for any board for which buildman can download a toolchain. test/py passes for sandbox (which invokes the dm clk test amongst others). Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
2016-05-17dm: mmc: Set up the device pointer when using the MMC uclassSimon Glass1-0/+1
Update the existing drivers to set up this new pointer. This will be required by the MMC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
2016-04-01mmc: uniphier: use devm_get_addr() to get base addressMasahiro Yamada1-3/+6
Currently, fdtdec_get_addr_size() does not support the address translation, so it cannot handle device trees with non-straight "ranges" properties. (This would be a problem with DTS for UniPhier ARMv8 SoCs.) Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-02-29mmc: uniphier: add driver for UniPhier SD/MMC host controllerMasahiro Yamada1-0/+751
Add a driver for the on-chip SD/eMMC host controller used by UniPhier SoC family. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>