aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_pio.c
Commit message (Collapse)AuthorAgeFilesLines
* mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handlingGuennadi Liakhovetski2011-06-251-2/+2
| | | | | | | | | | Commit b6147490e6aac82 ("mmc: tmio: split core functionality, DMA and MFD glue") broke handling of the TMIO_MMC_WRPROTECT_DISABLE flag by the tmio-mmc driver. This patch restores the original behaviour. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: <stable@kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: runtime suspend the controller, where possibleGuennadi Liakhovetski2011-05-241-6/+58
| | | | | | | | | | | The TMIO MMC controller cannot be powered off to save power, when no card is plugged in, because then it will not be able to detect a new card-insertion event. On some implementations, however, it is possible to switch to using another source to detect card insertion. This patch adds support for such implementations. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio/sdhi: break out interrupt request/freeMagnus Damm2011-05-241-15/+2
| | | | | | | | | | | | | Move request_irq()/free_irq() from the shared code in tmio_mmc.c into the SDHI/tmio specific portion in sh_mobile_sdhi.c and tmio_mmc_pio.c. This is ground work to allow us to adjust the SDHI code with IRQ flags and number of interupt sources. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: protect the tmio_mmc driver against a theoretical raceGuennadi Liakhovetski2011-05-241-6/+56
| | | | | | | | | | The MMC subsystem does not guarantee, that host driver .request() and .set_ios() callbacks are serialised. Such concurrent calls, however, do not have to be meaningfully supported, drivers just have to make sure to avoid any severe problems. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: Add runtime and system-wide PM to the TMIO MMC driverGuennadi Liakhovetski2011-05-241-3/+54
| | | | | | | | | | | Add runtime and system-wide power management to the TMIO MMC driver in PIO and DMA modes, allowing it to properly save and restore its state during system suspend. Runtime PM is very crude ATM, because the controller has to be powered on all the time to detect card hotplug events. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: fix .set_ios(MMC_POWER_UP) handlingGuennadi Liakhovetski2011-04-271-5/+5
| | | | | | | | | The aggressive clock gating for TMIO MMC patch has broken switching interface power on, using MFD or platform callbacks. Restore the ios->power_mode == MMC_POWER_UP && ios->clock == 0 case handling. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Chris Ball <cjb@laptop.org>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* mmc: tmio_mmc: Move some defines into a shared headerSimon Horman2011-03-261-20/+1
| | | | | | | | | | | | Also add TMIO_BBS. This allows these defines to also be used by zboot. Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: support aggressive clock gatingGuennadi Liakhovetski2011-03-251-9/+8
| | | | | | Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: fix power-mode interpretationGuennadi Liakhovetski2011-03-251-5/+5
| | | | | | | | | | The power-mode sequence on MMC is MMC_POWER_OFF -> MMC_POWER_UP -> MMC_POWER_ON and not MMC_POWER_ON -> MMC_POWER_UP, as the driver currently is implying. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: remove work-around for unmasked SDIO interruptsGuennadi Liakhovetski2011-03-251-21/+2
| | | | | | | | | | | | | SDIO IRQs got unmasked on sh-mobile while writing to the CTL_CLK_AND_WAIT_CTL register, because that register at address 0x138 is not implemented on those SoCs and writes to it overwrite the register at address 0x38: CTL_SDIO_IRQ_MASK. Previous patches eliminated access to register above 0xff on sh-mobile, so that this work-around isn't needed anymore. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: only access registers above 0xff, if availableGuennadi Liakhovetski2011-03-251-6/+19
| | | | | | | | | | | Not all tmio implementations have registers above oxff. Accessing them on thise platforms is dangerous. In some cases it leads to address wrapping to addresses below 0x100, which corrupts random unrelated registers. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>
* mmc: tmio: split core functionality, DMA and MFD glueGuennadi Liakhovetski2011-03-251-0/+923
TMIO MMC chips contain an SD / SDIO IP core from Panasonic, similar to the one, used in MN5774 and other MN57xx controllers. These IP cores are included in many multifunction devices, in sh-mobile chips from Renesas, in the latter case they can also use DMA. Some sh-mobile implementations also have some other specialities, that MFD-based solutions don't have. This makes supporting all these features in a monolithic driver inconveniet and error-prone. This patch splits the driver into 3 parts: the core, the MFD glue and the DMA support. In case of a modular build, two modules will be built: mmc_tmio_core and mmc_tmio. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Acked-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Chris Ball <cjb@laptop.org>