History log of /drivers/mmc/host/dw_mmc.h
Revision Date Author Comments
0173055842cd1d9ed3984e70891c22dbf2f29372 22-Aug-2014 Doug Anderson <dianders@chromium.org> mmc: dw_mmc: Support voltage changes

For UHS cards we need the ability to switch voltages from 3.3V to
1.8V. Add support to the dw_mmc driver to handle this. Note that
dw_mmc needs a little bit of extra code since the interface needs a
special bit programmed to the CMD register while CMD11 is progressing.
This means adding a few extra states to the state machine to track.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
3a33a94ce27068c8fef63a4f9ab7cff1210e2a4e 05-Aug-2014 Sonny Rao <sonnyrao@chromium.org> mmc: dw_mmc: change to use recommended reset procedure

This patch changes the fifo reset code to follow the reset procedure
outlined in the documentation of Synopsys Mobile storage host databook.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
[sonnyrao: fix compile for !CONFIG_MMC_DW_IDMAC case]
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
9795a846e10b1a4a5675eb257348b88dfda68193 03-Mar-2014 Jaehoon Chung <jh80.chung@samsung.com> mmc: dw_mmc: remove dw_mci_of_cd_gpio/wp_gpio()

If mmc_of_parse() is used, dw_mci_of_get_cd_gpio/wp_gpio didn't need.
Already implemented into mmc_of_parse().

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
370aede6a18a41e01f2668108d847b598443fbc0 25-Feb-2014 Felipe Balbi <balbi@ti.com> mmc: dw_mmc: fix possible build error

Fix the following build errors:

drivers/mmc/host/dw_mmc-k3.c: In function ‘dw_mci_k3_suspend’:
drivers/mmc/host/dw_mmc-k3.c:58:2: error: implicit declaration of
function ‘dw_mci_suspend’ [-Werror=implicit-function-declaration]
ret = dw_mci_suspend(host);
^
drivers/mmc/host/dw_mmc-k3.c: In function ‘dw_mci_k3_resume’:
drivers/mmc/host/dw_mmc-k3.c:76:2: error: implicit declaration of
function ‘dw_mci_resume’ [-Werror=implicit-function-declaration]
return dw_mci_resume(host);
^
drivers/mmc/host/dw_mmc-k3.c: At top level:
drivers/mmc/host/dw_mmc-k3.c:53:12: warning: ‘dw_mci_k3_suspend’ defined
but not used [-Wunused-function]
static int dw_mci_k3_suspend(struct device *dev)
^
drivers/mmc/host/dw_mmc-k3.c:65:12: warning: ‘dw_mci_k3_resume’ defined
but not used [-Wunused-function]
static int dw_mci_k3_resume(struct device *dev)
^

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
5532ec5137f2cfd16c2edda217ad4660ce0d4f2f 25-Feb-2014 Sachin Kamat <sachin.kamat@linaro.org> mmc: dw_mmc: Add missing description

Commit 0976f16d ("mmc: dw_mmc: add support tuning scheme") introduced
the execute_tuning hook but did not add its description for kernel docs.
Update the same.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
f1d2736c815629f3b43d8eebf73a81b581438e65 30-Aug-2013 Seungwon Jeon <tgih.jun@samsung.com> mmc: dw_mmc: control card read threshold

Card Read Threshold should be ensured that the card clock does not stop
in the middle of a block of data being transferred from the card to the
Host. Specially, clock stop is allowed in fast transfer such as HS200
or SDR104 mode. And so, it should be enabled.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
524268990e54dab9bd71a984b70c13ce0eb1c525 30-Aug-2013 Seungwon Jeon <tgih.jun@samsung.com> mmc: dw_mmc: adjust the fifoth with block size

This change helps to choose msize, rx_watermark and tx_watermark
depending on block size for IDMAC mode. For SDIO block size can be
variable, so if these values are set incorrectly, card clock may stop.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
0976f16d2d7fdd3d33738c1f64b83cde6f783db3 30-Aug-2013 Seungwon Jeon <tgih.jun@samsung.com> mmc: dw_mmc: add support tuning scheme

For the speed modes HS200 and SDR104, tuning is needed to determine the
correct sampling point. Actual tuning procedure is provided by specific
host controller driver. This patch defines the tuning command and
tuning data. Additionally, 'struct dw_mci_slot' is moved to header
file to consider the extensive usages in driver.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Alim Akhtar <alim.akhtar@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
eede2111c522264f6260e0a5fb742be31f725a99 12-Jun-2013 Dinh Nguyen <dinguyen@altera.com> mmc: dw_mmc: Add support DW SD/MMC driver on SOCFPGA

Add platform specific functionality for the DW SD/MMC driver for
SoCFPGA. Move SDMMC_CMD_USE_HOLD_REG to dw_mmc.h so other platforms
can use this define.

Signed-off-by: Dinh Nguyen <dinguyen@altera.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com
Signed-off-by: Chris Ball <cjb@laptop.org>
3f7eec62ecb7e30bd2f7e0fc4432d0d08a1aae46 27-May-2013 Jaehoon Chung <jh80.chung@samsung.com> mmc: dw_mmc: change the macro name from DTO to DRTO

