]> asedeno.scripts.mit.edu Git - linux.git/commit
mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc()
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Wed, 17 Jan 2018 16:28:01 +0000 (01:28 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 18 Jan 2018 08:08:56 +0000 (09:08 +0100)
commit8d09a13386ccdee8fb6d66aa2cfedbbc9255f892
tree6fdde1ef07579de4e1709f2bc14d10299dda8a66
parent659032dcb9f11c3bd2a3a23db76e6a70b3ddec79
mmc: tmio: ioremap memory resource in tmio_mmc_host_alloc()

The register region is ioremap'ed in the tmio_mmc_host_probe(), i.e.
drivers cannot get access to the hardware before mmc_add_host().

Actually, renesas_sdhi_core.c reads out the CTL_VERSION register to
complete the platform-specific settings.  However, at this point,
the MMC host is already running.

Move the register ioremap to tmio_mmc_host_alloc() so that drivers
can perform platform-specific settings between tmio_mmc_host_alloc()
and tmio_mmc_host_probe().

I changed tmio_mmc_host_alloc() to return an error pointer to
propagate the return code from devm_ioremap_resource().

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/tmio_mmc.c
drivers/mmc/host/tmio_mmc_core.c