History log of /include/linux/mfd/tmio.h
Revision Date Author Comments
bbf0208d39121bd8873b032459cb2b5f35e14593 09-Sep-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> mmc: use .multi_io_quirk on tmio_mmc

Now, tmio_mmc can use .multi_io_quirk callback
instead of MMC_CAP2_NO_MULTI_READ flags.
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
da29fe2bf573f0ae56fdc2e790387cb73fc8c6f8 25-Aug-2014 Shinobu Uehara <shinobu.uehara.xc@renesas.com> mmc: tmio: add actual clock support as option

Some controller is supporting actual clock on SD_CLK_CTRL :: DIV[7:0].
Renesas SH-Mobile SDHI doesn't support,
but, Renesas R-Car SDHI supports it.
This patch adds new TMIO_MMC_CLK_ACTUAL flag for it.

[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>
e85dd04ea8c8d32ba8eae278959d28df34338e9d 25-Aug-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> mmc: tmio: remove Renesas specific #ifdef

This patch adds new TMIO_MMC_HAVE_CTL_DMA_REG flag,
and remove Renesas specific #ifdef from tmio driver

Tested-by: Nguyen Xuan Nui <nx-nui@jinso.co.jp>
Tested-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
6b98757e53cb0e93b02db4067c14afcb32c90615 25-Aug-2014 Shinobu Uehara <shinobu.uehara.xc@renesas.com> mmc: tmio: add TMIO_MMC_SDIO_STATUS_QUIRK

Renesas R-Car SDHI should set reserved bits
on CTL_SDIO_STATUS register when writing.
This patch adds new TMIO_MMC_SDIO_STATUS_QUIRK flags
for this purpose

[Kuninori Morimoto: tidyuped for upstreaming
enabled this flags for all SH-Mobile/R-Car]

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>
b8d11962c2d83c984d5afd091e5b725ad2fd5607 25-Aug-2014 Shinobu Uehara <shinobu.uehara.xc@renesas.com> mmc: tmio: control multiple block transfer mode

Renesas SDHI has "Multiple Block Transfer Mode" settings
on SD_CMD register which controls CMD12 automatically.

This patch cares it, because
CMD12 is not needed when CMD53 (= SD_IO_RW_EXTENDED)

[Kuninori Morimoto: tidyuped for upstreaming
enabled this flags for all SH-Mobile/R-Car]

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>
384b2cbd56a02efb16358ed7c0c039e4afca5ed0 25-Aug-2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> mmc: tmio: care about DMA tx/rx addr offset

Basically, SD_BUF0 Tx/Rx addresses are same
in normal TMIO controller,
but, it is different on Renesas R-Car SDHI controller
if it uses DMAC
(Rx address needs to add 0x2000 to Tx address)

This patch adds new .dma_rx_offset and cares it

Tested-by: Nguyen Xuan Nui <nx-nui@jinso.co.jp>
Tested-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
5d60e500541ed154112809627f12d86056ac5f09 20-Nov-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> mmc: tmio: add new TMIO_MMC_HAVE_HIGH_REG flags

The accessibility checking method to the higher register was added by
69d1fe18e92afb (mmc: tmio: only access registers above 0xff, if available)
But, it doesn't care 32bit register. It is impossible to calculate it
from the resource size, since there is 16/32 bit register IP (e.g. VERSION
is located on 0xe2 if 16bit register, but it is located on 0x1c4 if 32bit
register).

This patch adds new TMIO_MMC_HAVE_HIGH_REG flags, tmio_mmc driver has it,
and sh_mobile_sdhi doesn't have it today.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
3b159a6e955c8d468f4ffa212c8b5d68d8323a8d 20-Nov-2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> mmc: tmio: bus_shift become tmio_mmc_data member

.bus_shift is used to 16/32bit register access offset calculation on
tmio driver. tmio_mmc_xxx is used from Toshiba/Renesas now, but this
bus_shift value depends on HW IP. This patch moves .bus_shift to
tmio_mmc_data member and sets it on each driver.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
9d731e7539713acc0ec7b67a5a91357c455d2334 06-Sep-2013 Chris Ball <cjb@laptop.org> Revert "mmc: tmio-mmc: Remove .set_pwr() callback from platform data"

This reverts commit 3af9d15c719017feb63fa99f89ac6009a5a3d467, which
causes a build failure:

drivers/mfd/asic3.c:724:2: error: unknown field 'set_pwr' specified in initializer
3af9d15c719017feb63fa99f89ac6009a5a3d467 08-Aug-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> mmc: tmio-mmc: Remove .set_pwr() callback from platform data

The .set_pwr() callback isn't used anymore as all platforms register
GPIO-controlled regulators. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
2b63b341d42cd64ff40062447320d46cf3e7f0bb 08-Aug-2013 Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> mmc: tmio-mmc: Remove .get_cd() callback from platform data

All platforms pass the CD GPIO number to the driver in the .cd_gpio
field. The .get_cd() callback isn't used anymore, remove it

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
eec95ee22611f2207bd991d63a07884de28e6f56 26-Apr-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: sdhi/tmio: switch to using dmaengine_slave_config()

This removes the deprecated use of the .private member of struct dma_chan
and switches the sdhi / tmio mmc driver to using the
dmaengine_slave_config() channel configuration method.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
03a0675b2a112038a8a5078d8815e3f7356c7064 26-Apr-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: sdhi/tmio: make DMA filter implementation specific

So far only the SDHI implementation uses TMIO MMC with DMA. That way a DMA
channel filter function, defined in the TMIO driver wasn't a problem.
However, such a filter function is DMA controller specific. Since the SDHI
glue is only running on systems with the SHDMA DMA controller, the filter
function can safely be provided by it. Move it into SDHI.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
27902c14aa2376d53755b6c02e3be671fd890e30 15-Feb-2013 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio: remove unused and deprecated symbols

The tmio_mmc_cd_wakeup() inline function has been deprecated since 3.4 and
is unused since 3.4 too. Remove them.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
02cb3221d5bb351ad9f7469453dcca7594a0fabf 23-May-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio: support caps2 flags

Allow tmio mmc glue drivers to pass mmc_host::caps2 flags down to
the mmc layer.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
8c102a964655b1a8df41b1f9e2355657471a45e3 20-Jun-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio: add callbacks to enable-update and disable the interface clock

Every time the clock is enabled after possibly being disabled, we have
to re-read its frequency and update our configuration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
c391e1b9ebfe31514fa95a0cdd30c2cbc9652c89 09-Feb-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio_mmc: power status flag doesn't have to be exposed in platform data

The controller power status flag does not have to be accessed from the
hot-plug detection code any more, it can now be removed from the platform
data and put in the controller private struct.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
c8be24c2afd3ed2445bbf8f542af35a9787fc0e8 09-Feb-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio_mmc: support the generic MMC GPIO card hotplug helper

If the platform specifies the TMIO_MMC_HAS_COLD_CD flag, use the generic
MMC GPIO card hotplug helper.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
973ed3af1a570612771ed10dec6506c757767668 21-Jun-2011 Simon Horman <horms@verge.net.au> mmc: sdhi: Add write16_hook

Some controllers require waiting for the bus to become idle
before writing to some registers. I have implemented this
by adding a hook to sd_ctrl_write16() and implementing
a hook for SDHI which waits for the bus to become idle.

Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Magnus Damm <magnus.damm@gmail.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Chris Ball <cjb@laptop.org>
7311bef0697bcfbbcb898c3c22e61e23f203ae9d 11-May-2011 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio: runtime suspend the controller, where possible

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>
845ecd20239c28e97e766ff54078a58be19f3a91 28-Dec-2010 Arnd Hannemann <arnd@arndnet.de> mmc: tmio_mmc: implement SDIO IRQ support

This patch implements SDIO IRQ support for mfds which
announce the TMIO_MMC_SDIO_IRQ flag for tmio_mmc.
If MMC_CAP_SDIO_IRQ is also set SDIO IRQ signalling is activated.
Tested with a b43-based wireless SDIO card and sh_mobile_sdhi.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
93173054f2979de41b1912b19f0b57edfb35fcdc 22-Dec-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: tmio_mmc: implement a bounce buffer for unaligned DMA

For example, with SDIO WLAN cards, some transfers happen with buffers at
odd addresses, whereas the SH-Mobile DMA engine requires even addresses
for SDHI. This patch extends the tmio driver with a bounce buffer, that
is used for single entry scatter-gather lists both for sending and
receiving. If we ever encounter unaligned transfers with multi-element
sg lists, this patch will have to be extended. For now it just falls
back to PIO in this and other unsupported cases.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
f1334fb3c3006ba109886158c0ad79512f928bc1 30-Aug-2010 Yusuke Goda <yusuke.goda.sx@renesas.com> mmc: Allow 2 byte requests in 4-bit mode for tmio_mmc

Adjust the tmio_mmc block size check to accept 2-byte requests in 4-bit
mode if the hardware supports it.

Tested with the SDHI hardware block included in sh7724.

Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Signed-off-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Magnus Damm <damm@opensource.se>
Tested-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
19ca7502c508595edfb963e5dbcf62854a926506 24-Aug-2010 Arnd Hannemann <arnd@arndnet.de> mmc: Allow the tmio_mmc mfd driver to specify get_cd handler

Some controllers, supported by the tmio_mmc driver do not have the card
detect pin of a slot connected, so that polling needs to be used and
card detection is handled by other means.
This patch exposes a get_cd hook for that purpose.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
a2b14dc9615c215a8cf4f2041f6c0c3fff5fc486 19-May-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: let MFD's provide supported Vdd card voltages to tmio_mmc

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
ac8fb3e8627d5494f3d2221925a82be4c1778b0e 19-May-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> tmio: add a platform flag to disable card write-protection detection

Write-protection status is not always available, e.g., micro-SD cards do not
have a write-protection switch at all. This patch adds a flag to let platforms
force tmio_mmc to consider the card writable.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
42a4533976d922ff3272fad17dd52fe3682899dd 19-May-2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de> mmc: prepare tmio_mmc for passing of DMA configuration from the MFD cell

After this patch, if the "dma" pointer in struct tmio_mmc_data is not NULL, it
points to a struct, containing two tokens, that have to be passed to the
dmaengine driver for channel configuration.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
707f0b2fbc65876e8abd94d26d8d0620600c05d4 17-Feb-2010 Magnus Damm <damm@opensource.se> tmio_mmc: Remove const from platform data V3

Remove const from the tmio-mmc platform data hclk V3.
This change makes it possible to remove the type cast
from the sh_mobile_sdhi driver which is using the clock
framework to get the clock rate.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
b741d440a97c376af309e902eeb2f3c5673d2c92 17-Feb-2010 Yusuke Goda <goda.yusuke@renesas.com> tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2

Enable MMC_CAP_XX support in the tmio_mmc driver if
pdata->capabilities is set.

Signed-off-by: Yusuke Goda <goda.yusuke@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
64e8867ba8098b69889c1af94997a5ba2348fb26 06-Jan-2010 Ian Molton <ian@mnementh.co.uk> mfd: tmio_mmc hardware abstraction for CNF area

This patch abstracts out the CNF area code from tmio_mmc which
is not present in all hardware that can use this driver. This
is required so that we can support non-toshiba based hardware.

ASIC3 support by Philipp Zabel

Signed-off-by: Ian Molton <ian@mnementh.co.uk>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
4d3792e054f706f73837769a0e5607b3b7ad25a2 15-Jun-2009 Samuel Ortiz <sameo@linux.intel.com> mfd: fix tmio related warnings

We can not have .driver_data as const since platform_set_drvdata() doesnt take
a const.
The hclk mmc_data field can be const though.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
f0e46cc4971f6be96010d9248e0fc076b229d989 04-Jun-2009 Philipp Zabel <philipp.zabel@gmail.com> MFD,mmc: tmio_mmc: make HCLK configurable

The Toshiba parts all have a 24 MHz HCLK, but HTC ASIC3 has a 24.576 MHz HCLK
and AMD Imageon w228x's HCLK is 80 MHz. With this patch, the MFD driver
provides the HCLK frequency to tmio_mmc via mfd_cell->driver_data.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Acked-by: Ian Molton <ian@mnementh.co.uk>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
b53cde3557b8f97e6a635782875d442551a89bf1 16-Oct-2008 Dmitry Baryshkov <dbaryshkov@gmail.com> fbdev: add new TMIO framebuffer driver

Add driver for TMIO framebuffer cells as found e.g. in Toshiba TC6393XB
chips.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Cc: Ian Molton <spyro@f2s.com>
Acked-by: Samuel Ortiz <sameo@openedhand.com>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
d3a2f71853ce543c5515d4982e202751e15b0b6d 31-Jul-2008 Ian Molton <spyro@f2s.com> mfd: TMIO MMC structures and accessors.

Signed-off-by: Ian Molton <spyro@f2s.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
f024ff10b1ab13da4d626366019fd05c49721af7 27-Jun-2008 Dmitry Baryshkov <dbaryshkov@gmail.com> [ARM] 5128/1: tc6393xb: tmio-nand support

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>