- 15 Mar, 2022 3 commits
-
-
Ulf Hansson authored
When mmc_select_hs400es() tries to switch to the HS400 ES mode, it may bail out early if the host doesn't support an 8-bit buswidth, as it's required for the HS400 mode. To improve the situation, let's instead drop the HS400 bits from the capability field if the 8-bit bus isn't supported. In this way, we allow the mmc initialization to continue by trying a lower speed mode. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20220303165151.129806-1-ulf.hansson@linaro.org
-
Ulf Hansson authored
Even if the current WARN() notifies the user that something is severely wrong, we can still end up in a PANIC() when trying to invoke the missing ->enable_sdio_irq() ops. Therefore, let's also return an error code and prevent the host from being added. While at it, move the code into a separate function to prepare for subsequent changes and for further host caps validations. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20220303165142.129745-1-ulf.hansson@linaro.org
-
Ulf Hansson authored
In the error path of mmc_select_hs200() we are trying our best to restore the card/host into a valid state. This makes sense, especially if we encounter a simple switch error (-EBADMSG). However, rather than then continue with using the legacy speed mode, let's try the other better speed modes first. Additionally, let's update the card->mmc_avail_type to avoid us from trying a broken HS200 mode again. In an Amlogic S905W based TV box where the switch to HS200 mode fails for the eMMC, this allows us to use the eMMC in DDR mode in favor of the legacy mode, which greatly improves the performance. Suggested-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://lore.kernel.org/r/20220303164522.129583-1-ulf.hansson@linaro.org
-
- 11 Mar, 2022 1 commit
-
-
Jesse Taube authored
The Allwinner F1C100 series contains two MMC controller blocks. From comparing the data sheets, they seem to be compatible with the one used in the Allwinner A20: the register layout is the same, and they use the same separate sample and output clocks design. The only difference is the missing reset line in the A20 version, but both the binding and the Linux driver make this optional, so it's still a fit. Add the new SoC specific name and require it to be paired with the A20 fallback name, as this is all the driver needs to care about. Signed-off-by: Jesse Taube <Mr.Bossman075@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20220307143421.1106209-8-andre.przywara@arm.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 07 Mar, 2022 5 commits
-
-
Peter Geis authored
The Rockchip rk356x ciu clock cannot be set as low as the dw-mmc hardware supports. This leads to a situation during card initialization where the clock is set lower than the clock driver can support. The dw-mmc-rockchip driver spews errors when this happens. For normal operation this only happens a few times during boot, but when cd-broken is enabled (in cases such as the SoQuartz module) this fires multiple times each poll cycle. Fix this by testing the lowest possible frequency that the clock driver can support which is within the mmc specification. Divide that rate by the internal divider and set f_min to this. Signed-off-by: Peter Geis <pgwipeout@gmail.com> Link: https://lore.kernel.org/r/20220305215835.2210388-3-pgwipeout@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Peter Geis authored
Host drivers may not be able to support frequencies as low as dw-mmc supports. Unfortunately f_min isn't available when the drv_data->init function is called, as the mmc_host struct hasn't been set up yet. Support the host drivers saving the requested minimum frequency, so we can later set f_min when it is available. Signed-off-by: Peter Geis <pgwipeout@gmail.com> Link: https://lore.kernel.org/r/20220305215835.2210388-2-pgwipeout@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Geert Uytterhoeven authored
It does not make sense to have a comma after a sentinel, as any new elements must be added before the sentinel. Add comments to clarify the purpose of the empty elements. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/9050fa278eaaa9e6ec719a3b158a2fad285560d0.1646311673.git.geert+renesas@glider.beSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
-
Ulf Hansson authored
Commit 76bfc7cc ("mmc: core: adjust polling interval for CMD1"), significantly decreased the polling period from ~10-12ms into just a couple of us. The purpose was to decrease the total time spent in the busy polling loop, but unfortunate it has lead to problems, that causes eMMC cards to never gets out busy and thus fails to be initialized. To fix the problem, but also to try to keep some of the new improved behaviour, let's start by using a polling period of 1-2ms, which then increases for each loop, according to common polling loop in __mmc_poll_for_busy(). Reported-by: Jean Rene Dawin <jdawin@math.uni-bielefeld.de> Reported-by: H. Nikolaus Schaller <hns@goldelico.com> Cc: Huijin Park <huijin.park@samsung.com> Fixes: 76bfc7cc ("mmc: core: adjust polling interval for CMD1") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Jean Rene Dawin <jdawin@math.uni-bielefeld.de> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> Link: https://lore.kernel.org/r/20220304105656.149281-1-ulf.hansson@linaro.org
-
- 02 Mar, 2022 1 commit
-
-
Ricky WU authored
SD spec definition: "Host provides at least 74 Clocks before issuing first command" After 1ms for the voltage stable then start issuing the Clock signals if POWER STATE is MMC_POWER_OFF to MMC_POWER_UP to issue Clock signal to card MMC_POWER_UP to MMC_POWER_ON to stop issuing signal to card Signed-off-by: Ricky Wu <ricky_wu@realtek.com> Link: https://lore.kernel.org/r/1badf10aba764191a1a752edcbf90389@realtek.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 01 Mar, 2022 1 commit
-
-
Lad Prabhakar authored
Document RZ/V2L SDHI bindings. RZ/V2L SDHI is almost identical to one found on the R-Car Gen3. No driver changes are required as generic compatible string "renesas,rcar-gen3-sdhi" will be used as a fallback. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20220227212330.22262-1-prabhakar.mahadev-lad.rj@bp.renesas.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 28 Feb, 2022 25 commits
-
-
Ulf Hansson authored
-
Geert Uytterhoeven authored
"a / (1 << b)" == "a >> b". No change in generated code. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/68d689c39c769d298b53ee8cb9de0e594a2999b2.1645460780.git.geert+renesas@glider.beSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Aswath Govindraju authored
Add support for the controller present on the AM62x SoC. There are instances: sdhci0: 8bit bus width, max 200 MBps sdhci1: 4bit bus width, max 100 MBps sdhci2: 4bit bus width, max 100 MBps The PHY used for 8 bit instance is same as the PHY for the 4 bit instance. Therefore, introduce a new bus width independent compatible for AM62 SoC that uses the driver data required for 4 bit instance. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Link: https://lore.kernel.org/r/20220218072840.5629-1-a-govindraju@ti.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Rong Chen authored
Currently meson_mmc_post_req() is called in meson_mmc_request() right after meson_mmc_start_cmd(). This could lead to DMA unmapping before the request is actually finished. To fix, don't call meson_mmc_post_req() until meson_mmc_request_done(). Signed-off-by: Rong Chen <rong.chen@amlogic.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Fixes: 79ed05e3 ("mmc: meson-gx: add support for descriptor chain mode") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20220216124239.4007667-1-rong.chen@amlogic.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Peng Fan authored
Add i.MX93 compatible string, it uses two compatible strings. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20220215081502.789067-1-peng.fan@oss.nxp.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Aswath Govindraju authored
Add compatible string for AM62 SoC in device tree binding of AM654 SDHCI module as the same IP is used. Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Link: https://lore.kernel.org/r/20220216134346.11029-1-a-govindraju@ti.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Aswath Govindraju authored
The MMCSD IPs used in AM64 are the same as the ones used in J721E. Therefore, fix this by using the driver data from J721E for AM64 too, for both 8 and 4 bit instances. Fixes: 754b7f2f ("mmc: sdhci_am654: Add Support for TI's AM64 SoC") Signed-off-by: Aswath Govindraju <a-govindraju@ti.com> Link: https://lore.kernel.org/r/20220211075056.26179-1-a-govindraju@ti.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Sergey Shtylyov authored
sprintf() (still used in the MMC core for the sysfs output) is vulnerable to the buffer overflow. Use the new-fangled sysfs_emit() instead. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/717729b2-d65b-c72e-9fac-471d28d00b5a@omp.ruSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Samuel Holland authored
D1's MMC controllers are unique in that they have the DMA address shift (like A100) with a 13-bit descriptor size field (like sun4i). Add the compatible and parameters for this new variant. Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220203015112.12008-2-samuel@sholland.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Samuel Holland authored
D1 contains variants of the usual sunxi MMC controller. The eMMC controller has the same parameters as the A100 eMMC controller. The other controllers have a DMA address shift like on A100, but they have a smaller 13-bit size field, making them a new incompatible variant. Signed-off-by: Samuel Holland <samuel@sholland.org> Acked-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20220203015112.12008-1-samuel@sholland.orgSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Andy Shevchenko authored
Use device_property_string_array_count() to get number of strings in a string array property. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220202182450.54925-1-andriy.shevchenko@linux.intel.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
Only the device data is needed, not the entire struct of_device_id. Use of_device_get_match_data() instead of of_match_device(). Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20220202180648.1252154-6-huobean@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
Only the device data is needed, not the entire struct of_device_id. Use of_device_get_match_data() instead of open coding of_match_device(). Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20220202180648.1252154-5-huobean@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
Only the device data is needed,not the whole struct of_device_id. Use of_device_get_match_data() instead of open coding of of_match_device(). Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20220202180648.1252154-3-huobean@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Bean Huo authored
Only the device data is needed, not the whole struct of_device_id. Use of_device_get_match_data() instead of open coding of of_match_device(). Signed-off-by: Bean Huo <beanhuo@micron.com> Link: https://lore.kernel.org/r/20220202180648.1252154-2-huobean@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Allen-KH Cheng authored
This commit adds dt-binding documentation of mmc for Mediatek MT8186 SoC Platform. Signed-off-by: Allen-KH Cheng <Allen-KH.Cheng@mediatek.com> Link: https://lore.kernel.org/r/20220128062050.23978-5-allen-kh.cheng@mediatek.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ben Chuang authored
Add a vendor-specific bit at the bit26 of GL9750's register 878h and GL9755's register 78h to decide whether to disable SSC function. If this bit is set, the SSC function will be disabled. Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> Link: https://lore.kernel.org/r/20220119075406.36321-1-benchuanggli@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ben Chuang authored
Enable SSC function at 50MHz and 100MHz for GL9750 and GL9755. Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> Link: https://lore.kernel.org/r/20220119075339.36281-1-benchuanggli@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Ben Chuang authored
The SSC value is 0xFFE7 at 205MHz and may be saturated. Reduce the SSC value to 0x5A1D at 205MHz to reduce this situation for GL9750 and GL9755. Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> Link: https://lore.kernel.org/r/20220119075306.36262-1-benchuanggli@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Gabriel Somlo authored
LiteX (https://github.com/enjoy-digital/litex) is a SoC framework that targets FPGAs. LiteSDCard is a small footprint, configurable SDCard core commonly used in LiteX designs. The driver was first written in May 2020 and has been maintained cooperatively by the LiteX community. Thanks to all contributors! Co-developed-by: Kamil Rakoczy <krakoczy@antmicro.com> Signed-off-by: Kamil Rakoczy <krakoczy@antmicro.com> Co-developed-by: Maciej Dudek <mdudek@internships.antmicro.com> Signed-off-by: Maciej Dudek <mdudek@internships.antmicro.com> Co-developed-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20220113170300.3555651-4-gsomlo@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Gabriel Somlo authored
LiteSDCard is a small footprint, configurable SDCard core for FPGA based SoCs. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Joel Stanley <joel@jms.id.au> Link: https://lore.kernel.org/r/20220113170300.3555651-3-gsomlo@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Gabriel Somlo authored
Add the litex_mmc (LiteSDCard) and LiteETH drivers to the list of files maintained under LiteX. Add Gabriel Somlo and Joel Stanley as maintainers; Joel authored the LiteETH driver, and Gabriel is currently curating the LiteX out-of-tree device drivers as they are tested and prepared for upstream submission, having also co-authored a number of them. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Acked-by: Joel Stanley <joel@jms.id.au> Acked-by: Mateusz Holenko <mholenko@antmicro.com> Link: https://lore.kernel.org/r/20220113170300.3555651-2-gsomlo@gmail.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Aniruddha Rao authored
Enable GPIO wake source on SD card detect line. Physical card insertion/removal event should wake the system from suspend. Signed-off-by: Aniruddha Rao <anrao@nvidia.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Link: https://lore.kernel.org/r/1642050969-21152-1-git-send-email-anrao@nvidia.comSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Luca Weiss authored
Add msm8953 SoC specific compatible strings for qcom-sdhci controller. Signed-off-by: Luca Weiss <luca@z3ntu.xyz> Acked-by: Konrad Dybcio <konrad.dybcio@somainline.org> Link: https://lore.kernel.org/r/20220112194118.178026-6-luca@z3ntu.xyzSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
Wen Zhiwei authored
we previously assumed 'host->slot' could be null, null pointer judgment should be added Signed-off-by: Wen Zhiwei <wenzhiwei@kylinos.cn> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com> Link: https://lore.kernel.org/r/20211229023814.53372-1-wenzhiwei@kylinos.cnSigned-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-
- 27 Feb, 2022 4 commits
-
-
Linus Torvalds authored
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull irq fix from Thomas Gleixner: "A single fix for a regression caused by the recent PCI/MSI rework which resulted in a recursive locking problem in the VMD driver. The cure is to cache the relevant information upfront instead of retrieving it at runtime" * tag 'irq-urgent-2022-02-27' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: PCI: vmd: Prevent recursive locking on interrupt allocation
-
git://git.infradead.org/users/hch/dma-mappingLinus Torvalds authored
Pull dma-mapping fix from Christoph Hellwig: - fix a swiotlb info leak (Halil Pasic) * tag 'dma-mapping-5.17-1' of git://git.infradead.org/users/hch/dma-mapping: swiotlb: fix info leak with DMA_FROM_DEVICE
-
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrlLinus Torvalds authored
Pull pin control fixes from Linus Walleij: - Fix some drive strength and pull-up code in the K210 driver. - Add the Alder Lake-M ACPI ID so it starts to work properly. - Use a static name for the StarFive GPIO irq_chip, forestalling an upcoming fixes series from Marc Zyngier. - Fix an ages old bug in the Tegra 186 driver where we were indexing at random into struct and being lucky getting the right member. * tag 'pinctrl-v5-17-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: gpio: tegra186: Fix chip_data type confusion pinctrl: starfive: Use a static name for the GPIO irq_chip pinctrl: tigerlake: Revert "Add Alder Lake-M ACPI ID" pinctrl: k210: Fix bias-pull-up pinctrl: fix loop in k210_pinconf_get_drive()
-