At Interrupt status register, Bit9 is Data Read Timeout.
But we used macro name as the DTO. It could be confused with the
Data Transfer Over(DTO)-Bit[3].
It's clearly that is changed the DRTO instead of DTO.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
32d781a310785dcc86c41b6793b2bd4f41015d73 11-Apr-2013 Thomas Abraham <thomas.abraham@linaro.org> mmc: dw_mmc: let device core setup the default pin configuration

With device core now able to setup the default pin configuration,
the pin configuration code based on the deprecated Samsung specific
gpio bindings is removed.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
800d78bfccb3d38116abfda2a5b9c8afdbd5ea21 17-Sep-2012 Thomas Abraham <thomas.abraham@linaro.org> mmc: dw_mmc: add support for implementation specific callbacks

The core dw-mshc controller driver can let platform specific
implementations of the dw-mshc controller to control the hardware
as required by such implementations. This is acheived by invoking
implementation specific (optional) callbacks. Define the list of
callbacks supported the add invocation points for the same.

Signed-off-by: Thomas Abraham <thomas.abraham@linaro.org>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
62ca8034d940439490a450ae7e2b7702591e3192 13-Jan-2012 Shashidhar Hiremath <shashidharh@vayavyalabs.com> mmc: Support of PCI mode in the dw_mmc driver

Support of PCI mode for the dw_mmc driver. This Patch adds the
support for the scenario where the Synopsys Designware IP
is present on the PCI bus. The patch adds the minimal modifications
necessary for the driver to work on PCI platform. Also added separate
files for PCI and PLATFORM modes of operation.

Signed-off-by: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
ee5d19b20a711dca3848450979e3cd20b6b795cc 05-Jan-2012 Jaehoon Chung <jh80.chung@samsung.com> mmc: dw_mmc: fixed wrong bit operation for SDMMC_GET_FCNT()

In status register, fifo_count is bit[29:17].
(0x1FFF is correct)

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
4e0a5adf46ee7810af2e1b7e4e8c2a298652618e 17-Oct-2011 Jaehoon Chung <jh80.chung@samsung.com> mmc: dw_mmc: modify DATA register offset

In dw_mmc 2.40a spec, Data register's offset is changed.
Before we used Data register offset 0x100. but if somebody uses a
2.40a controller, we must use 0x200 for Data register.

This patch adds a version-id checking point and uses SDMMC_DATA(x)
instead of SDMMC_DATA. It assumes 2.40a is the latest version.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
1a5c8e1f4f09e67118f81885a22ceb7bbd2df4ee 29-Aug-2011 Shashidhar Hiremath <shashidharh@vayavyalabs.com> mmc: dw_mmc: Support SDIO interrupts for all slots

The Patch adds the support for SDIO interrupts for all slots.
It includes enabling of SDIO interrupts through dw_mci_enable_sdio_irq
and the handling of the slot specific interrupts in the Interrupt Service
Routine.

Signed-off-by: Shashidhar Hiremath <shashidharh@vayavyalabs.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
b86d825323b4c5d0c406e5b1a85af614acf0cf5a 24-Jun-2011 James Hogan <james.hogan@imgtec.com> mmc: dw_mmc: don't hard code fifo depth, fix usage

The FIFO_DEPTH hardware configuration parameter can be found from the
power-on value of RX_WMark in the FIFOTH register. This is used to
initialise the watermarks, but when calculating the number of free fifo
spaces a preprocessor definition is used which is hard coded to 32.

Fix reading the value out of FIFOTH (the default value in the RX_WMark
field is FIFO_DEPTH-1 not FIFO_DEPTH). Allow the fifo depth to be
overriden by platform data (since a bootloader may have changed FIFOTH
making auto-detection unreliable). Store the fifo_depth for later use.
Also fix the calculation to find the number of free bytes in the fifo to
include the fifo depth in the left shift by the data shift, since the
fifo depth is measured in fifo items not bytes.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
892b1e312b179139026e366a9d70065a7f897dbc 24-Jun-2011 James Hogan <james.hogan@imgtec.com> mmc: dw_mmc: brackets in register access macros

Add brackets around use of the dev argument to the
mci_{read,write}{w,l,q}() macros, for extra safety.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
41babf753cc82ab6208903625a084bf305c32d06 24-Feb-2011 Jaehoon Chung <jh80.chung@samsung.com> mmc: dw_mmc: support DDR mode

This patch adds DDR mode support to dw_mmc.

If we set any bit in UHS_REG bit[16:31], the card of that slot is
supported for DDR mode. For example, if UHS_REG[16] is set, card
number 0 is DDR mode.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
f95f3850f7a9e1d49ebc5b6e72e7cc3ec3685b0b 02-Jan-2011 Will Newton <will.newton@gmail.com> mmc: dw_mmc: Add Synopsys DesignWare mmc host driver.

This adds the mmc host driver for the Synopsys DesignWare mmc
host controller, found in a number of embedded SoC designs.

Signed-off-by: Will Newton <will.newton@imgtec.com>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Reviewed-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>