Yocto Project Linux Firmware
  1. Yocto Project Linux Firmware

linux-wandboard

Public

Network

 
AuthorCommitMessageCommit Date
Adrian HunterAdrian Hunter
ccd404bcc58MLK-16155-2 mmc: core: Add members to mmc_request and mmc_data for CQE's Most of the information needed to issue requests to a CQE is already in struct mmc_request and struct mmc_data. Add data block address, some flags, and the task id (tag), and allow for cmd being NULL which it is for CQE tasks. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Adrian HunterAdrian Hunter
f9f9c57df9dMLK-16155-1 mmc: core: Add mmc_retune_hold_now() In preparation for CQE support. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Tested-by: Haibo Chen <haibo.chen@nxp.com> Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Linus WalleijLinus Walleij
e55c1b7fcd6mmc: block: Tag is_rpmb as bool The variable is_rpmb is clearly a bool and even assigned true and false, yet declared as an int. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 829043c48e5d7169d45a04027a787b55133f4cf6)
Linus WalleijLinus Walleij
b9fa9f4949emmc: core: Allocate per-request data using the block layer core The mmc_queue_req is a per-request state container the MMC core uses to carry bounce buffers, pointers to asynchronous requests and so on. Currently allocated as a static array of objects, then as a request comes in, a mmc_queue_req is assigned to it, and used during the lifetime of the request. This is backwards compared to how other block layer drivers work: they usally let the block core provide a per-request struct that get...
Linus WalleijLinus Walleij
b55cd4d83eammc: core: Delete bounce buffer Kconfig option This option is activated by all multiplatform configs and what not so we almost always have it turned on, and the memory it saves is negligible, even more so moving forward. The actual bounce buffer only gets allocated only when used, the only thing the ifdefs are saving is a little bit of code. It is highly improper to have this as a Kconfig option that get turned on by Kconfig, make this a pure runtime-thing and let the host decide whether we...
Christoph HellwigChristoph Hellwig
68a370cd59dblock: allow specifying size for extra command data This mirrors the blk-mq capabilities to allocate extra drivers-specific data behind struct request by setting a cmd_size field, as well as having a constructor / destructor for it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com> (cherry picked from commit 6d247d7f71d1fa4b66a5f4da7b1daa21510d529b)
Christoph HellwigChristoph Hellwig
7405ba36602block: simplify blk_init_allocated_queue Return an errno value instead of the passed in queue so that the callers don't have to keep track of two queues, and move the assignment of the request_fn and lock to the caller as passing them as argument doesn't simplify anything. While we're at it also remove two pointless NULL assignments, given that the request structure is zeroed on allocation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.c...
Ulf HanssonUlf Hansson
02bd6696b52mmc: sdio: Add API to manage SDIO IRQs from a workqueue For hosts not supporting MMC_CAP2_SDIO_IRQ_NOTHREAD but MMC_CAP_SDIO_IRQ, the SDIO IRQs are processed from a dedicated kernel thread. For these cases, the host calls mmc_signal_sdio_irq() from its ISR to signal a new SDIO IRQ. Signaling an SDIO IRQ makes the host's ->enable_sdio_irq() callback to be invoked to temporary disable the IRQs, before the kernel thread is woken up to process it. When processing of the IRQs are completed, they...
Ulf HanssonUlf Hansson
502334fa088mmc: core: Prevent processing SDIO IRQs when none is claimed In cases when MMC_CAP2_SDIO_IRQ_NOTHREAD is set, there is a minor window for when the mmc host could call sdio_run_irqs(), while in fact an SDIO func driver could have decided to released the SDIO IRQ via a call to sdio_release_irq(). In this scenario, processing of the SDIO IRQs are done even if there is none IRQ claimed, which is not what we want. To prevent this from happen, close the window by validating that at least one SDIO...
Ulf HanssonUlf Hansson
0488eba98cfmmc: core: Don't do eMMC HW reset when resuming the eMMC card In case if a pwrseq-emmc has been bound to the host, a call to mmc_power_up() triggers an eMMC HW reset via the pwrseq_emmc's ->post_power_on() callback. This isn't really what we want, as mmc_power_up() is called each time when resuming the card. As a matter of fact, the current approach may also violate the eMMC spec, as the involved delays managed in pwrseq_emmc assumes both VCC and VCCQ has been turned on, which isn't the cas...
Ulf HanssonUlf Hansson
f03c3bbc961mmc: pwrseq: Add reset callback to the struct mmc_pwrseq_ops The ->reset() callback is needed to implement a better support for eMMC HW reset. The following changes will take advantage of the new callback. Suggested-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> (cherry picked from commit 773a9ef85f02f6a82f58244f33cb628ad1ecac21)
Ulf HanssonUlf Hansson
0ea0307f4d3mmc: pwrseq_simple: Parse DTS for the power-off-delay-us property If the optional power-off-delay-us property is found, insert the corresponding delay after asserting the GPIO during power off. This enables a graceful shutdown sequence for some devices. Cc: linux-mmc@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Arnd Bergmann <arnd@arndb.de> (cherry picked from commit e9256e142f597edf90c68cec22db4c4aebaa27de)
Ulf HanssonUlf Hansson
d936b8c6f9emmc: dt: pwrseq-simple: Invent power-off-delay-us During power off, after the GPIO pin has been asserted, some devices like the Wifi chip from TI, Wl18xx, needs a delay before the host continues with clock gating and turning off regulators as to follow a graceful shutdown sequence. Therefore invent an optional power-off-delay-us DT binding for mmc-pwrseq-simple, to allow us to support this constraint. Cc: devicetree@vger.kernel.org Cc: Rob Herring <robh+dt@kernel.org> Cc: linux-mmc@vger.ke...
Ulf HanssonUlf Hansson
bca7a691b48mmc: core: Export API to allow hosts to get the card address Some hosts controllers, like Cavium, needs to know whether the card operates in byte- or block-address mode. Therefore export a new API, mmc_card_is_blockaddr(), which provides this information. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Steven J. Hill <Steven.Hill@cavium.com> Acked-by: David Daney <david.daney@cavium.com> (cherry picked from commit 33e6d74d65c358270f00d228877178964aab84b3)
jiajie.hao@mediatek.comjiajie.hao@mediatek.com
9b8cfeda879mmc: sdio: Fix sdio wait busy implement limitation The host may issue an I/O abort by writing to the CCCR at any time during I/O read operation via CMD52. And host may need suspend transcation during write busy stage in SDIO suspend/resume scenario. >From other side, a card may accept CMD52 during data transfer phase. Previous implement would block issuing above command in busy stage. It cause function driver can't implement as proper way and has no opportunity to do some coverage in error ...
Winkler, TomasWinkler, Tomas
6a8372ecdfcmmc: core: add proper be32 annotation Annotate big endian values correctly and make sparse happy. In mmc_app_send_scr remove scr function parameter as it was updating card->raw_scr anyway. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 06c9ccb78e68e2e9b69e736fc0a39fb13be49b74)
Hu ZijiHu Ziji
24dfa421e57mmc: sdhci: Export sdhci_enable_sdio_irq() from sdhci.c Export sdhci_enable_sdio_irq() from sdhci.c. Thus vendor SDHC driver can implement its specific SDIO irq control. Signed-off-by: Hu Ziji <huziji@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 2f05b6ab5fa7f279015c70f625ec5c532781eb2b)
Hu ZijiHu Ziji
ad12d9fbcefmmc: sdhci: Export sdhci_start_signal_voltage_switch() in sdhci.c Export sdhci_start_signal_voltage_switch() from sdhci.c. Thus vendor sdhci driver can implement its own signal voltage switch routine. Signed-off-by: Hu Ziji <huziji@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit c376ea9e46215fbfa09b371f79c821fa5a51f26e)
Hu ZijiHu Ziji
018dbc70059mmc: sdhci: Export sdhci_set_ios() from sdhci.c Export sdhci_set_ios() in sdhci.c. Thus vendor sdhci driver can implement its own set_ios() routine. Signed-off-by: Hu Ziji <huziji@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 6a6d4ceb7be0c72b2190f4b6b9d5d8982957fc04)
Linus WalleijLinus Walleij
2ecb1c3f385mmc: core: refactor mmc_request_done() We have this construction: if (a && b && !c) finalize; else block; finalize; Which is equivalent by boolean logic to: if (!a || !b || c) block; finalize; Which is simpler code. Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 67b8360acc0d717c46af3008fc10dcc5c91f7745)
Linus WalleijLinus Walleij
e3c6e808b3cmmc: core: refactor asynchronous request finalization mmc_wait_for_data_req_done() is called in exactly one place, and having it spread out is making things hard to oversee. Factor this function into mmc_finalize_areq(). Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 0e72f95bf329dea7985f0f4ac81cc888e8b79797)
Linus WalleijLinus Walleij
cf4fa4f7321mmc: core: move some code in mmc_start_areq() "previous" is a better name for the variable storing the previous asynchronous request, better than the opaque name "data" atleast. We see that we assign the return status to the returned variable on all code paths, so we might as well just do that immediately after calling mmc_finalize_areq(). Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf...
Adrian HunterAdrian Hunter
de71b663553mmc: core: Factor out mrq preparation from mmc_start_request() In preparation to reuse the code for CQE support. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit f34bdd2f7e2881090f566a2f93b0d8e1189091e0)
Adrian HunterAdrian Hunter
697e16c3252mmc: core: Factor out debug prints from mmc_start_request() In preparation to reuse the code for CQE support. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 4b67e63faaa21eab225bc3827a9d06e6ae54bdc7)
Adrian HunterAdrian Hunter
61c0c1eb1edmmc: block: Factor out data preparation Factor out data preparation into a separate function mmc_blk_data_prep() which can be re-used for command queuing. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit ca5717f7ceef3c0aa76e2f77acb95ec3a93470c8)
Adrian HunterAdrian Hunter
3811433cabemmc: block: Change mmc_apply_rel_rw() to get block address from the request mmc_apply_rel_rw() will be used by Software Command Queuing also. In that case the command argument is not the block address so change mmc_apply_rel_rw() to get block address from the request. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 9cb38f7a2d0aab5730ac18117ab2f5c9e3d4a826)
Adrian HunterAdrian Hunter
e7aaceec16ammc: block: Disable Command Queue while RPMB is used RPMB does not allow Command Queue commands. Disable and re-enable the Command Queue when switching. Note that the driver only switches partitions when the queue is empty. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 025e3d5fe157e8a12ed4ab59d0e14...
Adrian HunterAdrian Hunter
802a028896fmmc: mmc_test: Disable Command Queue while mmc_test is used Normal read and write commands may not be used while the command queue is enabled. Disable the Command Queue when mmc_test is probed and re-enable it when it is removed. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Harjani Ritesh <riteshh@codeaurora.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 9d4579a85c84340044b10ffa...
Adrian HunterAdrian Hunter
7b376ded075mmc: mmc: Add functions to enable / disable the Command Queue Add helper functions to enable or disable the Command Queue. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit b658af718465cd1e8011c8da281befdfc2debefd)
Adrian HunterAdrian Hunter
509d06a912emmc: queue: Share mmc request array between partitions eMMC can have multiple internal partitions that are represented as separate disks / queues. However switching between partitions is only done when the queue is empty. Consequently the array of mmc requests that are queued can be shared between partitions saving memory. Keep a pointer to the mmc request queue on the card, and use that instead of allocating a new one for each partition. Signed-off-by: Adrian Hunter <adrian.hunter@intel.c...
Adrian HunterAdrian Hunter
1cc041625b0mmc: block: Introduce queue semantics Change from viewing the requests in progress as 'current' and 'previous', to viewing them as a queue. The current request is allocated to the first free slot. The presence of incomplete requests is determined from the count (mq->qcnt) of entries in the queue. Non-read-write requests (i.e. discards and flushes) are not added to the queue at all and require no special handling. Also no special handling is needed for the MMC_BLK_NEW_REQUEST case. As well a...
Adrian HunterAdrian Hunter
373f883600bmmc: block: Use local var for mqrq_cur A subsequent patch will remove 'mq->mqrq_cur'. Prepare for that by assigning it to a local variable. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 8ddfe07e18c9c82f7567d3cfbd68d8b59764d015)
Heiner KallweitHeiner Kallweit
d743b8afdf3mmc: use new core function mmc_get_dma_dir 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> (cherry picked from commit feeef096a770d288c943c1759785bd9d4f9247b7) Conflicts: drivers/mmc/host/dw_mmc.c
Heiner KallweitHeiner Kallweit
d7167a9991fmmc: core: add mmc_get_dma_dir Add function for determining DMA direction to core. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 6335d68349a85382cc55a5260d5bfda85f8e24a8)
Shawn LinShawn Lin
6a71e8a7a10mmc: sdhci: clarify the get_timeout_clock callback 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 ...
Heiner KallweitHeiner Kallweit
0d5fdad38c6mmc: sdio: improve mmc_io_rw_extended 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: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 7aceaf566e1d6f7bf29516d680ee883697909cc7)
Adrian HunterAdrian Hunter
b9a7b20dd5emmc: sdhci: Add CQE support 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> (cherry picked from commit f12e39dbf3e6eb521435085712addc131d803bfd)
Adrian HunterAdrian Hunter
b4d22b5872emmc: sdhci: Factor out sdhci_set_default_irqs 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> (cherry picked from commit f5c1ab821b96419261e7676efb1a355e9d735faf)
Adrian HunterAdrian Hunter
15eafd2f00ammc: sdhci: Add sdhci_cleanup_host 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> (cherry picked from commit 4180ffa81779551a25772efae1128ac5a9689536)
Adrian HunterAdrian Hunter
e2283652299mmc: sdhci: Get rid of 'extern' in header file 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> (cherry picked from commit 15becf68b86741be282880196f1e5155b1a9a033)
Adrian HunterAdrian Hunter
2f19ef26c04mmc: sdhci: Export sdhci_dumpregs 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> (cherry picked from commit d28981727dccd0e1e867deceaa709bc89f1a5ebc)
Adrian HunterAdrian Hunter
cab027a362bmmc: sdhci: Improve register dump print format 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> (cherry picked from commit 85ad90e2f819a5c7f5d1005da32660eff7680abf)
Adrian HunterAdrian Hunter
f7e5d459be8mmc: sdhci: Use sdhci_readl() not readl() in sdhci_dumpregs() 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> (cherry picked from commit c71024de98f4b596112be9c2698b2d8000382a5a)
Adrian HunterAdrian Hunter
022e6c8cfc7mmc: sdhci: Add response register to register dump 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> (cherry picked from commit 7962302fc3f5b3b31523b518a2dc47849fb7bd06)
Adrian HunterAdrian Hunter
8560006989bmmc: sdhci: Improve debug print format 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> (cherry picked from commit f421865d5b4ce57013040fb1700edceb43a14b42)
Adrian HunterAdrian Hunter
12f5ed6b459mmc: sdhci: Reduce spin lock usage in sdhci_execute_tuning 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...
Adrian HunterAdrian Hunter
06387500b3dmmc: sdhci: Remove ->select_drive_strength() callback 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> (cherry picked from commit 0c62e6752d0c769aae41bfade6258e5f9aedbe2d) Conflicts: drivers/mmc/host/sdhci-pci.h
Adrian HunterAdrian Hunter
1fdb3ed0236mmc: sdhci: Let drivers decide whether to use mmc_retune_needed() with pm 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> (cherry picked from commit d38dcad4e7b48f3d68d5d058f8f4f52a99862e6e) ...
Adrian HunterAdrian Hunter
3cf0ab1f96bmmc: sdhci: Optimize delay loops 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> (cherry picked from commit 5a436cc0af6202265de0d2d2d35f1b4fd85caf3b)
tchardingtcharding
cfbdef809d4mmc: core: simplify return code 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 read...