- 06 1月, 2016 5 次提交
-
-
由 Jaehoon Chung 提交于
Removed the unused quirks. These quirks don't used anywhere. Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Geliang Tang 提交于
Use to_pci_dev() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Geliang Tang 提交于
Use to_platform_device() instead of open-coding it. Signed-off-by: NGeliang Tang <geliangtang@163.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Lucas Stach 提交于
The misc control register is 32bit wide, the used readw/writew accessors only mainipulate the low 16bit of this register. It currently doesn't matter as all the bit changed are located in the lower half, but together with the u32 variable used to hold the contents of the register it is seriously confusing. Switch to 32bit accessors to avoid any future breakage. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Lucas Stach 提交于
Keep the quirk bits, as Tegra30 and Tegra114 host have different levels of support for UHS-I modes and so need different spare bits to be set, but change the logic to be positive. Tegra210 needs a different tuning sequence than Tegra30+. Disable UHS modes until support for this is properly added. Signed-off-by: NLucas Stach <dev@lynxeye.de> Acked-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
- 28 12月, 2015 7 次提交
-
-
由 Lucas Stach 提交于
This implements the UHS tuning sequence in a similar way to the one contained in the TRM. It deviates in the way how to check if the tap value is passing, by using the common Linux MMC function, which does not only check for data CRC errors, but also if the received block pattern is correct. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Lucas Stach 提交于
The Tegra30 and up TRM states that this bit should always be programmed to 0 by driver software. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Lucas Stach 提交于
Allow the the driver to change the clock supplied from the CAR directly, minimizing the need to divide the clock inside the SDMMC module itself. This allows for higher clock speeds than the default 48MHz supplied to the module and is a prerequisite to support DDR signaling modes, where the Tegra host needs to be run with a fixed internal divider of 2 for data to be sampled correctly. (Tegra K1 TRM v03p chapter 29.7.1.1) Also enable the broken preset value quirk as the preset values need to be adapted to the changed clocking. While Tegra114+ allows this through vendor registers, there is no such way for Tegra30. Takes the easy way out and keep things consistent between the different SoC generations by flagging the preset registers as unusable. Signed-off-by: NLucas Stach <dev@lynxeye.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Jisheng Zhang 提交于
After commit 52221610 ("mmc: sdhci: Improve external VDD regulator support"), for the VDD is supplied via external regulators, we ignore the code to convert a VDD voltage request into one of the standard SDHCI voltage levels, then program it in the SDHCI_POWER_CONTROL. This brings two issues: 1. SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON quirk isn't handled properly any more. 2. What's more, once SDHCI_POWER_ON bit is set, some controllers such as the sdhci-pxav3 used in marvell berlin SoCs require the voltage levels programming in the SDHCI_POWER_CONTROL register, even the VDD is supplied by external regulator. So the host in marvell berlin SoCs still works fine after the commit. However, commit 3cbc6123 ("mmc: sdhci: Set SDHCI_POWER_ON with external vmmc") sets the SDHCI_POWER_ON bit, this would make the host in marvell berlin SoCs won't work any more with external vmmc. This patch restores the behavior when setting VDD through external regulator by moving the call of mmc_regulator_set_ocr() to the end of sdhci_set_power() function. After this patch, the sdcard on Marvell Berlin SoC boards work again. Signed-off-by: NJisheng Zhang <jszhang@marvell.com> Fixes: 52221610 ("mmc: sdhci: Improve external VDD ...") Reviewed-by: NLudovic Desroches <ludovic.desroches@atmel.com> Tested-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
A card can be removed while it is runtime suspended. Do not print an error message. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Colin Cross 提交于
It is quite common for Android devices to utilize more then 8 partitions on internal eMMC storage. The vanilla kernel can support this via CONFIG_MMC_BLOCK_MINORS, however that solution caps the system to 256 minors total, which limits the number of mmc cards the system can support. This patch, which has been carried for quite awhile in the AOSP common tree, provides an alternative solution that doesn't seem to limit the total card count. So I wanted to submit it for consideration upstream. This patch sets the GENHD_FL_EXT_DEVT flag, which will allocate minor number in major 259 for partitions past disk->minors. It also removes the use of disk_devt to determine devidx from md->disk. md->disk->first_minor is always initialized from devidx and can always be used to recover it. Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Chuanxiao Dong <chuanxiao.dong@intel.com> Cc: Shawn Lin <shawn.lin@rock-chips.com> Cc: Austin S Hemmelgarn <ahferroin7@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Android Kernel Team <kernel-team@android.com> Cc: linux-mmc@vger.kernel.org Signed-off-by: NColin Cross <ccross@android.com> [jstultz: Added context to commit message] Signed-off-by: NJohn Stultz <john.stultz@linaro.org> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Ulf Hansson 提交于
The mmc workqueue is an ordered workqueue, allowing only one work to execute per given time. As this workqueue is used for card detection, the conseqeunce is that cards will be detected one by one waiting for each other. Moreover, most of the time spent during card initialization is waiting for the card's internal firmware to be ready. From a CPU perspective this typically means waiting for a completion variable to be kicked via an IRQ-handler or waiting for a sleep timer to finish. This behaviour of detecting/initializing cards is sub-optimal, especially for SOCs having several controllers/cards. Let's convert to use the system_freezable_wq for the mmc detect works. This enables several works to be executed simultaneously and thus also cards to be detected like so. Tests on UX500, which holds two eMMC cards and an SD-card (actually also an SDIO card, currently not detected), shows a significant improved behaviour due to this change. Before this change, both the eMMC cards waited for the SD card to be initialized as its detect work entered the workqueue first. In some cases, depending on the characteristic of the SD-card, they got delayed 1-1.5 s. Additionally for the second eMMC, it needed to wait for the first eMMC to be initialized which added another 120-190 ms. Converting to the system_freezable_wq, removed these delays and made both the eMMC cards available far earlier in the boot sequence. Selecting the system_freezable_wq, in favour of for example the system_wq, is because we need card detection mechanism to be disabled once userspace are frozen during system PM. Currently the mmc core deal with this via PM notifiers, but following patches may utilize the behaviour of the system_freezable_wq, to simplify the use of the PM notifiers. Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org> Tested-by: NAlan Cooper <alcooperx@gmail.com> Tested-by: NShawn Lin <shawn.lin@rock-chips.com>
-
- 22 12月, 2015 28 次提交
-
-
由 Arnd Bergmann 提交于
The dw_mmc driver stores the physical address of the MMIO registers in a pointer, which requires the use of type casts, and is actually broken if anyone ever has this device on a 32-bit SoC in registers above 4GB. Gcc warns about this possibility when the driver is built with ARM LPAE enabled: mmc/host/dw_mmc.c: In function 'dw_mci_edmac_start_dma': mmc/host/dw_mmc.c:702:17: warning: cast from pointer to integer of different size cfg.dst_addr = (dma_addr_t)(host->phy_regs + fifo_offset); ^ mmc/host/dw_mmc-pltfm.c: In function 'dw_mci_pltfm_register': mmc/host/dw_mmc-pltfm.c:63:19: warning: cast to pointer from integer of different size host->phy_regs = (void *)(regs->start); This changes the code to use resource_size_t, which gets rid of the warning, the bug and the useless casts. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Chaotian Jing 提交于
there is a time window between __mmc_send_status() and time_afer(), on some eMMC chip, the timeout_ms is only 10ms, if this thread was scheduled out during this period, then, even card has already changes to transfer state by the result of CMD13, this part of code also treat it to timeout error. So, need calculate timeout first, then call __mmc_send_status(), if already timeout and card still in programing state, then treat it to the real timeout error. Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Rabin Vincent 提交于
Commit bb08a7d4 ("mmc: usdhi6rol0: fix NULL pointer deref in debug print") fixed one NULL pointer dereference but unfortunately introduced another. "data" may be NULL if this is a command timeout for a command without any data, so we should only use it if we're actually waiting for data. Fixes: bb08a7d4 ("mmc: usdhi6rol0: fix NULL pointer deref in debug print") Cc: stable@vger.kernel.org # v4.3 Signed-off-by: NRabin Vincent <rabin.vincent@axis.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 saurabh 提交于
If no primary handler is specified for threaded_irq then a default one is assigned which always returns IRQ_WAKE_THREAD. This handler requires the IRQF_ONESHOT, because the source of interrupt is not disabled Signed-off-by: NSaurabh Sengar <saurabh.truth@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Chaotian Jing 提交于
there are too many error logs shown when use CMD21/CMD19 to do tune, and it will appear at each resume time, print out so many logs to the uart console cost too mush time. so change it to dev_dbg. Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Fu, Zhonghui 提交于
Now, PM core supports asynchronous suspend/resume mode for devices during system suspend/resume, and the power state transition of one device may be completed in separate kernel thread. PM core ensures all power state transition dependency between devices. This patch enables MMC/SD/SDIO card and SDIO function devices to suspend/resume asynchronously. This will take advantage of multicore and improve system suspend/resume speed. After applying this patch and enabling all SDIO function's child devices to suspend/resume asynchronously on ASUS T100TA, the system suspend-to-idle time is reduced from 1645ms to 1108ms, and the system resume time is reduced from 940ms to 918ms. Signed-off-by: NZhonghui Fu <zhonghui.fu@linux.intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
sdhci has a legacy facility to prevent runtime suspend if the bus power is on. This is needed in cases where the power to the card is dependent on the bus power. It is controlled by a pair of functions: sdhci_runtime_pm_bus_on() and sdhci_runtime_pm_bus_off(). These functions use a boolean variable 'bus_on' to ensure changes are always paired. There is an additional check for 'runtime_suspended' which is the problem. In fact, its use is ill-conceived as the only requirement for the logic is that 'on' and 'off' are paired, which is actually broken by the check, for example if the bus power is turned on during runtime resume. So remove the check. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
The version 3.00 SDHCI spec. was a bit unclear about the required data alignment for 64-bit DMA, whereas the version 4.10 spec. uses different language and indicates that only 4-byte alignment is required rather than the 8-byte alignment currently implemented. That make no difference to SD and EMMC which invariably transfer data in sector-aligned blocks. However with SDIO, it results in using more DMA descriptors than necessary. Theoretically that slows DMA slightly although DMA is not the limiting factor for throughput, so there is no discernable impact on performance. Nevertheless, the driver should follw the spec unless there is good reason not to, so this patch corrects the alignment criterion. There is a more complicated criterion for the DMA descriptor table itself. However the table is allocated by dma_alloc_coherent() which allocates pages (i.e. aligned to a page boundary). For simplicity just check it is 8-byte aligned, but add a comment that some Intel controllers actually require 8-byte alignment even when using 32-bit DMA. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
SDHCI has built-in DMA called ADMA2. ADMA2 uses a descriptor table to define DMA scatter-gather. Each desciptor can specify a data length up to 65536 bytes, however the length field is only 16-bits so zero means 65536. Consequently, putting zero when the size is zero must not be allowed. This patch fixes one case where zero data length could be set inadvertently. The problem happens because unaligned data gets split and the code did not consider that the remaining aligned portion might be zero length. That case really only happens for SDIO because SD and eMMC cards transfer blocks that are invariably sector- aligned. For SDIO, access to function registers is done by data transfer (CMD53) when the register is bigger than 1 byte. Generally registers are 4 bytes but 2-byte registers are possible. So DMA of 4 bytes or less can happen. When 32-bit DMA is used, the data alignment must be 4, so 4-byte transfers won't casue a problem, but a 2-byte transfer could. However with the introduction of 64-bit DMA, the data alignment for 64-bit DMA was made 8 bytes, so all 4-byte transfers not on 8-byte boundaries get "split" into a 4-byte chunk and a 0-byte chunk, thereby hitting the bug. In fact, a closer look at the SDHCI specs indicates that only the descriptor table requires 8-byte alignment for 64-bit DMA. That will be dealt with in a separate patch, but the potential for a 2-byte access remains, so this fix is needed anyway. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org # v3.19+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
The 'ocr' parameter passed to mmc_set_signal_voltage() defines the power-on voltage used when power cycling after a failure to set the voltage. However, in the case of mmc_sdio_init_card(), the value passed has the R4_18V_PRESENT flag set which is not valid for power-on and results in an invalid vdd. Fix by passing the card's ocr value which does not have the flag. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org # v3.13+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
The driver may not be able to set the power correctly but that is not a reason to BUG(). Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Reviewed-by: NVenu Byravarasu <vbyravarasu@nvidia.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Adrian Hunter 提交于
In some cases, the stronger 33 Ohm driver strength must not be used so it is not a suitable default. Change it to the standard default 50 Ohm value. The patch applies to v4.2+ except the file name changed. It is drivers/mmc/host/sdhci-pci.c prior to v.4.4. Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Wenkai Du 提交于
Commit cc4f414c ("mmc: mmc: Add driver strength selection") added driver strength selection for eMMC HS200 and HS400 modes. That patch also set the driver stength when transitioning through High Speed mode to HS200/HS400, but driver strength is not defined for High Speed mode. While the JEDEC specification is not clear on this point it has been observed to cause problems for some eMMC, and removing the driver strength setting in this case makes it consistent with the normal use of High Speed mode. Signed-off-by: NWenkai Du <wenkai.du@intel.com> Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Carlo Caione 提交于
This patch introduce a new MMC_CAP2_NO_SDIO cap used to tell the mmc core to not send SDIO specific commands. Signed-off-by: NCarlo Caione <carlo@endlessm.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Linus Walleij 提交于
There are no in-kernel users of the MVSDIO platform data method (instantiating from a board file) so just delete this code and make this a DT-only driver. We depend on OF and check that we have an OF node in probe(). Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NNicolas Pitre <nico@linaro.org> Acked-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Linus Walleij 提交于
This platform data struct is only used inside the MVSDIO driver, nowhere else in the entire kernel. Move the struct into the driver and delete the external header. Cc: Nicolas Pitre <nico@fluxnic.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: NLinus Walleij <linus.walleij@linaro.org> Acked-by: NNicolas Pitre <nico@linaro.org> Acked-by: NAndrew Lunn <andrew@lunn.ch> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 yangbo lu 提交于
A previous patch had removed esdhc_of_platform_init() by mistake. static void esdhc_of_platform_init(struct sdhci_host *host) { u32 vvn; vvn = in_be32(host->ioaddr + SDHCI_SLOT_INT_STATUS); vvn = (vvn & SDHCI_VENDOR_VER_MASK) >> SDHCI_VENDOR_VER_SHIFT; if (vvn == VENDOR_V_22) host->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; if (vvn > VENDOR_V_22) host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ; } This patch is used to fix it by add/remove some quirks according to verdor version in probe. Signed-off-by: NYangbo Lu <yangbo.lu@freescale.com> Fixes: f4932cfd ("mmc: sdhci-of-esdhc: support both BE and LE host controller") Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
The atmci_convert_chksize() function is no more valid for controller version 0x600 due to the introduction of '2 data' chunk size. Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
atmel-mci-regs.h is only included in atmel-mci.c so move its content in the driver and do some cleanup in these definitions to remove checkpatch errors. Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Arnd Bergmann 提交于
The mmc pm notifiers were recently reworked, but the new code produces a lot of warnings when CONFIG_PM_SLEEP is disabled: In file included from ../drivers/mmc/core/sdio_bus.c:27:0: drivers/mmc/core/core.h:97:13: warning: 'mmc_register_pm_notifier' defined but not used [-Wunused-function] The obvious solution is to add the 'inline' keyword at the function definition, as it should be for any function defined in a header file. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Fixes: 0e40be7c20e0 ("mmc: core: Refactor code to register the MMC PM notifier") Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Haibo Chen 提交于
Here we use '|=' to set the tuning-step, but before that, we should clear the tuning-step, otherwise we could got the wrong setting. Signed-off-by: NHaibo Chen <haibo.chen@freescale.com> Acked-by: NDong Aisheng <aisheng.dong@freescale.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Arnd Bergmann 提交于
When compiling the sh_mmcif driver for ARM64, we currently get a harmless build warning: ../drivers/mmc/host/sh_mmcif.c: In function 'sh_mmcif_request_dma_one': ../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_tx : ^ ../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_rx; This could be worked around by adding another cast to uintptr_t, but I decided to simplify the code a little more to avoid that. This splits out the platform data using code into a separate function and builds that only for CONFIG_SUPERH. This part still has a typecast but does not need a second one. The SH platform code could be further modified to pass a pointer directly as we do on other architectures when we have a filter function. The normal case is simplified further and now just calls dma_request_slave_channel() directly without going through the compat handling. Signed-off-by: NArnd Bergmann <arnd@arndb.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Marek Vasut 提交于
This is a trivial patch which fixes printed strings split across two or more lines in the source. I tried to grep for some error output*, but I couldn't find it easily because it was broken across multiple lines. This patch makes my life easier. * in particular "Timeout waiting for hardware interrupt." Signed-off-by: NMarek Vasut <marex@denx.de> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Julia Lawall 提交于
The mmc_pwrseq_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: NJulia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Thierry Reding 提交于
Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 Thierry Reding 提交于
The data in the SoC description structures is static and can therefore reside in read-only memory. Signed-off-by: NThierry Reding <treding@nvidia.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
Add runtime PM support and use runtime_force_suspend|resume() for system PM. Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-
由 yalin wang 提交于
Use kmalloc instead of kzalloc, as zeroing the memory isn't needed. Signed-off-by: Nyalin wang <yalin.wang2010@gmail.com> Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
-