- 25 4月, 2017 40 次提交
-
-
由 Heiner Kallweit 提交于
We don't need variable cmd_cfg_timeout, so remove it and simplify the code a little. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Centralize setting data->bytes_xfered in one place and make sure that the number of transfererd bytes is set only if we receive the end-of-chain interrupt and there was no error. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Response reading can be slightly improved by doing it in just one place. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Simplify the code by using two variables instead of a struct sd_emmc_desc. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
Replace cmd->data with a local variable to simplify code a little. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 Heiner Kallweit 提交于
The variables holding the configuration bits are zero-initialized. So we can remove all bit resets. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Reviewed-by: NKevin Hilman <khilman@baylibre.com>
-
由 yong mao 提交于
If we don't select a set of better parameters for our emmc host, It may easily occur CMD response CRC error. And also it may cause cannot boot up issue. Fot getting a set of better parameters, our emmc host supports data tune mechanism.Therefore, our emmc driver also should change to use data tune for CMD line. Because our emmc host use the different clock source to sample the CMD signal between HS200 and HS400 mode, the parameters are also different between these two modes. Separate cmd internal delay for HS200/HS400 mode. This change can fix "System can not boot up" issue. Signed-off-by: NYong Mao <yong.mao@mediatek.com> Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 yong mao 提交于
Add description for mediatek,hs200-cmd-int-delay Add description for mediatek,hs400-cmd-int-delay Add description for mediatek,hs400-cmd-resp-sel-rising Signed-off-by: NYong Mao <yong.mao@mediatek.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Heiner Kallweit 提交于
Improve mmc_io_rw_extended a little: - using DIV_ROUND_UP achieves the same but is better readable - simplify code by using sg_set_buf - simplify one statement by using -= operator Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Chris Brandt 提交于
Signed-off-by: NChris Brandt <chris.brandt@renesas.com> Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Masaharu Hayakawa 提交于
Current code gets number of taps only once and keeps the value. This is not correct, we need to obtain it every time before executing tuning, so remove the outer if-block. Signed-off-by: NMasaharu Hayakawa <masaharu.hayakawa.ry@renesas.com> [wsa: extracted from a larger patch and reworded commit message] Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Wolfram Sang 提交于
In the (maybe academical) case, we don't get a DATAEND interrupt after DMA completed, we will wait endlessly for the completion to complete. This is not bad per se, since we have a more generic completion tracking a timeout. In that rare case, however, the DMA buffer will not get unmapped and we have a leak. Reorder the code, so unmapping will always take place. Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
Move a function to avoid having to forward declare it in a subsequent patch. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Add runtime suspend/resume callbacks to match suspend/resume callbacks. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
The suspend / resume callbacks lack the flexibility to allow a device to specify a different function entirely. Change them around so that device functions are called directly and they in turn can call the default implementations if needed. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
It is confusing to have some parts of suspend / resume under conditional compilation and some parts not. Use conditional compilation everywhere. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Do not use suspend/resume callbacks with runtime pm. It doesn't make sense and isn't being used, so remove. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
SDHCI provides more flexibility than simply calling sdhci_add_host(). Make that available by allowing devices to specify their own ->add_host() function. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Add an interrupt hook and helper functions for enabling, disabling and delivering interrupts to a CQE. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Factor out sdhci_set_default_irqs(). Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Add sdhci_cleanup_host() to cleanup __sdhci_add_host(). Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Get rid of unnecessary 'extern' in header file. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Export sdhci_dumpregs so that it can be called by drivers. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Ensure all prints start with the mmc host name, and the text all lines up. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Use sdhci io wrappers consistently. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Add response register to register dump. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Ensure all debug prints start with the mmc host name. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Tuning execution is already synchronized with respect to other host operations by upper layers "claiming" the host, which also takes care of runtime pm. There can be no requests in progress. Retain the spin lock usage only for ensuring that sending tuning commands is synchronized with respect to the interrupt handler. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
The spin lock is not necessary in set_ios. Anything that is racing with changes to the I/O state is already broken. The mmc core already provides synchronization via "claiming" the host. So remove spin_lock and friends from sdhci_set_ios and related callbacks. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Drivers can use the host operation directly, so remove this now unused callback. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Make use of an Intel ACPI _DSM that provides eMMC driver strength. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Make use of an Intel ACPI _DSM that indicates if re-tuning is needed after D3. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Let devices define their own private data to facilitate device-specific operations. The size of the private structure is specified in the sdhci_pci_fixes structure, then sdhci_pci_probe_slot() will allocate extra space for it, and sdhci_pci_priv() can be used to get a reference to it. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
Devices might save and restore tuning values so that re-tuning might not be needed after a pm transition. Let drivers decide by pushing the mmc_retune_needed() logic down to them. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Adrian Hunter 提交于
The delay loops for reset and clock enable always take at least 1 ms because they use mdelay(1). However they can take a lot less time e.g. less than 50us. Use ktime and reduce the delay to 10 microseconds per loop. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NLudovic Desroches <ludovic.desroches@microchip.com>
-
由 Eric Anholt 提交于
The 2835 has two SD controllers: The Arasan sdhci controller (supported by the iproc driver) and a custom sdhost controller. This patch adds a driver for the latter. The sdhci controller supports both sdcard and sdio. The sdhost controller supports the sdcard only, but has better performance. Also note that the rpi3 has sdio wifi, so driving the sdcard with the sdhost controller allows to use the sdhci controller for wifi support. The configuration is done by devicetree via pin muxing. Both SD controller are available on the same pins (2 pin groups = pin 22 to 27 + pin 48 to 53). So it's possible to use both SD controllers at the same time with different pin groups. The code was originally written by Phil Elwell in the downstream Rasbperry Pi tree. In preparation for the upstream merge it was cleaned up and the code base was moderized by Eric Anholt, Stefan Wahren and Gerd Hoffmann. Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NStefan Wahren <stefan.wahren@i2se.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Eric Anholt 提交于
This is the other SD controller on the platform, which can be swapped to the role of SD card host using pin muxing. Signed-off-by: NEric Anholt <eric@anholt.net> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 tcharding 提交于
File contains multiple functions doing variations on the same thing, sdio_readb(), sdio_writeb()f, sdio_readw(), sdio_writew() etc. Although the functions have very similar logic the code is laid out in a variety of ways. This makes it overly complicated to read. There is a already a nice clean chunk of code, if we use this format for all instances then we will have cleaned up the code, reduced the line count and lessened the cognitive load required while reading. Less lines equals less bugs. Pick the most simple and clear code flow and change all functions to be the same. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 tcharding 提交于
Various functions take as parameter an optional pointer. Pointer should be guarded with non-NULL check before dereferencing. Add non-NULL check before dereference of pointer. Signed-off-by: NTobin C. Harding <me@tobin.cc> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Michał Zegan 提交于
This patch fixes the case where meson_mmc_probe function fails before core_clk is enabled. Originally, that would result in a try to disable the core clock, and if it was not already enabled, it would result in a kernel warning. This issue is similar to the one with div_clk. Fix it by introducing another error path used only between successfully enabling the core clock, and successfully enabling the div clock. That would ensure that core clock is disabled only if it was enabled before. Signed-off-by: NMichał Zegan <webczat@webczatnet.pl> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-