mmc: tmio: check ILL_FUNC instead of CBSY
authorShinobu Uehara <shinobu.uehara.xc@renesas.com>
Mon, 25 Aug 2014 03:01:32 +0000 (20:01 -0700)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 5 Dec 2014 01:39:26 +0000 (10:39 +0900)
commit941c6afdc437667d4be1acd290fc1ad22d62535a
tree8749d7955d6a086ac975eda1fc6bc01ced522877
parentcec19e91db4e66ff9a1ccd56815502040e54e1de
mmc: tmio: check ILL_FUNC instead of CBSY

Some controllers need to check SD bus status when writing data.
Then, it checks ILL_FUNC bit on SD_INFO2 register,
and this method is controlled via TMIO_MMC_HAS_IDLE_WAIT flags.
Same method is required on tmio_mmc_data_irq() which will
be called after writing data.

Current driver is checking CBSY bit for this purpose,
but, some controllers doesn't have CBSY bit.
This patch checks ILL_FUNC bit instead of CBSY bit
if it has TMIO_MMC_HAS_IDLE_WAIT flags

[Kuninori Morimoto: tidyuped for upstreaming]

Tested-by: Nguyen Xuan Nui <nx-nui@jinso.co.jp>
Tested-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
(cherry picked from commit 81e888daab027e05130b0459e5d8e0b42dac4323)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/mmc/host/tmio_mmc_pio.c