aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc
AgeCommit message (Collapse)AuthorFilesLines
2017-08-30mmc: sh_mmcif: constify mmc_host_ops structuresJulia Lawall1-1/+1
The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: moxart: constify mmc_host_ops structuresJulia Lawall1-1/+1
The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: davinci: constify mmc_host_ops structuresJulia Lawall1-1/+1
The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: s3cmci: constify mmc_host_ops structuresJulia Lawall1-1/+1
The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: wmt-sdmmc: constify mmc_host_ops structuresJulia Lawall1-1/+1
The mmc_host_ops structure is only stored in the ops field of an mmc_host structure, which is declared as const. Thus the mmc_host_ops structure itself can be const. Done with the help of Coccinelle. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct mmc_host_ops i@p = { ... }; @ok1@ struct mmc_host *mmc; identifier r.i; position p; @@ mmc->ops = &i@p @bad@ position p != {r.p,ok1.p}; identifier r.i; struct mmc_host_ops e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct mmc_host_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30sdhci: pci: Fix up power if device has ACPI companionAndy Shevchenko1-0/+20
Fix up a power state in case PCI device has an ACPI companion. Do it only for Intel Merrifield for now. This is almost copy'n'paste of part of sdhci_acpi_probe() and might be split out to a helper function in the future. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30sdhci: acpi: Use new method to get ACPI companionAndy Shevchenko1-2/+2
ACPI_COMPANION() macro reduces a code to get a companion device out of struct device. Use it instead of an old method. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-xenon: ignore timing DDR52 in tuningZhoujie Wu1-1/+2
Emmc DDR52 mode uses fixed delay, return earlier if timing is MMC_TIMING_MMC_DDR52 in execute tuning function. Signed-off-by: Zhoujie Wu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tegra: explicitly request exclusive reset controlPhilipp Zabel1-1/+2
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Adrian Hunter <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sunxi: explicitly request exclusive reset controlPhilipp Zabel1-1/+2
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Ulf Hansson <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Cc: [email protected] Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-st: explicitly request exclusive reset controlPhilipp Zabel1-1/+1
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Patrice Chotard <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: [email protected] Signed-off-by: Philipp Zabel <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: dw_mmc: explicitly request exclusive reset controlPhilipp Zabel1-1/+1
Commit a53e35db70d1 ("reset: Ensure drivers are explicit when requesting reset lines") started to transition the reset control request API calls to explicitly state whether the driver needs exclusive or shared reset control behavior. Convert all drivers requesting exclusive resets to the explicit API call so the temporary transition helpers can be removed. No functional changes. Cc: Jaehoon Chung <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: [email protected] Signed-off-by: Philipp Zabel <[email protected]> Reviewed-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: Convert to using %pOF instead of full_nameRob Herring3-10/+8
Now that we have a custom printf format specifier, convert users of full_name to use %pOF instead. This is preparation to remove storing of the full path string for each node. Signed-off-by: Rob Herring <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Ludovic Desroches <[email protected]> Cc: Jan Glauber <[email protected]> Cc: David Daney <[email protected]> Cc: "Steven J. Hill" <[email protected]> Cc: [email protected] Acked-by: David Daney <[email protected]> Tested-by: Steven J. Hill <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30MMC: Remove HIGHMEM dependency from mmc-spi driverIan Molton1-1/+1
I cannot see why this is needed. kmap() should be safe in this case. Signed-off-by: Ian Molton <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: host: via-sdmmc: constify pci_device_id.Arvind Yadav1-1/+1
pci_device_id are not supposed to change at runtime. All functions working with pci_device_id provided by <linux/pci.h> work with const pci_device_id. So mark the non-const structs as const. File size before: text data bss dec hex filename 6952 880 0 7832 1e98 drivers/mmc/host/via-sdmmc.o File size After adding 'const': text data bss dec hex filename 7032 800 0 7832 1e98 drivers/mmc/host/via-sdmmc.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci: remove CONFIG_MMC_DEBUG from the driverShawn Lin1-8/+7
sdhci uses CONFIG_MMC_DEBUG for showing ADMA descriptor when occurring ADMA error. And it's also used to dump the registers whenever calling sdhci_add_host. On one hand, I don't see any burden to always print the state ADMA descriptor as it's rare and will help folks better understand what was happening when seeing ADMA error. On the other, folks may be interested in checking some registers at probe time. So we remove the sdhci_dumpregs from __sdhci_add_host and print some really useful registers in sdhci_setup_host. Suggested-by: Adrian Hunter <[email protected]> Signed-off-by: Shawn Lin <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: wbsd: remove CONFIG_MMC_DEBUG from the driverShawn Lin1-2/+0
wbsd only use this to print some unsupported command. However the pr_warn should be enough for dynamic log control and CONFIG_MMC_DEBUG seems bogus here. Remove it. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: Kconfig: downgrade CONFIG_MMC_DEBUG for host drivers onlyShawn Lin3-9/+9
We have removed all code depending on CONFIG_MMC_DEBUG from mmc core now. So it's safe to make CONFIG_MMC_DEBUG just for host drivers only and we expect to kill this option in the future. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: core: turn the pr_info under CONFIG_MMC_DEBUG into pr_debugShawn Lin1-9/+4
There are lots of debug message in core.c which use pr_debug for better dynamic log level control. So it doesn't make sense for those print to still keep working only under CONFIG_MMC_DEBUG. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: core: always check the length of sglist with total data sizeShawn Lin1-6/+3
All the check within mmc_mrq_prep seems to be all-or-none proposition, so it doesn't make sense to only check the length of sglist only under the CONFIG_MMC_DEBUG context. I'd prefer to always keep the check there unconditionally. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: core: remove check of host->removed for rescan routineShawn Lin1-13/+0
The intention of this check was to prevent the conflict between hotplug and removing driver for whatever reason. Currently it doesn't improve anything and the following rescan process could still saftly perform the scan flow. So these code seems pointless now and let's remove them. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-acpi: remove unused struct sdhci_host variableShawn Lin1-3/+0
It was never used and introduce a warning drivers/mmc/host/sdhci-acpi.c: In function 'sdhci_acpi_sdio_probe_slot': drivers/mmc/host/sdhci-acpi.c:297:21: warning: variable 'host' set but not used [-Wunused-but-set-variable] Signed-off-by: Shawn Lin <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-of-arasan: use io functions from sdhci.hJean-Francois Dagenais1-2/+2
This increases consistency of the code across the sdhci family. Signed-off-by: Jean-Francois Dagenais <[email protected]> Acked-by: Adrian Hunter <[email protected]> Reviewed-by: Shawn Lin <[email protected]> Tested-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: atmel-mci: add missing of_node_putJulia Lawall1-0/+1
for_each_child_of_node performs an of_node_get on each iteration, so a break out the loop requires an of_node_put. The semantic patch that fixes this problem is as follows (http://coccinelle.lip6.fr): // <smpl> @@ local idexpression n; expression e,e1; iterator name for_each_child_of_node; @@ for_each_child_of_node(e1,n) { ... ( of_node_put(n); | e = n | + of_node_put(n); ? break; ) ... } ... when != n // </smpl> Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-of-at91: set clocks and presets after resume from deepest PMQuentin Schulz1-2/+30
This adds deepest (Backup+Self-Refresh) PM support to the ATMEL SAMA5D2 SoC's SDHCI controller. When resuming from deepest state, it is required to restore preset registers as the registers are lost since VDD core has been shut down when entering deepest state on the SAMA5D2. The clocks need to be reconfigured as well. The other registers and init process are taken care of by the SDHCI core. Signed-off-by: Quentin Schulz <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-of-at91: factor out clks and presets settingQuentin Schulz1-65/+82
The setting of clocks and presets is currently done in probe only but once deep PM support is added, it'll be needed in the resume function. Let's create a function for this setting. Signed-off-by: Quentin Schulz <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Acked-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: atmel-mci: remove unused sg_len variableShawn Lin1-3/+2
We got a warning: drivers/mmc/host/atmel-mci.c:1086:15: warning: variable 'sg_len' set but not used [-Wunused-but-set-variable] Ideally we should check to see if sg_len is zero but looking into the code closely, I didn't find any possible to do that as atmci_start_request didn't even deploy any error handling for its host->prepare_data hook. So even we return error value for iflags like what other host drivers did, for instance, sdhci and dwmmc, it still need some extra work to improve the code. Just remove it to silent the warning, although it isn't perfect. Signed-off-by: Shawn Lin <[email protected]> Acked-by: Ludovic Desroches <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-xenon: remove pointless struct xenon_priv *privShawn Lin1-2/+0
It was never used and leave a long standing compile warning: drivers/mmc/host/sdhci-xenon.c: In function 'xenon_probe': drivers/mmc/host/sdhci-xenon.c:447:21: warning: variable 'priv' set but not used [-Wunused-but-set-variable] Remove it to fix the warning. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: block: remove unused struct mmc_card *cardShawn Lin1-2/+0
It was never used and introduced a long standing compile warning: drivers/mmc/core/block.c: In function 'power_ro_lock_store': drivers/mmc/core/block.c:191:19: warning: variable 'card' set but not used [-Wunused-but-set-variable] Remove it to fix the warning. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: mxcmmc: check the return value of mxcmci_finish_dataShawn Lin1-0/+3
We got a compile warning for mxcmmc, drivers/mmc/host/mxcmmc.c: In function 'mxcmci_data_done': drivers/mmc/host/mxcmmc.c:661:6: warning: variable 'data_error' set but not used [-Wunused-but-set-variable] The easiest method is to remove the data_error. But looking into the code closely, I think we should check the return value of mxcmci_finish_data as if it got data->error(the same as data_error), we shouldn't try to read the response. Signed-off-by: Shawn Lin <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: mmc_ops: fix a typo for comment of mmc_start_bkopsShawn Lin1-1/+1
Just a trivial fix for that found by reading the code. Signed-off-by: Shawn Lin <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: mediatek: add ops->get_cd() supportChaotian Jing1-0/+1
if user plug out sd card slowly, finally card is plugged out but cat /proc/partitions can find that card is still exist in kernel. that's because alougth get card detect interrupt but CMD13 still can get correct response(all other pins are connected expect card detect pin). add ops->get_cd() can avoid this issue. Signed-off-by: Chaotian Jing <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: rtsx_usb_sdmmc: make array 'width' static constColin Ian King1-1/+1
array width is on-stack and not modified and should be made static const. Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: renesas_sdhi_core: on R-Car 2+, make use of CBSY bitWolfram Sang1-5/+12
Most registers need to wait until the command is completed, not necessarily until the bus is free. At least, R-Car 2+ SoCs can signal that via the CBSY bit, so let's use it there instead of SCLKDIVEN to save a little bit of delay. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio: don't wait on R-Car2+ when handling the clockWolfram Sang1-2/+8
Our hardware engineers confirmed that it is unnecessary to wait when turning the clock on/off. The documentation was a tad vague, so we used to play safe. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio: no magic values when enabling DMAWolfram Sang2-1/+4
Use a proper define. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio: add references to bit defines in the headerWolfram Sang1-0/+2
When defining bits, make sure we always have a reference to the register they belong to. For now, renaming all bits properly seems too intrusive, so at least make sure we have proper documentation. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio: remove obsolete TMIO_BBSWolfram Sang1-2/+0
Since commit 10c7fcbd0f00a0 ("ARM: shmobile: sh7372: Remove ZBOOT MMC/SDHI support"), this define is not needed anymore. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio: fix CMD12 (STOP) handlingWolfram Sang1-6/+0
I always anticipated this code to be not correct, but now I had a test case to prove it. According to all documentation I have, setting the TMIO_STOP_STP bit ever only worked during block transfers. This bit is like manually enforcing an autocmd12 during a so far seamless transfer. It does NOT work when the block transfer had errors. It also does NOT work with any other cmd except block commands. For all those, CMD12 has to be treated like any other command. So, basically, we could use this bit only for mrq->data->stop cmds. But for these, we happily use the autocmd12 feature using the TMIO_STOP_SEC bit. As a result, the above bit is not useful for us and we need to treat CMD12 as a regular cmd always. Just remove the special handling code. Note that the BSP recognized this issue as well yet had a more cautious solution to the problem [1]. Which is understandable but makes CMD12 handling even more complicated. Checked with a Renesas Salvator-X/M3-W which needed to send CMD12 when retuning one of my SD cards. [1] https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas-bsp.git/commit/?id=2838a2ff8ca776f6d18b7fbbe75f3df8dd64183a Signed-off-by: Wolfram Sang <[email protected]> Tested-by: Jan Klötzke <[email protected]> Tested-by: Nguyen Viet Dung <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: mxcmmc: fix error return code in mxcmci_probe()Gustavo A. R. Silva1-2/+4
platform_get_irq() returns an error code, but the mxcmmc driver ignores it and always returns -EINVAL. This is not correct, and prevents -EPROBE_DEFER from being propagated properly. Print error message and propagate the return value of platform_get_irq on failure. Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: android-goldfish: remove logically dead code in goldfish_mmc_irq()Gustavo A. R. Silva1-6/+2
Local variable transfer_error is assigned to a constant value and it is never updated again. Remove this variable and the dead code it guards. Addresses-Coverity-ID: 1222110 Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-st: add FSP2(ppc476fpe) into depends for sdhci-stIvan Mikhaylov1-1/+1
shdci-st driver can be used for ppc476 fsp2 soc. Signed-off-by: Ivan Mikhaylov <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: omap_hsmmc: Reduce max_segs for reliabilityWill Newton1-3/+3
Reduce max_segs to 64, a value that allows allocation of an entire EDMA descriptor list within a single page - EDMA descriptors are 40 bytes and the header is much larger. This avoids doing a higher order GFP_ATOMIC allocation in edma_prep_slave_sg when setting up a transfer which can potentially fail due to fragmentation under heavy I/O load. The current value of 1024 is unusually high in comparison to other mmc host drivers which mostly use values of between 1 and 256. The EDMA driver at present splits lists above 20 segments in any case so reducing the size of lists we pass to it shouldn't add much overhead. Signed-off-by: Will Newton <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: renesas-sdhi: add support for R-Car Gen3 SDHI DMACSimon Horman5-2/+299
Add a new variant of the SDHI driver to support R-Car Gen3 with DMA via on-chip bus mastering. Since the DMAC is in a part of the SDHI module it is not suitable to be used via DMA Engine. Clearing of DM_CM_INFO1 after DMA thanks to Dirk Behme Cc: Dirk Behme <[email protected]> Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Ai Kyuse <[email protected]> Signed-off-by: Simon Horman <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio, renesas-sdhi: add dataend to DMA opsSimon Horman3-2/+15
Add dataend to DMA ops to allow DMAC implementation dependent handling of DMA data end. Also implement the operation for SDHI. Signed-off-by: Simon Horman <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: tmio, renesas-sdhi: add max_{segs, blk_count} to tmio_mmc_dataYoshihiro Shimoda3-3/+7
Allow TMIO and SDHI driver implementations to provide values for max_segs and max_blk_count. A follow-up patch will set these values for Renesas Gen3 SoCs the using an SDHI driver. Signed-off-by: Yoshihiro Shimoda <[email protected]> Signed-off-by: Ai Kyuse <[email protected]> Signed-off-by: Simon Horman <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: omap_hsmmc: constify dev_pm_ops structuresArvind Yadav1-1/+1
dev_pm_ops are not supposed to change at runtime. All functions working with dev_pm_ops provided by <linux/device.h> work with const dev_pm_ops. So mark the non-const structs as const. File size before: text data bss dec hex filename 11586 624 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o File size After adding 'const': text data bss dec hex filename 11778 432 0 12210 2fb2 drivers/mmc/host/omap_hsmmc.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: sdhci-st: Handle return value of clk_prepare_enableArvind Yadav1-4/+22
clk_prepare_enable() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-30mmc: block: Fix block status codesAdrian Hunter1-3/+3
Commit 2a842acab109 ("block: introduce new block status code type") changed the error type but not in patches merged through the mmc tree, like commit 0493f6fe5bde ("mmc: block: Move boot partition locking into a driver op"). Fix one error code that is incorrect and also use BLK_STS_OK in preference to 0. Fixes: 17ece345a042 ("Merge tag 'mmc-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc") Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>
2017-08-21mmc: block: prevent propagating R1_OUT_OF_RANGE for open-ending modeShawn Lin1-6/+43
We to some extent should tolerate R1_OUT_OF_RANGE for open-ending mode as it is expected behaviour and most of the backup partition tables should be located near some of the last blocks which will always make open-ending read exceed the capacity of cards. Fixes: 9820a5b11101 ("mmc: core: for data errors, take response of stop cmd into account") Fixes: a04e6bae9e6f ("mmc: core: check also R1 response for stop commands") Signed-off-by: Shawn Lin <[email protected]> Reviewed-by: Wolfram Sang <[email protected]> Tested-by: Shawn Guo <[email protected]> Signed-off-by: Ulf Hansson <[email protected]>