- 25 2月, 2013 32 次提交
-
-
由 Lars-Peter Clausen 提交于
Quite a few drivers have a implementation of the get_timeout_clock callback which simply returns the result of clk_get_rate on the device's clock. This patch adds a common implementation of this to the sdhci-pltfm module and replaces all custom implementations with the common one. Signed-off-by: NLars-Peter Clausen <lars@metafoo.de> Tested-by: NStephen Warren <swarren@wwwdotorg.org> Acked-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NKevin Liu <kliu5@marvell.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kevin Liu 提交于
The protocol related code is moved to core stack. So update the host driver accordingly. Signed-off-by: NKevin Liu <kliu5@marvell.com> Tested-by: NTim Wang <wangtt@marvell.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
When switching SD and SDIO cards from 3.3V to 1.8V signal levels, the clock should be gated for 5 ms during the step. After enabling the clock, the host should wait for at least 1 ms before checking for failure. Failure by the card to switch is indicated by dat[0:3] being pulled low. The host should check for this condition and power-cycle the card if failure is indicated. Add a retry mechanism for the SDIO case. If the voltage switch fails repeatedly, give up and continue the initialization using the original voltage. This patch places a couple of requirements on the host driver: 1) mmc_set_ios with ios.clock = 0 must gate the clock 2) mmc_power_off must actually cut the power to the card 3) The card_busy host_ops member must be implemented if these requirements are not fulfilled, the 1.8V signal voltage switch will still be attempted but may not be successful. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Signed-off-by: NKevin Liu <kliu5@marvell.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NWei WANG <wei_wang@realsil.com.cn> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
Allow callers to access the start_signal_voltage_switch host_ops member without going through any cmd11 logic. This is mostly a preparation for the following signal voltage switch patch. Also, reset ios.signal_voltage to its original value if start_signal_voltage_switch fails. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NWei WANG <wei_wang@realsil.com.cn> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
This host_ops member is used to test if the card is signaling busy by pulling dat[0:3] low. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NWei WANG <wei_wang@realsil.com.cn> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
Add mmc_power_cycle which can be used to power cycle for instance SD-cards. Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NWei WANG <wei_wang@realsil.com.cn> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Johan Rudholm 提交于
Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Balaji T K 提交于
SET_BLOCK_COUNT CMD23 is needed for all access to RPMB partition. If block count is not set by CMD23, all subsequent read/write commands fail as per eMMC specification. So, If the host does not support CMD23, do not expose RPMB partition. Accessing RPMB partition can cause hang / huge delay for hosts which do not support CMD23. Signed-off-by: NBalaji T K <balajitk@ti.com> Reported-and-Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Mike Lockwood 提交于
This driver handles the virtual MMC device present in the Goldfish emulator. The patch folds together initial work from Mike Lockwood and patches by San Mehat, Jun Nakajima and Tom Keel <thomas.keel@intel.com> plus cleanups by Alan Cox to get it all into 3.6 shape. Signed-off-by: NMike A. Chan <mikechan@google.com> [cleaned up and x86 support added] Signed-off-by: NSheng Yang <sheng@linux.intel.com> Signed-off-by: NYunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: NXiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: NJun Nakajima <jun.nakajima@intel.com> Signed-off-by: NBruce Beare <bruce.j.beare@intel.com> [Moved to 3.4] Signed-off-by: NTom Keel <thomas.keel@intel.com> [Moved to 3.7] Signed-off-by: NAlan Cox <alan@linux.intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
None of mmc drivers implements bus-width as a required device tree property. Instead, some drivers like atmel-mci, dw_mmc, sdhci-s3c implement it as an optional one, and will force bus width to be 1 when the property is absent. Let's change the common binding to reflect what the drivers are usually doing. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Sascha Hauer 提交于
The i.MX esdhc has a nonstandard bit layout for the SDHCI_HOST_CONTROL register. To support 8bit bus width on i.MX populate the platform_bus_width callback. This is tested on an i.MX25, but should according to the datasheets work on the other i.MX using this hardware aswell. The i.MX6, while having a SDHCI_SPEC_300 controller, still uses the same nonstandard register layout. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Sascha Hauer 提交于
The 8bit in the function name is misleading. When set, it will be used to set the bus width, regardless of whether 8bit or another bus width is requested, so change the function name to platform_bus_width. Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de> Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
SDHCI core will try to use Auto CMD23 for mmc card. Currently, we will see the following message with mmc card on usdhc due to the lacking of Auto CMD23 support in the driver. $ mmc0: new high speed MMC card at address 0001 mmcblk1: mmc0:0001 MMC02G 1.87 GiB mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00 mmcblk1: retrying using single block read mmcblk1: Enable Auto CMD23 support for usdhc so that mmc card can work in multiple block mode. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
It's another violation to SDHC spec that software reset on usdhc does not reset MIX_CTRL register. Have to do it manually, otherwise the preserving of the register bits (e.g. AC23EN) may cause mmc card fail to be initialized. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
The combining of SDHCI_TRANSFER_MODE and SDHCI_COMMAND writes is only required for esdhc, but not necessarily for usdhc. Different from esdhc where the bits for transfer mode and command are all in the same register CMD_XFR_TYP, usdhc has a newly introduced register MIX_CTRL to hold transfer mode bits. So it makes more sense to separate transfer mode from command write for usdhc. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Maya Erez 提交于
Cache control is an eMMC feature and in therefore should be part of MMC's bus resume operations, performed in mmc_suspend, rather than in the generic mmc_suspend_host(). Signed-off-by: NMaya Erez <merez@codeaurora.org> Acked-by: NUlf Hansson <ulf.hansson@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Seungwon Jeon 提交于
Add maintainer entry for the Synopsys DW host driver which is used in various SOC including EXYNOS series. As Will Newton will no longer be able to take care of dw_mmc*, I and Jaehoon Chung are willing to maintain it. Signed-off-by: NSeungwon Jeon <tgih.jun@samsung.com> Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Acked-by: NWill Newton <will.newton@imgtec.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Fabio Estevam 提交于
3f175a6e5 (mmc: sdhci-esdhc-imx: remove ESDHC_CD_GPIO handling from IO accessory) introduced the following build warnings: drivers/mmc/host/sdhci-esdhc-imx.c:149:30: warning: unused variable 'boarddata' [-Wunused-variable] drivers/mmc/host/sdhci-esdhc-imx.c:181:30: warning: unused variable 'boarddata' [-Wunused-variable] Remove the unused variables. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Guennadi Liakhovetski 提交于
The file Documentation/devicetree/bindings/mmc/mmc.txt is common for all MMC host drivers. Use a generic MMC host reference instead of an SDHCI left-over. Signed-off-by: NGuennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
Rename esdhc local definitions with ESDHC_ rather than SDHCI_ prefix, so that we can distinguish them from SDHCI core definitions from name. A couple of bit fields are also changed use shift for consistency and better readability. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
SDHCI_CTRL_D3CD is not a standard SDHCI_HOST_CONTROL, so there is no need to check it in SDHCI_HOST_CONTROL write at all. Remove it. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Tested-by: NDirk Behme <dirk.behme@de.bosch.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
When commit 95a2482a (mmc: sdhci-esdhc-imx: add basic imx6q usdhc support) works around host version issue on imx6q, it gets the register address fixup "reg ^= 2" lost for imx25/35/51/53 esdhc. Thus, the controller version on these SoCs is wrongly identified as v1 while it's actually v2. Add the address fixup back and take a different approach to correct imx6q host version, so that the host version read gets back to work for all SoCs. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Cc: <stable@vger.kernel.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Tony Prisk 提交于
With the __devinit/__devexit attributes having been removed, this __exitp attribute causes an unused function warning and should be removed as well. Signed-off-by: NTony Prisk <linux@prisktech.co.nz> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Doug Anderson 提交于
The original quirk was added in the change 'mmc: dw_mmc: add quirk to indicate missing write protect line'. The original quirk was added at a controller level even though each slot has its own write protect (so the quirk should be at the slot level). A recent change (mmc: dw_mmc: Add "disable-wp" device tree property) added a slot-level quirk and support for the quirk directly to dw_mmc. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NWill Newton <will.newton@imgtec.com> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Doug Anderson 提交于
On some SoCs (like exynos5250) you need to use an external GPIO for write protect. Add support for wp-gpios to the core dw_mmc driver since it could be useful across multiple SoCs. With this change I am able to make use of the write protect for the external SD slot on exynos5250-snow. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Doug Anderson 提交于
The exynos code claimed the write protect with devm_gpio_request() but never did anything with it. That meant that anyone using a write protect GPIO would effectively be write protected all the time. The handling for wp-gpios belongs in the main dw_mmc driver and has been moved there. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Doug Anderson 提交于
The next change will remove the code from the dw_mmc-exynos that added the DW_MCI_QUIRK_NO_WRITE_PROTECT. Keep existing functionality of having no write protect pin on smdk5250 by adding the disable-wp property. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Doug Anderson 提交于
The "disable-wp" property is used to specify that a given SD card slot doesn't have a concept of write protect. This eliminates the need for special case code for SD slots that should never be write protected (like a micro SD slot or a dev board). The dw_mmc driver is special in needing to specify "disable-wp" because the lack of a "wp-gpios" property means to use the special purpose write protect line. On some other mmc devices the lack of "wp-gpios" means that write protect should be disabled. Signed-off-by: NDoug Anderson <dianders@chromium.org> Acked-by: NSeungwon Jeon <tgih.jun@samsung.com> Acked-by: NWill Newton <will.newton@imgtec.com> Acked-by: NOlof Johansson <olof@lixom.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Zhang, YiX X 提交于
The right value is 54 according to eMMC 4.5 specification. Signed-off-by: NZhangYi <yix.x.zhang@intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Fabio Estevam 提交于
Fixes the following warning when building with W=1 option: drivers/mmc/host/mxs-mmc.c: In function 'mxs_mmc_adtc': drivers/mmc/host/mxs-mmc.c:401:2: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] The warning happens because 'i' is used in 'for_each_sg(sgl, sg, sg_len, i)' and should be made unsigned. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Fabio Estevam 提交于
Add an entry for MODULE_ALIAS(). Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Acked-by: NMarek Vasut <marex@denx.de> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Thomas Petazzoni 提交于
On many Marvell SoCs, the pins used for the SDIO interface are part of the MPP pins, that are muxable pins. In order to get the muxing of those pins correct, this commit integrates the mvsdio driver with the pinctrl infrastructure by calling devm_pinctrl_get_select_default() during ->probe(). Note that we permit this function to fail because not all Marvell platforms have yet been fully converted to using the pinctrl infrastructure. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Tested-by: NStefan Peter <s.peter@mpl.ch> Tested-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
- 12 2月, 2013 8 次提交
-
-
由 Thomas Petazzoni 提交于
This patch adds a simple Device Tree binding for the mvsdio driver, as well as the necessary documentation for it. Compatibility with non-DT platforms is preserved, by keeping the platform_data based initialization. We introduce a small difference between non-DT and DT platforms: DT platforms are required to provide a clocks = <...> property, which the driver uses to get the frequency of the clock that goes to the SDIO IP. The behaviour on non-DT platforms is kept unchanged: a clock reference is not mandatory, but the clock frequency must be passed in the "clock" field of the mvsdio_platform_data structure. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Tested-by: NStefan Peter <s.peter@mpl.ch> Tested-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Thomas Petazzoni 提交于
The MMC core subsystem provides in drivers/mmc/core/slot-gpio.c a nice set of helper functions to simplify the management of the card detect GPIO in MMC host drivers. This patch migrates the mvsdio driver to using those helpers, which will make the ->probe() code simpler, and therefore ease the process of adding a Device Tree binding for this driver. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Tested-by: NStefan Peter <s.peter@mpl.ch> Tested-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Thomas Petazzoni 提交于
The MMC core subsystem provides in drivers/mmc/core/slot-gpio.c a nice set of helper functions to simplify the management of the write protect GPIO in MMC host drivers. This patch migrates the mvsdio driver to using those helpers, which will make the ->probe() code simpler, and therefore ease the process of adding a Device Tree binding for this driver. Signed-off-by: NThomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: NAndrew Lunn <andrew@lunn.ch> Tested-by: NStefan Peter <s.peter@mpl.ch> Tested-by: NFlorian Fainelli <florian@openwrt.org> Signed-off-by: NJason Cooper <jason@lakedaemon.net> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Shawn Guo 提交于
With commit 9444e07 (mmc: remove unncessary mmc_gpio_free_cd() call from slot-gpio users) in place, the ESDHC_CD_GPIO handling in IO accessories becomes unnecessary. Remove it. Signed-off-by: NShawn Guo <shawn.guo@linaro.org> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Andy Shevchenko 提交于
There are three places where same piece of code is used. Let's split it to a separate function. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kevin Liu 提交于
[cjb: The MMP3 architecture requires a registered interrupt to retire wfi when waking from suspend.] Signed-off-by: NJialing Fu <jlfu@marvell.com> Signed-off-by: NKevin Liu <kliu5@marvell.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kevin Liu 提交于
Don't disable SD Host IRQ during suspend if it is wake up source. Enable wakeup event during suspend. Signed-off-by: NJialing Fu <jlfu@marvell.com> Signed-off-by: NKevin Liu <kliu5@marvell.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-
由 Kevin Liu 提交于
Current code missed disabling interrupts before free irq which is shared. Notice below comments for function free_irq (kernel/irq/manage.c): On a shared IRQ the caller must ensure the interrupt is disabled on the card it drives before calling this function. Original code has below issue during suspend/resume when multiple SD hosts share the same IRQ: 1. Assume there are two hosts (host1 for emmc while host2 for sd) share the same mmc irq. 2. When system suspend, host2 will be suspended before host1. So the sequence is below: step1: irq handler for host2 removed -> step2: irq handler for host1 removed and irq disabled -> ... system suspended ... ... system resumed ... step3: irq enabled and the irq handler for host1 restored -> step4: irq handler for host2 restored 3. So there is the buggy time slot that the irq is enabled but the irq handler for host2 is removed. Then host2 interrupt can be triggered but can't be handled at that moment. Signed-off-by: NJialing Fu <jlfu@marvell.com> Signed-off-by: NKevin Liu <kliu5@marvell.com> Signed-off-by: NChris Ball <cjb@laptop.org>
-