summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host
Commit message (Collapse)AuthorAgeFilesLines
* mmc: host: s3cmci: allow probing from device treeSergio Prado2017-04-241-131/+126
| | | | | | | | | | Allows configuring Samsung S3C24XX MMC/SD/SDIO controller using a device tree. Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com> [Arnd: fix broken conditional expression] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-pci: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllersAzhar Shaikh2017-04-241-4/+3
| | | | | | | | | Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-acpi: Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel controllersAzhar Shaikh2017-04-241-4/+2
| | | | | | | | | Set MMC_CAP_AGGRESSIVE_PM for BYT-related Intel SD card controllers. Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: factor out setting response configuration bitsHeiner Kallweit2017-04-241-14/+18
| | | | | | | | | Factor out setting the response configuration bits thus further reducing complexity of function meson_mmc_start_cmd. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: factor out setting block sizeHeiner Kallweit2017-04-241-15/+27
| | | | | | | | | Factor out setting the block size. This also contributes to reducing complexity of function meson_mmc_start_cmd. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-cadence: refactor probe functionPiotr Sroka2017-04-241-1/+1
| | | | | | | | | Use added dev variable for devm_clk_get. Signed-off-by: Piotr Sroka <piotrs@cadence.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-cadence: Update PHY delay configurationPiotr Sroka2017-04-241-7/+46
| | | | | | | | | | DTS properties are used instead of fixed data because PHY settings can be different for different chips/boards. Signed-off-by: Piotr Sroka <piotrs@cadence.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-cadence: Fix writing PHY delayPiotr Sroka2017-04-241-2/+9
| | | | | | | | | Add polling for ACK to be sure that data are written to PHY register. Signed-off-by: Piotr Sroka <piotrs@cadence.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: bcm2835: Fix possible NULL ptr dereference in bcm2835_requestStefan Wahren2017-04-241-1/+2
| | | | | | | | | | | This fixes a NULL pointer dereference in case of a MMC request with a set block count command and no data. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: use new core function mmc_get_dma_dirHeiner Kallweit2017-04-2414-120/+53
| | | | | | | Use new core function mmc_get_dma_dir(). Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: add CMD23 modeHeiner Kallweit2017-04-241-4/+17
| | | | | | | | | | | CMD23 mode (use "set block count" command before transferring multiple data blocks) typically is more performant as host / card know upfront how many data blocks to expect. Therefore add support for this mode to the driver. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: switch to dynamic timeout valuesHeiner Kallweit2017-04-241-1/+13
| | | | | | | | | Currently we use a fixed timeout of 4s for all data transfers. Switch to dynamic timeout values by making use of data->timeout_ns. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: use per port interrupt namesHeiner Kallweit2017-04-241-1/+1
| | | | | | | | | | | So far the driver name is used as interrupt description, therefore in /proc/interrupts it's not possible to tell which interrupt belongs to which port. Change this by switching to NULL what causes the default (device name) to be used. In our case that's the DT node name. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: use bitfield macrosHeiner Kallweit2017-04-241-54/+40
| | | | | | | | | | Use GENMASK consistently for all bit masks and switch to using the bitfield macros FIELD_GET and FIELD_PREP. This hides parts of the complexity of dealing with bit fields. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci: clarify the get_timeout_clock callbackShawn Lin2017-04-244-25/+13
| | | | | | | | | | | | | | | | | | | | Currently the get_timeout_clock callback doesn't clearly have a statement that it needs the variant drivers to return the timeout clock rate in kHz if the SDHCI_TIMEOUT_CLK_UNIT isn't present, otherwise the variant drivers should return it in MHz. It's also very likely that further variant drivers which are going to use this callback will be confused by this situation. Given the fact that moderm sdhci variant hosts are very prone to get the timeout clock from common clock framework (actually the only three users did that), it's more natural to return the value in Hz and we make an explicit comment there. Then we put the unit conversion inside the sdhci core. Thus will improve the code and prevent further misuses. Reported-by: Anssi Hannula <anssi.hannula@bitwise.fi> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sunxi: change controller error info to debug levelIcenowy Zheng2017-04-241-1/+1
| | | | | | | | | | | | | | The controller's errors are usually normal (for example, for MMC or SDIO cards, some errors are expected to happen; and for boards without a dedicated card detect pin the error info will even flood console and hide other normal messages) and hard to understand. Change their print level to debug, thus it won't be shown to generic users. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: simplify setting timeout configuration parametersHeiner Kallweit2017-04-241-6/+5
| | | | | | | | | We don't need variable cmd_cfg_timeout, so remove it and simplify the code a little. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: meson-gx: improve setting data->bytes_xferedHeiner Kallweit2017-04-241-4/+7
| | | | | | | | | | 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: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: meson-gx: improve response readingHeiner Kallweit2017-04-241-4/+3
| | | | | | | | Response reading can be slightly improved by doing it in just one place. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: meson-gx: improve variable usage in meson_mmc_start_cmdHeiner Kallweit2017-04-241-31/+24
| | | | | | | | Simplify the code by using two variables instead of a struct sd_emmc_desc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: meson-gx: replace cmd->data in meson_mmc_start_cmdHeiner Kallweit2017-04-241-12/+13
| | | | | | | | Replace cmd->data with a local variable to simplify code a little. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: meson-gx: remove unneeded configuration bit resetsHeiner Kallweit2017-04-241-5/+0
| | | | | | | | | The variables holding the configuration bits are zero-initialized. So we can remove all bit resets. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@baylibre.com>
* mmc: mediatek: Use data tune for CMD line tuneyong mao2017-04-241-16/+152
| | | | | | | | | | | | | | | | | | | | | 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: Yong Mao <yong.mao@mediatek.com> Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: tmio: always get number of tapsMasaharu Hayakawa2017-04-241-9/+7
| | | | | | | | | | | | 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: Masaharu Hayakawa <masaharu.hayakawa.ry@renesas.com> [wsa: extracted from a larger patch and reworded commit message] Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: tmio: always unmap DMA before waiting for interruptWolfram Sang2017-04-241-2/+5
| | | | | | | | | | | | 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: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: sdhci-pci: Move a function to avoid later forward declarationAdrian Hunter2017-04-241-38/+38
| | | | | | | | | Move a function to avoid having to forward declare it in a subsequent patch. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Add runtime suspend/resume callbacksAdrian Hunter2017-04-242-40/+62
| | | | | | | | Add runtime suspend/resume callbacks to match suspend/resume callbacks. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Let suspend/resume callbacks replace default callbacksAdrian Hunter2017-04-243-72/+104
| | | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Conditionally compile pm sleep functionsAdrian Hunter2017-04-243-0/+14
| | | | | | | | | It is confusing to have some parts of suspend / resume under conditional compilation and some parts not. Use conditional compilation everywhere. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Do not use suspend/resume callbacks with runtime pmAdrian Hunter2017-04-241-12/+0
| | | | | | | | | Do not use suspend/resume callbacks with runtime pm. It doesn't make sense and isn't being used, so remove. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Let devices define how to add the hostAdrian Hunter2017-04-242-1/+5
| | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Add CQE supportAdrian Hunter2017-04-242-3/+146
| | | | | | | | | Add an interrupt hook and helper functions for enabling, disabling and delivering interrupts to a CQE. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Factor out sdhci_set_default_irqsAdrian Hunter2017-04-241-8/+13
| | | | | | | | Factor out sdhci_set_default_irqs(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Add sdhci_cleanup_hostAdrian Hunter2017-04-242-11/+27
| | | | | | | | Add sdhci_cleanup_host() to cleanup __sdhci_add_host(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Get rid of 'extern' in header fileAdrian Hunter2017-04-241-17/+15
| | | | | | | | Get rid of unnecessary 'extern' in header file. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Export sdhci_dumpregsAdrian Hunter2017-04-242-1/+4
| | | | | | | | Export sdhci_dumpregs so that it can be called by drivers. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Improve register dump print formatAdrian Hunter2017-04-241-51/+53
| | | | | | | | Ensure all prints start with the mmc host name, and the text all lines up. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Use sdhci_readl() not readl() in sdhci_dumpregs()Adrian Hunter2017-04-241-5/+5
| | | | | | | | Use sdhci io wrappers consistently. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Add response register to register dumpAdrian Hunter2017-04-241-0/+7
| | | | | | | | Add response register to register dump. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Improve debug print formatAdrian Hunter2017-04-241-16/+12
| | | | | | | | Ensure all debug prints start with the mmc host name. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Reduce spin lock usage in sdhci_execute_tuningAdrian Hunter2017-04-241-22/+14
| | | | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Do not use spin lock in set_ios pathsAdrian Hunter2017-04-247-37/+1
| | | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Remove ->select_drive_strength() callbackAdrian Hunter2017-04-244-42/+0
| | | | | | | | | Drivers can use the host operation directly, so remove this now unused callback. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Use ACPI DSM to get driver strength for some Intel devicesAdrian Hunter2017-04-242-66/+14
| | | | | | | | Make use of an Intel ACPI _DSM that provides eMMC driver strength. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Don't re-tune with runtime pm for some Intel devicesAdrian Hunter2017-04-241-0/+90
| | | | | | | | | Make use of an Intel ACPI _DSM that indicates if re-tuning is needed after D3. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci-pci: Let devices define their own private dataAdrian Hunter2017-04-242-1/+9
| | | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pmAdrian Hunter2017-04-2415-11/+73
| | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: sdhci: Optimize delay loopsAdrian Hunter2017-04-241-10/+9
| | | | | | | | | | 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: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Ludovic Desroches <ludovic.desroches@microchip.com>
* mmc: bcm2835: Add new driver for the sdhost controller.Eric Anholt2017-04-243-0/+1480
| | | | | | | | | | | | | | | | | | | | | | | | | | 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: Eric Anholt <eric@anholt.net> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
* mmc: meson-gx: fix error path when driver initialization fails before ↵Michał Zegan2017-04-241-2/+3
| | | | | | | | | | | | | | | | enabling clocks 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: Michał Zegan <webczat@webczatnet.pl> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
OpenPOWER on IntegriCloud