Commit Graph

8762 Commits

Author SHA1 Message Date
Binbin Zhou
8bc8c97bac mmc: davinci_mmc: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Bastien Curutchet <bastien.curutchet@bootlin.com>
Cc: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/bbdbdbe746fd227384d562e78bde98fba13f43e7.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
1f150edbea mmc: cb710: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Acked-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/4ef97a91053fe8819c651f7968fb56209faa36d8.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
f32b90e688 mmc: cavium: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Robert Richter <rric@kernel.org>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/9a7715ac3045d925cf2e88e23dca7acb17376468.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
5f0aa2f725 mmc: bcm2835: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Florian Fainelli <florian.fainelli@broadcom.com>
Cc: Ray Jui <rjui@broadcom.com>
Cc: Scott Branden <sbranden@broadcom.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/37a95baec1889f906134deb2dc761a98e950dcd1.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
16ca54d052 mmc: au1xmmc: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Manuel Lauss <manuel.lauss@gmail.com>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/7da94643484f7184be40fa517a8a74ce3cdefe19.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
56637056f9 mmc: atmel: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Aubin Constans <aubin.constans@microchip.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Acked-by: Aubin Constans <aubin.constans@microchip.com>
Link: https://lore.kernel.org/r/0688b77b93d27bd2f2e155fca6f53a1766fc3a80.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Binbin Zhou
2cf4083d39 mmc: alcor: Use devm_mmc_alloc_host() helper
Use new function devm_mmc_alloc_host() to simplify the code.

Cc: Feng Wei <feng.wei8@zte.com.cn>
Cc: Shao Mingyin <shao.mingyin@zte.com.cn>
Reviewed-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Link: https://lore.kernel.org/r/fcb69bf45d8ad4c2653c9e5e912ea8aed77fc3a2.1748933789.git.zhoubinbin@loongson.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Adrian Hunter
7dc0cee13d mmc: sdhci: Return void from sdhci_runtime_suspend|resume_host()
It does not seem like these functions will ever need the return value,
which is presently always zero.

Simplify the usage by making the return type 'void' instead.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250530165643.141295-1-adrian.hunter@intel.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Yixun Lan
7613b9b108 mmc: sdhci-of-k1: disable HW busy detection
It doesn't make sense to enable HW busy detection in pre_select_hs400(),
while disable it later in post_select_hs400(). And the reason behind this
isn't clear. Therefore, let's disable it for now.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/r/20250523-21-k1-sdhci-v1-2-9f293116a7e7@gentoo.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Yixun Lan
eed50f48d7 mmc: sdhci-of-k1: make register definition vendor specific
Making register definition less generic which will potentially have
less collision with other files.

Add SpacemiT vendor prefix to K1 SoC SDHC register definitions,
also improve the BIT definitions to reflect them more SDHC specific.

Note, there should be no functional changes introduced in this commit.

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/r/20250523-21-k1-sdhci-v1-1-9f293116a7e7@gentoo.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Luke Wang
f1dd21863d mmc: sdhci-esdhc-imx: optimize clock loopback selection with dummy pad support
For legacy platforms without dummy pad:
When clock <= 100MHz: Set ESDHC_MIX_CTRL_FBCLK_SEL to 0 (external clock
pad loopback) for better bus clock proximity.
When clock > 100MHz: Set ESDHC_MIX_CTRL_FBCLK_SEL to 1 (internal clock
loopback) to avoid signal reflection noise at high frequency.

For i.MX94/95 with dummy pad support:
Keep ESDHC_MIX_CTRL_FBCLK_SEL at 0 for all speed mode. Hardware
automatically substitutes clock pad loopback with dummy pad loopback
when available, eliminating signal reflections while preserving better
bus clock proximity.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250521025502.112030-2-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Luke Wang
45310531a3 mmc: sdhci-esdhc-imx: refactor clock loopback selection logic
i.MX reference manual specifies that internal clock loopback should be
used for SDR104/HS200/HS400 modes. Move ESDHC_MIX_CTRL_FBCLK_SEL
configuration into the timing selection function to:

1. Explicitly set internal loopback path for SDR104/HS200/HS400 modes
2. Avoid redundant bit manipulation across multiple functions

Preserve ESDHC_MIX_CTRL_FBCLK_SEL during system resume for SDIO devices
with MMC_PM_KEEP_POWER and MMC_PM_WAKE_SDIO_IRQ flag, as the controller
might lose register state during suspend while skipping card
re-initialization.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250521025502.112030-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:22 +02:00
Haibo Chen
031d9e30d5 mmc: sdhci-esdhc-imx: Don't change pinctrl in suspend if wakeup source
The pinctrl sleep state may config the pin mux to certain function to save
power in system suspend. Unfortunately this doesn't work if usdhc is used
as a wakeup source, like waking up on SDIO irqs or card-detect irqs. In
these cases, we need pin mux to be configured to usdhc function pad.

The issue is found on imx93-11x11-evk board, where WiFI over SDIO with
in-band irqs fails to wakeup the system, because the DATA[1] pin has been
set to GPIO function.

To fix the problem, don't change the pinctrl state in suspend if there is a
system wakeup enabled.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Link: https://lore.kernel.org/r/20250521033134.112671-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:43:21 +02:00
Victor Shih
49b14db035 mmc: sdhci-uhs2: Adjust some error messages and register dump for SD UHS-II card
Adjust some error messages to debug mode and register dump to dynamic
debug mode to avoid causing misunderstanding it is an error.

Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250606110121.96314-4-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:38:32 +02:00
Victor Shih
2881ba9af0 mmc: sdhci: Add a helper function for dump register in dynamic debug mode
Add a helper function for dump register in dynamic debug mode.

Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250606110121.96314-3-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:38:10 +02:00
Victor Shih
14633da0f4 mmc: core: Adjust some error messages for SD UHS-II cards
Adjust some error messages to debug mode to avoid causing
misunderstanding it is an error.

Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: 9a9f7e1395 ("mmc: core: Support UHS-II card control and access")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250606110121.96314-2-victorshihgli@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-24 12:38:02 +02:00
Masami Hiramatsu (Google)
f5de469990 mtk-sd: Prevent memory corruption from DMA map failure
If msdc_prepare_data() fails to map the DMA region, the request is
not prepared for data receiving, but msdc_start_data() proceeds
the DMA with previous setting.
Since this will lead a memory corruption, we have to stop the
request operation soon after the msdc_prepare_data() fails to
prepare it.

Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Fixes: 208489032b ("mmc: mediatek: Add Mediatek MMC driver")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/174972756982.3337526.6755001617701603082.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-19 13:00:40 +02:00
Masami Hiramatsu (Google)
539d80575b mtk-sd: Fix a pagefault in dma_unmap_sg() for not prepared data
When swiotlb buffer is full, the dma_map_sg() returns 0 to
msdc_prepare_data(), but it does not check it and sets the
MSDC_PREPARE_FLAG.

swiotlb_tbl_map_single() /* prints "swiotlb buffer is full" */
  <-swiotlb_map()
    <-dma_direct_map_page()
      <-dma_direct_map_sg()
        <-__dma_map_sg_attrs()
          <-dma_map_sg_attrs()
            <-dma_map_sg()  /* returns 0 (pages mapped) */
              <-msdc_prepare_data()

Then, the msdc_unprepare_data() checks MSDC_PREPARE_FLAG and calls
dma_unmap_sg() with unmapped pages. It causes a page fault.

To fix this problem, Do not set MSDC_PREPARE_FLAG if dma_map_sg()
fails because this is not prepared.

Fixes: 208489032b ("mmc: mediatek: Add Mediatek MMC driver")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Tested-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/174908565814.4056588.769599127120955383.stgit@mhiramat.tok.corp.google.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09 15:32:34 +02:00
Dan Carpenter
3358b836d4 mmc: sdhci-of-k1: Fix error code in probe()
If spacemit_sdhci_get_clocks() fails, then propagate the error code.
Don't return success.

Fixes: e5502d15b0 ("mmc: sdhci-of-k1: add support for SpacemiT K1 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/aDVTtQdXVtRhxOrb@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09 15:20:01 +02:00
Avri Altman
009c3a4bc4 mmc: core: sd: Apply BROKEN_SD_DISCARD quirk earlier
Move the BROKEN_SD_DISCARD quirk for certain SanDisk SD cards from the
`mmc_blk_fixups[]` to `mmc_sd_fixups[]`. This ensures the quirk is
applied earlier in the device initialization process, aligning with the
reasoning in [1]. Applying the quirk sooner prevents the kernel from
incorrectly enabling discard support on affected cards during initial
setup.

[1] https://lore.kernel.org/all/20240820230631.GA436523@sony.com

Fixes: 07d2872bf4 ("mmc: core: Add SD card quirk for broken discard")
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250526114445.675548-1-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-06-09 15:19:12 +02:00
Ingo Molnar
41cb08555c treewide, timers: Rename from_timer() to timer_container_of()
Move this API to the canonical timer_*() namespace.

[ tglx: Redone against pre rc1 ]

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/aB2X0jCKQO56WdMt@gmail.com
2025-06-08 09:07:37 +02:00
Linus Torvalds
f66bc387ef SCSI misc on 20250529
Updates to the usual drivers (smartpqi, ufs, lpfc, scsi_debug, target,
 hisi_sas) with the only substantive core change being the removal of
 the stream_status member from the scsi_stream_status_header (to get
 rid of flex array members).
 
 Signed-off-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCaDiQ2CYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishWtDAP9p0Jd/
 H4VMpYT5iETyq3TeAXTm1jVXL9Gnux5JMfskGwEA9kST8O6gorVOVKck+Eq0Hc9r
 w8NDnBK91hknIai5kE8=
 =/1L9
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "Updates to the usual drivers (smartpqi, ufs, lpfc, scsi_debug, target,
  hisi_sas) with the only substantive core change being the removal of
  the stream_status member from the scsi_stream_status_header (to get
  rid of flex array members)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (77 commits)
  scsi: target: core: Constify struct target_opcode_descriptor
  scsi: target: core: Constify enabled() in struct target_opcode_descriptor
  scsi: hisi_sas: Fix warning detected by sparse
  scsi: mpt3sas: Fix _ctl_get_mpt_mctp_passthru_adapter() to return IOC pointer
  scsi: sg: Remove unnecessary NULL check before unregister_sysctl_table()
  scsi: ufs: mcq: Delete ufshcd_release_scsi_cmd() in ufshcd_mcq_abort()
  scsi: ufs: qcom: dt-bindings: Document the SM8750 UFS Controller
  scsi: mvsas: Fix typos in SAS/SATA VSP register comments
  scsi: fnic: Replace memset() with eth_zero_addr()
  scsi: ufs: core: Support updating device command timeout
  scsi: ufs: core: Change hwq_id type and value
  scsi: ufs: core: Increase the UIC command timeout further
  scsi: zfcp: Simplify workqueue allocation
  scsi: ufs: core: Print error value as hex format in ufshcd_err_handler()
  scsi: sd: Remove the stream_status member from scsi_stream_status_header
  scsi: docs: Clean up some style in scsi_mid_low_api
  scsi: core: Remove unused scsi_dev_info_list_del_keyed()
  scsi: isci: Remove unused sci_remote_device_reset()
  scsi: scsi_debug: Reduce DEF_ATOMIC_WR_MAX_LENGTH
  scsi: smartpqi: Delete a stray tab in pqi_is_parity_write_stream()
  ...
2025-05-29 22:17:52 -07:00
Ulf Hansson
61bd8e7602 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.15-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.16.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 14:26:54 +02:00
Judith Mendez
71c9475b1e mmc: sdhci_am654: Add SDHCI_QUIRK2_SUPPRESS_V1P8_ENA quirk to am62 compatible
Add a new struct for platform data for the ti,am62-sdhci compatible to
apply additional quirks, namely "SDHCI_QUIRK2_SUPPRESS_V1P8_ENA", to
host controllers with am62 compatible.

Note, the fix was originally introduced by commit 941a7abd46
("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch") but was
found to be applied too broadly and had to be reverted.

This fixes MMC init failures seen across am62x boards.

Fixes: ac5a41b472 ("Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch"")
Fixes: 941a7abd46 ("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch")
Cc: stable@vger.kernel.org
Suggested-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Judith Mendez <jm@ti.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250516203121.3736379-1-jm@ti.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 14:26:12 +02:00
Haibo Chen
61704413de mmc: sdhci-esdhc-imx: fix few build warnings
drivers/mmc/host/sdhci-esdhc-imx.c:1566 sdhci_esdhc_imx_hwinit() warn: inconsistent indenting
drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_min'.
drivers/mmc/host/sdhci-esdhc-imx.c:1251 esdhc_executing_tuning() error: uninitialized symbol 'target_max'.

Fixes: be953af79c ("mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning")
Fixes: 541a95e64d ("mmc: sdhci-esdhc-imx: optimize the manual tuing logic to get the best timing")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/all/202505160225.Csr5USfq-lkp@intel.com/
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20250516-b4-usdhc-v2-1-3fccd02f5602@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 14:02:48 +02:00
Yumeng Fang
e249e584d0 mmc: bcm2835: Use str_read_write() helper
Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: Yumeng Fang <fang.yumeng@zte.com.cn>
Link: https://lore.kernel.org/r/20250515204201502Kzmj4I6k5Fv2FjqyEjF6n@zte.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 14:00:50 +02:00
Luke Wang
676a838556 mmc: host: sdhci-esdhc-imx: refactor the system PM logic
Current suspend/resume logic has one issue. In suspend, will config
register when call sdhci_suspend_host(), but at this time, can't
guarantee host in runtime resume state. If not, the per clock is gate
off, access register will hang.

In sdhci_esdhc_suspend/sdhci_esdhc_resume, remove sdhci_suspend_host()
and sdhci_resume_host(), all are handled in runtime PM callbacks except
the wakeup irq setting. For wakeup irq setting, use pm_runtime_get_sync()
in sdhci_esdhc_suspend() to make sure clock gate on.

Remove pinctrl_pm_select_default_state() in sdhci_esdhc_resume, because
pm_runtime_force_resume() already config the pinctrl state according to
ios timing, and here config the default pinctrl state again is wrong for
SDIO3.0 device if it keep power in suspend.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250514094903.1771642-2-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 13:56:49 +02:00
Luke Wang
b8b0f46d15 mmc: sdhci: export APIs for sdhci irq wakeup
Export the sdhci_enable_irq_wakeups() and sdhci_disable_irq_wakeups,
so other driver can use them.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250514094903.1771642-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 13:54:31 +02:00
Yixun Lan
e5502d15b0 mmc: sdhci-of-k1: add support for SpacemiT K1 SoC
The SDHCI controller found in SpacemiT K1 SoC features SD,
SDIO, eMMC support, such as:

- Compatible for 4-bit SDIO 3.0 UHS-I protocol, up to SDR104
- Compatible for 4-bit SD 3.0 UHS-I protocol, up to SDR104
- Compatible for 8bit eMMC5.1, up to HS400

Signed-off-by: Yixun Lan <dlan@gentoo.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250509-20-k1-sdhci-v3-2-526c35feaa20@gentoo.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 13:40:06 +02:00
Loic Poulain
f0534aace3 mmc: core: Scan the eMMC boot areas for partition table
It appears that some vendors provision the boot areas with valid part
tables (GPT) in order to have identifiable partitions for device and
firmware specific data, such has the qualcomm CDT (Qualcomm Config
Data Table). Additionally, these boot areas can be utilized to host
device-specific IDs, calibration data, and other critical information.

Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250507134538.575912-1-loic.poulain@oss.qualcomm.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-19 13:22:10 +02:00
Ulf Hansson
eb68ba4af6 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.15-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.16.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:56 +02:00
Wolfram Sang
9e654f2bf3 mmc: rename mmc_boot_partition_access() to mmc_host_can_access_boot()
It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers and reword it slightly.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-10-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:48 +02:00
Wolfram Sang
f55f7da621 mmc: rename mmc_host_uhs() to mmc_host_can_uhs()
It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-9-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:48 +02:00
Wolfram Sang
dc03e2e9f0 mmc: rename mmc_host_done_complete() to mmc_host_can_done_complete()
It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-8-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:48 +02:00
Wolfram Sang
03b31a0638 mmc: rename mmc_host_cmd23() to mmc_host_can_cmd23()
It is not obvious that this functions checks capabilities. Rename it to
include '_can' like other capability helpers.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250501063325.7262-7-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:48 +02:00
Randy Dunlap
5846efac13 mmc: sdhci-esdhc-imx: fix defined but not used warnings
Fix warnings when CONFIG_PM=y and CONFIG_PM_SLEEP is not set by
surrounding the 2 functions with #ifdef CONFIG_PM_SLEEP.

drivers/mmc/host/sdhci-esdhc-imx.c:1659:13: warning: 'sdhc_esdhc_tuning_restore' defined but not used [-Wunused-function]
 1659 | static void sdhc_esdhc_tuning_restore(struct sdhci_host *host)
drivers/mmc/host/sdhci-esdhc-imx.c:1637:13: warning: 'sdhc_esdhc_tuning_save' defined but not used [-Wunused-function]
 1637 | static void sdhc_esdhc_tuning_save(struct sdhci_host *host)

Fixes: 3d1eea493894 ("mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20250424034610.441532-1-rdunlap@infradead.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:07:48 +02:00
Nicolas Frattaroli
08f959759e mmc: sdhci-of-dwcmshc: add PD workaround on RK3576
RK3576's power domains have a peculiar design where the PD_NVM power
domain, of which the sdhci controller is a part, seemingly does not have
idempotent runtime disable/enable. The end effect is that if PD_NVM gets
turned off by the generic power domain logic because all the devices
depending on it are suspended, then the next time the sdhci device is
unsuspended, it'll hang the SoC as soon as it tries accessing the CQHCI
registers.

RK3576's UFS support needed a new dev_pm_genpd_rpm_always_on function
added to the generic power domains API to handle what appears to be a
similar hardware design.

Use this new function to ask for the same treatment in the sdhci
controller by giving rk3576 its own platform data with its own postinit
function. The benefit of doing this instead of marking the power domains
always on in the power domain core is that we only do this if we know
the platform we're running on actually uses the sdhci controller. For
others, keeping PD_NVM always on would be a waste, as they won't run
into this specific issue. The only other IP in PD_NVM that could be
affected is FSPI0. If it gets a mainline driver, it will probably want
to do the same thing.

Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Fixes: cfee1b5077 ("pmdomain: rockchip: Add support for RK3576 SoC")
Cc: <stable@vger.kernel.org> # v6.15+
Link: https://lore.kernel.org/r/20250423-rk3576-emmc-fix-v3-1-0bf80e29967f@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 17:01:42 +02:00
Philipp Stanner
c02c658cc9 mmc: cavium-thunderx: Use non-hybrid PCI devres API
cavium-thunderx enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.

The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.

Moreover, since both functions are already managed in this driver, the
calls to pci_release_regions() are unnecessary.

Remove the calls to pci_release_regions().

Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Link: https://lore.kernel.org/r/20250417092742.27887-2-phasta@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:18 +02:00
Axe Yang
920e6bfa6a mmc: mtk-sd: Add condition to enable 'single' burst type
This change add a condition for 'single' burst type selection.

Read AXI_LEN field from EMMC50_CFG2(AHB2AXI wrapper) register, if the
value is not 0, it means the HWIP is using AXI as AMBA bus, which do
not support 'single' burst type.

Suggested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Axe Yang <axe.yang@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250411054134.31822-1-axe.yang@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:18 +02:00
Luke Wang
1c7387579d mmc: sdhci-esdhc-imx: switch standard tuning to manual tuning
Current standard tuning has some limitations:

1. Standard tuning only try 40 times to find first pass window, but this
pass window maybe not the best pass window.

2. Sometimes there are two tuning pass windows and the gap between
those two windows may only have one cell. If tuning step > 1, the gap may
just be skipped and host assumes those two windows as a continuous
windows. This will cause a bad delay cell near the gap to be selected.

3. Standard tuning logic need to detect at least one success and failure
to pass the tuning. If all cells in the tuning window pass, the hardware
will not set the SDHCI_CTRL_TUNED_CLK bit, causing tuning failed.

4. Standard tuning logic only check the CRC, do not really compare the data
pattern. If data pins are connected incorrectly, standard will not detect
this kind of issue.

Switch to manual tuning to avoid those limitations

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-7-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:18 +02:00
Luke Wang
309d7ef65f mmc: sdhci-esdhc-imx: verify tuning control status after configuration
Enhance manual tuning configuration reliability by adding tuning control
status checks per the i.MX Reference Manual recommendations.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-6-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Haibo Chen
8cdba34313 mmc: sdhci-esdhc-imx: widen auto-tuning window for manual tuning
Expand the auto-tuning window width from 0 to 3 for manual tuning to
account for sampling point shifts caused by temperature change. This change
is based on hardware recommendation, providing enough margin for the
auto-tuning logic to locate valid sampling points.

When config the manual tuning final sample delay, need deduct the auto
tuning window width according to the IP logic.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-5-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Haibo Chen
be953af79c mmc: sdhci-esdhc-imx: widen auto-tuning window for standard tuning
Expand the auto-tuning window width from 2 to 3 for standard tuning to
account for sampling point shifts caused by temperature change. This change
is based on hardware recommendation, providing 50% more margin for the
auto-tuning logic to locate valid sampling points.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-4-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Haibo Chen
d0aac7d811 mmc: sdhci-esdhc-imx: reset async FIFO before sending manual tuning command
During manual tuning, residual data in the async FIFO from previous
commands may impact with the tuning process. To ensure a clean state:

1. Set the RST_FIFO bit (SYS_CTRL[22]) to reset the async FIFO.
2. Poll the bit until self-cleared, confirming reset completion.

This hardening ensures the tuning command starts with a clean FIFO state,
improving the reliability of the manual tuning procedure.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-3-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Haibo Chen
0d7831f04d mmc: sdhci-esdhc-imx: explicitly reset tuning circuit via RSTT bit
According to the i.MX Reference Manual, the RSTT bit (SYS_CTRL[28]) is
designed to reset the tuning circuit. While the Reference Manual states
that clearing EXECUTE_TUNING bit from 1 to 0 in AUTOCMD12_ERR_STATUS
can also set RSTT, this mechanism only works when the original
EXECUTE_TUNING bit was 1. When the bit is already 0, the tuning circuit
reset will not be triggered.

This explicit reset approach strengthens the tuning reliability and
aligns with the Reference Manual recommendations.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409075550.3413032-2-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Luke Wang
0ea6055c96 mmc: sdhci-esdhc-imx: calculate data timeout value based on clock
Calculate data timeout value based on clock instead of using max value.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250409072604.3410459-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
2e1a26ed6b mmc: rename mmc_can_gpio_ro() to mmc_host_can_gpio_ro()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'host'.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-12-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
da012e1eb5 mmc: rename mmc_can_gpio_cd() to mmc_host_can_gpio_cd()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'host'.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-11-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
b89d05f654 mmc: rename mmc_can_trim() to mmc_card_can_trim()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-10-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
e3df5ae476 mmc: rename mmc_can_sleep() to mmc_card_can_sleep()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-9-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
55e0961a8b mmc: rename mmc_can_secure_erase_trim() to mmc_card_can_secure_erase_trim()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-8-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
2abda04856 mmc: rename mmc_can_sanitize() to mmc_card_can_sanitize()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-7-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
07dd2b3204 mmc: rename mmc_can_reset() to mmc_card_can_reset()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here. Conversion was simplified by
inverting the logic.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-6-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
d872c26741 mmc: rename mmc_can_poweroff_notify() to mmc_card_can_poweroff_notify()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-5-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
ceb5d3acb0 mmc: rename mmc_can_ext_csd() to mmc_card_can_ext_csd()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-4-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
5513d9bebb mmc: rename mmc_can_erase() to mmc_card_can_erase()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-3-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Wolfram Sang
76d62cde68 mmc: rename mmc_can_discard() to mmc_card_can_discard()
mmc_can_* functions sometimes relate to the card and sometimes to the host.
Make it obvious by renaming this function to include 'card'. Also, convert to
proper bool type while we are here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250401095847.29271-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Feng Wei
7ea500bca6 mmc: alcor: Use str_read_write() helper
Remove hard-coded strings by using the str_read_write() helper.

Signed-off-by: Feng Wei <feng.wei8@zte.com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn>
Link: https://lore.kernel.org/r/20250401195751834zbm34YDvwPeQf7ooZBCdh@zte.com.cn
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:17 +02:00
Biju Das
18da3ecdba mmc: renesas_sdhi: Use of_get_available_child_by_name()
Use the helper of_get_available_child_by_name() to simplify
renesas_sdhi_probe().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20250407092144.35268-1-biju.das.jz@bp.renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
AngeloGioacchino Del Regno
b70721fd84 mmc: mtk-sd: Aggregate R/W for top_base iospace case where possible
In case the controller uses the top_base iospace, most register
read/writes can be changed from multiple RWs to a single read
and a single write.

Where possible, and where it makes sense, aggregate the multiple
reads and writes to just one.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250325110701.52623-5-angelogioacchino.delregno@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
AngeloGioacchino Del Regno
1649904e84 mmc: mtk-sd: Do single write in function msdc_new_tx_setting
Instead of reading and writing the LOOP_TEST_CONTROL register for
each set or cleared bit, read it once, modify the contents in a
local variable, and then write once.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250325110701.52623-4-angelogioacchino.delregno@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
AngeloGioacchino Del Regno
091bf793eb mmc: mtk-sd: Aggregate writes for MSDC_PATCH_BIT1/2 setup
Instead of continuously reading and writing to the patch bit 1/2
registers, prepare the final values to write to those and write
just once per register during the setup phase.

This makes the driver slightly smaller and also slightly improves
the execution time of the msdc_init_hw function, called not only
at probe time, but also when resuming from system suspend.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250325110701.52623-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
AngeloGioacchino Del Regno
6cdf5f1d7d mmc: mtk-sd: Clarify patch bit register initialization and layout
In preparation for cleaning up the msdc_init_hw register setting
for the patch bit registers, add the necessary definitions for
bits in the MSDC_PATCH_BIT and MSDC_PATCH_BIT1 registers and use
them in place of "magic numbers" writes during initialization.

This commit brings no functional differences.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20250325110701.52623-2-angelogioacchino.delregno@collabora.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
Luke Wang
c63d25cdc5 mmc: sdhci-esdhc-imx: Save tuning value when card stays powered in suspend
For SoCs like i.MX6UL(L/Z) and i.MX7D, USDHC powers off completely during
system power management (PM), causing the internal tuning status to be
lost. To address this, save the tuning value when system suspend and
restore it for any command issued after system resume when re-tuning is
held.

A typical case involves SDIO WiFi devices with the MMC_PM_KEEP_POWER and
MMC_PM_WAKE_SDIO_IRQ flag, which retain power during system PM. To
conserve power, WiFi switches to 1-bit mode and restores 4-bit mode upon
resume. As per the specification, tuning commands are not supported in
1-bit mode. When sending CMD52 to restore 4-bit mode, re-tuning must be
held. However, CMD52 still requires a correct sample point to avoid CRC
errors, necessitating preservation of the previous tuning value.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250328112517.2624806-1-ziniu.wang_1@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
Ulf Hansson
dfc29a10c4 mmc: core: Add support for graceful host removal for SD
An mmc host driver may allow to unbind from its corresponding host device.
If an SD card is attached to the host, the mmc core will just try to cut
the power for it, without obeying to the SD spec that potentially may
damage the card.

Let's fix this problem by implementing a graceful power-down of the card at
host removal.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-6-ulf.hansson@linaro.org
2025-05-14 16:59:16 +02:00
Ulf Hansson
5b79352290 mmc: core: Add support for graceful host removal for eMMC
An mmc host driver may allow to unbind from its corresponding host device.
If an eMMC card is attached to the host, the mmc core will just try to cut
the power for it, without obeying to the eMMC spec.

Potentially this may damage the card and it may also prevent us from
successfully doing a re-initialization of it, which would typically happen
if/when we try to re-bind the mmc host driver.

To fix these problems, let's implement a graceful power-down of the card at
host removal.

Reported-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-5-ulf.hansson@linaro.org
2025-05-14 16:59:16 +02:00
Ulf Hansson
900ef53558 mmc: core: Convert into an enum for the poweroff-type for eMMC
Currently we are only distinguishing between the suspend and the shutdown
scenarios, which make a bool sufficient as in-parameter to the various PM
functions for eMMC. However, to prepare for adding support for another
scenario in a subsequent change, let's convert into using an enum.

Suggested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-4-ulf.hansson@linaro.org
2025-05-14 16:59:16 +02:00
Ulf Hansson
fa34c940e8 mmc: core: Further avoid re-storing power to the eMMC before a shutdown
To manage a graceful power-off of the eMMC card during platform shutdown,
the prioritized option is to use the poweroff-notification command, if the
eMMC card supports it.

During a suspend request we may decide to fall back to use the sleep
command, instead of the poweroff-notification, unless the mmc host supports
a complete power-cycle of the eMMC. For this reason, we may need to restore
power and re-initialize the card, if it remains suspended when a shutdown
request is received.

However, the current condition to restore power and re-initialize the card
doesn't take into account MMC_CAP2_FULL_PWR_CYCLE_IN_SUSPEND properly. This
may lead to doing a re-initialization when it really isn't needed, as the
eMMC may already have been powered-off using the poweroff-notification
command. Let's fix the condition to avoid this.

Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-3-ulf.hansson@linaro.org
2025-05-14 16:59:16 +02:00
Ulf Hansson
3953e7e8c1 mmc: core: Convert mmc_can_poweroff_notify() into a bool
It's really a true/false value that matters, let's make it clear by
returning a bool instead.

Reviewed-by: Avri Altman <avri.altman@sandisk.com>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20250407152759.25160-2-ulf.hansson@linaro.org
2025-05-14 16:59:16 +02:00
Erick Shepherd
9510b38dc0 mmc: Add quirk to disable DDR50 tuning
Adds the MMC_QUIRK_NO_UHS_DDR50_TUNING quirk and updates
mmc_execute_tuning() to return 0 if that quirk is set. This fixes an
issue on certain Swissbit SD cards that do not support DDR50 tuning
where tuning requests caused I/O errors to be thrown.

Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250331221337.1414534-1-erick.shepherd@ni.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
Wolfram Sang
7473647c35 mmc: renesas_sdhi: improve registering irqs
The probe() function is convoluted enough, so merge sanity checks for
number of irqs into one place. Also, change the error code for 'no irq'
because ENXIO will not print a warning from the driver core.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250331064400.16677-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-05-14 16:59:16 +02:00
Gaurav Kashyap
7cc6e0c34b scsi: soc: qcom: ice: Add HWKM support to the ICE driver
Qualcomm's Inline Crypto Engine (ICE) version 3.2 and later includes a
key management hardware block called the Hardware Key Manager (HWKM).
Add support for HWKM to the ICE driver.  HWKM provides hardware-wrapped
key support where the ICE (storage) keys are not exposed to software and
instead are protected in hardware.  Later patches will wire up this
feature to ufs-qcom and sdhci-msm using the support added in this patch.

HWKM and legacy mode are currently mutually exclusive.  The selection of
which mode to use has to be made before the storage driver(s) registers
any inline encryption capable disk(s) with the block layer (i.e.,
generally at boot time) so that the appropriate crypto capabilities can
be advertised to upper layers.  Therefore, make the ICE driver select
HWKM mode when the all of the following are true:

 - The new module parameter qcom_ice.use_wrapped_keys=1 is specified.

 - HWKM is present and is at least v2, i.e. ICE is v3.2.1 or later.

 - The SCM calls needed to fully use HWKM are supported by TrustZone.

[EB: merged related patches; fixed the module parameter to work
     correctly; dropped unnecessary support for HWKM v1; fixed error
     handling; improved log messages, comments, and commit message;
     fixed naming; merged enable and init functions; and other cleanups]

Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Co-developed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20250404231533.174419-3-ebiggers@kernel.org
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-04-11 21:10:30 -04:00
Eric Biggers
11d4c388a3 scsi: soc: qcom: ice: Make qcom_ice_program_key() take struct blk_crypto_key
qcom_ice_program_key() currently accepts the key as an array of bytes,
algorithm ID, key size enum, and data unit size.  However both callers
have a struct blk_crypto_key which contains all that information.  Thus
they both have similar code that converts the blk_crypto_key into the
form that qcom_ice_program_key() wants.  Once wrapped key support is
added, the key type would need to be added to the arguments too.

Therefore, this patch changes qcom_ice_program_key() to take in all this
information as a struct blk_crypto_key directly.  The calling code is
updated accordingly.  This ends up being much simpler, and it makes the
key type be passed down automatically once wrapped key support is added.

Based on a patch by Gaurav Kashyap <quic_gaurkash@quicinc.com> that
replaced the byte array argument only.  This patch makes the
blk_crypto_key replace other arguments like the algorithm ID too,
ensuring that there remains only one source of truth.

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20250404231533.174419-2-ebiggers@kernel.org
Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org> # For MMC
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2025-04-11 21:10:29 -04:00
Wolfram Sang
77183db6b8 mmc: renesas_sdhi: disable clocks if registering regulator failed
Because the clocks were just enabled, bail out to the proper target if
there are problems with the regulator.

Fixes: fae80a99dc ("mmc: renesas_sdhi: Add support for RZ/G3E SoC")
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250330221732.56072-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-04-07 17:58:41 +02:00
Arnd Bergmann
9078f01fec mmc: renesas_sdhi: add regulator dependency
The driver started using the regulator subsystem and fails to build without
a dependeny on CONFIG_REGULATOR:

ERROR: modpost: "rdev_get_drvdata" [drivers/mmc/host/renesas_sdhi_core.ko] undefined!
ERROR: modpost: "devm_regulator_register" [drivers/mmc/host/renesas_sdhi_core.ko] undefined!

The 'select RESET_CONTROLLER' needs to either go away or get changed to a dependency
in order to avoid Kconfig dependency loops here. It also turns out the the superh
version needs neither RESET_CONTROLLER nor REGULATOR, and this works because
CONFIG_OF is not set there.

Change both to a 'depends on', but add '|| !OF' for the superh case.

Fixes: fae80a99dc ("mmc: renesas_sdhi: Add support for RZ/G3E SoC")
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20250329164145.3194284-1-arnd@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-04-07 17:57:01 +02:00
Ruslan Piasetskyi
649b50a82f mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
After moving tmio_mmc_host_probe down, error handling has to be
adjusted.

Fixes: 74f45de394 ("mmc: renesas_sdhi: register irqs before registering controller")
Reviewed-by: Ihar Salauyou <salauyou.ihar@gmail.com>
Signed-off-by: Ruslan Piasetskyi <ruslan.piasetskyi@gmail.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250326220638.460083-1-ruslan.piasetskyi@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-04-07 17:49:16 +02:00
Thomas Gleixner
8fa7292fee treewide: Switch/rename to timer_delete[_sync]()
timer_delete[_sync]() replaces del_timer[_sync](). Convert the whole tree
over and remove the historical wrapper inlines.

Conversion was done with coccinelle plus manual fixups where necessary.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2025-04-05 10:30:12 +02:00
Linus Torvalds
a9fc230497 soc: driver updates for 6.15, part 1
These are the updates for SoC specific drivers and related subsystems:
 
  - Firmware driver updates for SCMI, FF-A and SMCCC firmware interfaces,
    adding support for additional firmware features including SoC
    identification and FF-A SRI callbacks as well as various bugfixes
 
  - Memory controller updates for Nvidia and Mediatek
 
  - Reset controller support for microchip sam9x7 and imx8qxp/imx8qm
 
  - New hardware support for multiple Mediatek, Renesas and Samsung Exynos chips
 
  - Minor updates on Zynq, Qualcomm, Amlogic, TI, Samsung, Nvidia and Apple chips
 
 There will be a follow up with a few more driver updates that are still
 causing build regressions at the moment.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmfkIIkACgkQYKtH/8kJ
 UifSJg//cnhEFErOIMxWeNcnNBKY2ly7VXRBwCU10jXXri16VMIz601vEb8du+qU
 Wyoi2LlTeXx6cKkfsPEYgbbpo9iOHli0y8RHpQe2LwfCfSNK4ToXtL+aYPgLJQD8
 4jdEv/QLnPnHsRp9+XW4HND9ZCV7N5CFaqozFe6BLWSczW4OYkUSXVfNN2VUDb8F
 cYy4+bRpZ1MQ6cmSCFXMJJ9BT/aBb4o0WGgr9jKe5p4YgDFjaw7a6sinVqBmoyoi
 bVNbEVSYrOFF03CoSpA+oRblE+lWQneWUHwUaXMPIcfScsbJ/5j2r1jjBhYauiTv
 memmeZJBg4w+gTlLVRlV66dhmRcwQhIOId2Or3yvnOoohnEZbV4KMR0P/cblfVvl
 0TV4uRJh3uKoHYXpDIw3URz68a6ceW86JUx7kfBU+gVhDKKve3YowozFs8DTsE5s
 xUlhXarEnimFlicslckl0vsFudwk8ovoFe0ahdBk1KZ0wBMtbBWdrQMECkWF0PlG
 8D4CilSq78jE9vTpSN7aEZB+xcLGUhYfusCJe2Wut6ZEATVUB9RSLHkgSPG44an2
 szJwm2oI7uVIfj7VhaSglK1JpCXQJPycGC4Y6D2DO1QDjb7UveCs3s2DbMx78G/r
 Rj5NpQh8vZjTozE3nQhvC0dPglrpo4OipsyOlVl2ZMm5u4C5e4s=
 =QcjY
 -----END PGP SIGNATURE-----

Merge tag 'soc-drivers-6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc

Pull SoC driver updates from Arnd Bergmann:
 "These are the updates for SoC specific drivers and related subsystems:

   - Firmware driver updates for SCMI, FF-A and SMCCC firmware
     interfaces, adding support for additional firmware features
     including SoC identification and FF-A SRI callbacks as well as
     various bugfixes

   - Memory controller updates for Nvidia and Mediatek

   - Reset controller support for microchip sam9x7 and imx8qxp/imx8qm

   - New hardware support for multiple Mediatek, Renesas and Samsung
     Exynos chips

   - Minor updates on Zynq, Qualcomm, Amlogic, TI, Samsung, Nvidia and
     Apple chips

  There will be a follow up with a few more driver updates that are
  still causing build regressions at the moment"

* tag 'soc-drivers-6.15-1' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (97 commits)
  irqchip: Add support for Amlogic A4 and A5 SoCs
  dt-bindings: interrupt-controller: Add support for Amlogic A4 and A5 SoCs
  reset: imx: fix incorrect module device table
  dt-bindings: power: qcom,kpss-acc-v2: add qcom,msm8916-acc compatible
  bus: qcom-ssc-block-bus: Fix the error handling path of qcom_ssc_block_bus_probe()
  bus: qcom-ssc-block-bus: Remove some duplicated iounmap() calls
  soc: qcom: pd-mapper: Add support for SDM630/636
  reset: imx: Add SCU reset driver for i.MX8QXP and i.MX8QM
  dt-bindings: firmware: imx: add property reset-controller
  dt-bindings: reset: atmel,at91sam9260-reset: add sam9x7
  memory: mtk-smi: Add ostd setting for mt8192
  dt-bindings: soc: samsung: exynos-usi: Drop unnecessary status from example
  firmware: tegra: bpmp: Fix typo in bpmp-abi.h
  soc/tegra: pmc: Use str_enable_disable-like helpers
  soc: samsung: include linux/array_size.h where needed
  firmware: arm_scmi: use ioread64() instead of ioread64_hi_lo()
  soc: mediatek: mtk-socinfo: Add extra entry for MT8395AV/ZA Genio 1200
  soc: mediatek: mt8188-mmsys: Add support for DSC on VDO0
  soc: mediatek: mmsys: Migrate all tables to MMSYS_ROUTE() macro
  soc: mediatek: mt8365-mmsys: Fix routing table masks and values
  ...
2025-03-27 09:05:55 -07:00
Linus Torvalds
9b960d8cd6 for-6.15/block-20250322
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmfe8BkQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpvTqD/4pOeGi/QfLyocn4TcJcidRGZAvBxecTVuM
 upeyr+dCyCi9Wk+EJKeAFooGe15upzxDxKj06HhCixaLx4etDK78uGV4FMM1Z4oa
 2dtchz1Zd0HyBPgQIUY8OuOgbS7tstMS/KdvL+gr5IjfapeTF+54WVLCD8eVyvO/
 vUIppgJBhrqy2qui4xF2lw4t2COt+/PqinGQuYALn4V4Po9NWA7lSh3ZI4F/byj1
 v68jXyt2fqCAyxwkzRDv4GxhN8c6W+TPJpzivrEAuSkLacovESKztinOrafrBnLR
 zdyO4n0V0yGOXbAcxRbADVA4HUsqhLl4JRnvE5P5zIaD7rkE0UqggF7vrSeCvVA1
 hsi1BhkAMNimKX7CZMnT3dJpxRQj1eDJxpwUAusLHWjMyQbNFhV7WAtthMtVJon8
 lAS4e5+xzjqKhF15GpVg5Lzy8SAwdqgNXwwq2zbM8OaPKG0FpajG8DXAqqcj4fpy
 WXnwg72KZDmRcSNJhVZK6B9xSAwIMXPgH4ClCMP9/xlw8EDpM38MDmzrs35TAVtI
 HGE3Qv9CjFjVj/OG3el+bTGIQJFVgYEVPV5TYfNCpKoxpj5cLn5OQY5u6MJawtgK
 HeDgKv3jw3lHatDALMVfwJqqVlUht0R6SIxtP9WHV+CcFrqN1LJKmdhDQbm7b4XK
 EbbawIsdxw==
 =Ci5m
 -----END PGP SIGNATURE-----

Merge tag 'for-6.15/block-20250322' of git://git.kernel.dk/linux

Pull block updates from Jens Axboe:

 - Fixes for integrity handling

 - NVMe pull request via Keith:
      - Secure concatenation for TCP transport (Hannes)
      - Multipath sysfs visibility (Nilay)
      - Various cleanups (Qasim, Baruch, Wang, Chen, Mike, Damien, Li)
      - Correct use of 64-bit BARs for pci-epf target (Niklas)
      - Socket fix for selinux when used in containers (Peijie)

 - MD pull request via Yu:
      - fix recovery can preempt resync (Li Nan)
      - fix md-bitmap IO limit (Su Yue)
      - fix raid10 discard with REQ_NOWAIT (Xiao Ni)
      - fix raid1 memory leak (Zheng Qixing)
      - fix mddev uaf (Yu Kuai)
      - fix raid1,raid10 IO flags (Yu Kuai)
      - some refactor and cleanup (Yu Kuai)

 - Series cleaning up and fixing bugs in the bad block handling code

 - Improve support for write failure simulation in null_blk

 - Various lock ordering fixes

 - Fixes for locking for debugfs attributes

 - Various ublk related fixes and improvements

 - Cleanups for blk-rq-qos wait handling

 - blk-throttle fixes

 - Fixes for loop dio and sync handling

 - Fixes and cleanups for the auto-PI code

 - Block side support for hardware encryption keys in blk-crypto

 - Various cleanups and fixes

* tag 'for-6.15/block-20250322' of git://git.kernel.dk/linux: (105 commits)
  nvmet: replace max(a, min(b, c)) by clamp(val, lo, hi)
  nvme-tcp: fix selinux denied when calling sock_sendmsg
  nvmet: pci-epf: Always configure BAR0 as 64-bit
  nvmet: Remove duplicate uuid_copy
  nvme: zns: Simplify nvme_zone_parse_entry()
  nvmet: pci-epf: Remove redundant 'flush_workqueue()' calls
  nvmet-fc: Remove unused functions
  nvme-pci: remove stale comment
  nvme-fc: Utilise min3() to simplify queue count calculation
  nvme-multipath: Add visibility for queue-depth io-policy
  nvme-multipath: Add visibility for numa io-policy
  nvme-multipath: Add visibility for round-robin io-policy
  nvmet: add tls_concat and tls_key debugfs entries
  nvmet-tcp: support secure channel concatenation
  nvmet: Add 'sq' argument to alloc_ctrl_args
  nvme-fabrics: reset admin connection for secure concatenation
  nvme-tcp: request secure channel concatenation
  nvme-keyring: add nvme_tls_psk_refresh()
  nvme: add nvme_auth_derive_tls_psk()
  nvme: add nvme_auth_generate_digest()
  ...
2025-03-26 18:08:55 -07:00
Linus Torvalds
0163c8864b MMC host:
- atmel-mci: Convert DT bindings to json schema
  - dw_mmc: Add support for the Exynos7870 variant
  - dw_mmc-rockchip: Add support for the RK3562/3528 variants
  - omap: Fix potential memory leak in the probe error path
  - renesas_sdhi: Add support for RZ/G3E variants
  - sdhci: Disable SD card clock before changing parameters
  - sdhci-esdhc-imx: Add support for the i.MX94 variant
  - sdhci-of-dwcmshc: Add support for the RK3562/RK3528 variants
  - sdhci-omap: Disable aggressive PM for eMMC/SD-cards
  - sdhci-pci-core: Wait for VDD to settle on card power off
  - sdhci-pxav3: Fix busy-signalling by using MMC_CAP_NEED_RSP_BUSY
  - sunxi-mmc: Add support for the A523 variant
 
 MEMSTICK:
  - rtsx_usb_ms: Fix potential use-after-free during remove
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmfifpgXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCl/pxAAuvv6EAxxz/kt5iZJoxxBxp6V
 TCBYNOKxxgHaD/fyWERCi9ON4+W2fJoghVolNblBFAxrdl/VdEzHAyB8YOHsQcno
 chFccV8n0bhxWzl5O2UTRTszP+3Fa/AdiQb5FR8NoAoNuDXwn673gxJUWT24pRcm
 8swMDQJiWLtJ5QskW+OWJXsdcuYa89FLOHgBnn+NVLTDUBqFgRuuVMhJA+td1rW4
 Pv5EMeFw3+AcUlBlHXUlFjq08I92kcDxxBXRpIvUwC586aKyire/quVOX+CmQquK
 i27RdU+UjCzbJp0FLK9+4DEm6uRK3EzQxUtNx8qGmj6xqkTj5jOj3/lMV7oOepOR
 bLBrmdXsOCSzIHuAYQSrVi1sBClSmnRSBgLgrouUo3AP9h+IAWtD928LeVZxD82Q
 mmDGh9EwStodEyZMwqbT41lsj33BEeXAWThNsZW+savFisfAMKBgrk3H2l8Qn+71
 MKUiA5OaXhTM8n6ihLIv26KCrdipBS31X1hIWWj7yJBNkNd0LIYnSzPyp126BFLT
 AwrR+CglTpEIc+0e8UMb9S8YgNgW3OCnYeF5BzVtyrZR7qNj96VaYyORTP+GkDhl
 S4+Jrsi+qjVoNDvgJ8htNkH0HyZj+qYJBNz7AIqdT4AW7TCCE4BVGQNWGPeUTTx6
 lGQtJkfT4nG+G0XmXGQ=
 =a9PQ
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "MMC host:
   - atmel-mci: Convert DT bindings to json schema
   - dw_mmc: Add support for the Exynos7870 variant
   - dw_mmc-rockchip: Add support for the RK3562/3528 variants
   - omap: Fix potential memory leak in the probe error path
   - renesas_sdhi: Add support for RZ/G3E variants
   - sdhci: Disable SD card clock before changing parameters
   - sdhci-esdhc-imx: Add support for the i.MX94 variant
   - sdhci-of-dwcmshc: Add support for the RK3562/RK3528 variants
   - sdhci-omap: Disable aggressive PM for eMMC/SD-cards
   - sdhci-pci-core: Wait for VDD to settle on card power off
   - sdhci-pxav3: Fix busy-signalling by using MMC_CAP_NEED_RSP_BUSY
   - sunxi-mmc: Add support for the A523 variant

  MEMSTICK:
   - rtsx_usb_ms: Fix potential use-after-free during remove"

* tag 'mmc-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (27 commits)
  mmc: core: Remove redundant null check
  mmc: host: Wait for Vdd to settle on card power off
  mmc: omap: Fix memory leak in mmc_omap_new_slot
  memstick: rtsx_usb_ms: Fix slab-use-after-free in rtsx_usb_ms_drv_remove
  mmc: renesas_sdhi: fix error code in renesas_sdhi_probe()
  mmc: sdhci-pxav3: set NEED_RSP_BUSY capability
  mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD
  tty: mmc: sdio: use bool for cts and remove parentheses
  dt-bindings: mmc: sunxi: add compatible strings for Allwinner A523
  dt-bindings: mmc: sunxi: Simplify compatible string listing
  dt-bindings: mmc: sdhci-of-dwcmhsc: Add compatible string for RK3528
  dt-bindings: mmc: rockchip-dw-mshc: Add compatible string for RK3528
  mmc: renesas_sdhi: Add support for RZ/G3E SoC
  dt-bindings: mmc: renesas,sdhi: Document RZ/G3E support
  dt-bindings: mmc: rockchip-dw-mshc: Add support for rk3562
  dt-bindings: mmc: Add support for rk3562 eMMC
  mmc: core: Trim trailing whitespace from card product names
  dt-bindings: mmc: atmel,hsmci: Convert to json schema
  dt-bindings: mmc: mmc-slot: Make compatible property optional
  dt-bindings: mmc: fsl-imx-esdhc: Add i.MX94 support
  ...
2025-03-25 20:36:29 -07:00
Linus Torvalds
5143840cef gpio updates for v6.15-rc1
GPIO core:
 - add sanitization of return values of GPIO provider callbacks so that invalid
   ones don't get propagated to user-space
 - add new variants of the line setter callbacks for GPIO providers that return
   an integer and allow to indicate driver errors to the GPIO core
 - change the interface of all gpiod_set_value() variants to return an integer
   thus becoming able to indicate failures in the underlying layer to callers
 - drop unneeded ERR_CAST in gpiolib-acpi
 - use for_each_if() where applicable
 - provide gpiod_multi_set_value_cansleep() as a new, simpler interface to
   gpiod_set_array_value_cansleep() and use it across several drivers treewide
 - reduce the number of atomic reads of the descriptor flags in gpiolib debugfs
   code
 - simplify for_each_hwgpio_in_range() and for_each_requested_gpio_in_range()
 - add support for three-cell GPIO specifiers in GPIO OF code
 - don't build HTE (hardware timestamp engine) GPIO code with the HTE subsystem
   disabled in Kconfig
 - unduplicate calls to gpiod_direction_input_nonotify()
 - rework the handling of the valid_mask property of GPIO chips: don't allow
   drivers to set it as it should only be handled by GPIO core and start
   actually enforcing it in GPIO core for *all* drivers, not only the ones
   implementing a custom request() callback
 - get the `ngpios` property from the fwnode of the GPIO chip, not its device in
   order to handle multi-bank GPIO chips
 
 Driver improvements:
 - convert a part of the GPIO drivers under drivers/gpio/ to using the new value
   setter callbacks
 - convert several drivers to using automatic lock guards from cleanup.h
 - allow building gpio-bt8xx with COMPILE_TEST=y
 - refactor gpio-74x164 (use devres, cleanup helpers, __counted_by() and bits.h
   macros)
 - refactor gpio-latch (use generic device properties, lock guards and some
   local variables for better readability)
 - refactor gpio-xilinx (improve the usage of the bitmap API)
 - support multiple virtual GPIO controller instances in gpio-virtio
 - allow gpio-regmap to use the standard `ngpios` property from GPIOLIB
 - factor out the common code for synchronous probing of virtual GPIO devices
   into its own library
 - use str_enable_disable(), str_high_low() and other string helpers where
   applicable
 - extend the gpio-mmio abstraction layer to allow calling into the pinctrl
   back-end when setting direction
 - convert gpio-vf610 to using the gpio-mmio library
 - use more devres in gpio-adnp
 - add support for reset-gpios in gpio-pcf857x
 - add support for more models to gpio-loongson-64bit
 
 DT bindings:
 - add new compatibles to gpio-vf610 and gpio-loongson
 - add missing gpio-ranges property to gpio-mvebu
 - add reset-gpios to nxp,pcf8575
 - enable gpio-hog parsing in ast2400-gpio
 
 Misc:
 - coding style improvements
 - kerneldoc fixes
 - includes reordering
 - updates to the TODO list
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEFp3rbAvDxGAT0sefEacuoBRx13IFAmfigbMACgkQEacuoBRx
 13IX7Q/9GohFf6WvjJ4eKUJqmYcQdES/PVPdHUUVpDTMkuljUbkEmDXwu3qjWF+t
 mD7Co2Fk9sndQrmAI2YqWzDObzNHn/TLhDY8WVVzvJdL7kABPchJ6ZfJ9J92SEcU
 3KbaFnih+q6M4EcM3P30pnkYEAdZ6y5mbOAB4zFCqlf3qAUGIaC2phxN767ucu/m
 kQRQInwFs5lt3H/LfJ4lplUmMF4+x64pb19tRvo/vErtuaiU61Vhu4tFbgIe3d2R
 otTqmKuZwTUZCwFsZY1DVIcF00CxxIH5riZ/S+ejkWqETsSZUSbp48q2jpWeKnrG
 n8Op6zaOrXJEDTqBK+Uxp7vvO62GV7KrcI2JvTIHmriiTYxAGhRgGMzd6swZA9Ha
 EvnDwx742iNclB3KbL3eXbGWVxxjkTiDQvEHRHB73121jjM3py+HzSmb5OZdqOMr
 NPDIAZKr5RdXdx6CXTEVDqy4+aubSyPt2AFiD9T3kiwwOeqvBmEGSda6cT89gVEJ
 QccHNWG8/91xargLyllc9eiSiN4SLqj0Pdw9IkjIQi9zoF3te5QSNdezbEPTqhAk
 Ybp4krWJFunfsbERYfZ14H841oJk1a2rAYpEET2EQzhRlGS3zOJWGOjqQPE5g319
 3gjEEQRtm2UMKv+zUsijG4BBBgbOtkWOUihCob05lzsOPw3GwKI=
 =h7Hv
 -----END PGP SIGNATURE-----

Merge tag 'gpio-updates-for-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux

Pull gpio updates from Bartosz Golaszewski:
 "There are no new drivers this time but several changes to the core
  GPIO framework and various driver updates.

  This release cycle, we're starting a relatively straightforward but
  tedious rework of the GPIO consumer API: for historical reasons, the
  gpiod_set_value() variants would return void. Not only that but the
  GPIO provider interface does not even allow drivers to return a value
  to GPIO core. This is because initial GPIO controllers would be MMIO
  based and could not fail. We've had I2C, SPI and USB controllers for
  years too but no way of indicating failures to callers.

  This changes the consumer interface, adds new provider callbacks and
  starts converting the drivers under drivers/gpio/ to using them. Once
  this gets upstream, we'll keep on converting GPIO drivers that live
  elsewhere and once there are no more users of the old callbacks, we'll
  remove them and rename the new ones to the previous name. I imagine
  the last step would happen in one sweeping change like what you did
  for the remove_new() -> remove() renaming.

  We've also addressed an issue where invalid return values from GPIO
  drivers would get propagated to user-space by adding some
  GPIO-core-level sanitization. Again: not a complex change but way
  overdue.

  Other than that: lots of driver and core refactoring, DT-bindings
  changes and some other minor changes like coding style fixes or header
  reordering.

  GPIO core:
   - add sanitization of return values of GPIO provider callbacks so
     that invalid ones don't get propagated to user-space
   - add new variants of the line setter callbacks for GPIO providers
     that return an integer and allow to indicate driver errors to the
     GPIO core
   - change the interface of all gpiod_set_value() variants to return an
     integer thus becoming able to indicate failures in the underlying
     layer to callers
   - drop unneeded ERR_CAST in gpiolib-acpi
   - use for_each_if() where applicable
   - provide gpiod_multi_set_value_cansleep() as a new, simpler
     interface to gpiod_set_array_value_cansleep() and use it across
     several drivers treewide
   - reduce the number of atomic reads of the descriptor flags in
     gpiolib debugfs code
   - simplify for_each_hwgpio_in_range() and
     for_each_requested_gpio_in_range()
   - add support for three-cell GPIO specifiers in GPIO OF code
   - don't build HTE (hardware timestamp engine) GPIO code with the HTE
     subsystem disabled in Kconfig
   - unduplicate calls to gpiod_direction_input_nonotify()
   - rework the handling of the valid_mask property of GPIO chips: don't
     allow drivers to set it as it should only be handled by GPIO core
     and start actually enforcing it in GPIO core for *all* drivers, not
     only the ones implementing a custom request() callback
   - get the `ngpios` property from the fwnode of the GPIO chip, not its
     device in order to handle multi-bank GPIO chips

  Driver improvements:
   - convert a part of the GPIO drivers under drivers/gpio/ to using the
     new value setter callbacks
   - convert several drivers to using automatic lock guards from
     cleanup.h
   - allow building gpio-bt8xx with COMPILE_TEST=y
   - refactor gpio-74x164 (use devres, cleanup helpers, __counted_by()
     and bits.h macros)
   - refactor gpio-latch (use generic device properties, lock guards and
     some local variables for better readability)
   - refactor gpio-xilinx (improve the usage of the bitmap API)
   - support multiple virtual GPIO controller instances in gpio-virtio
   - allow gpio-regmap to use the standard `ngpios` property from
     GPIOLIB
   - factor out the common code for synchronous probing of virtual GPIO
     devices into its own library
   - use str_enable_disable(), str_high_low() and other string helpers
     where applicable
   - extend the gpio-mmio abstraction layer to allow calling into the
     pinctrl back-end when setting direction
   - convert gpio-vf610 to using the gpio-mmio library
   - use more devres in gpio-adnp
   - add support for reset-gpios in gpio-pcf857x
   - add support for more models to gpio-loongson-64bit

  DT bindings:
   - add new compatibles to gpio-vf610 and gpio-loongson
   - add missing gpio-ranges property to gpio-mvebu
   - add reset-gpios to nxp,pcf8575
   - enable gpio-hog parsing in ast2400-gpio

  Misc:
   - coding style improvements
   - kerneldoc fixes
   - includes reordering
   - updates to the TODO list"

* tag 'gpio-updates-for-v6.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (119 commits)
  gpio: TODO: add an item to track reworking the sysfs interface
  gpio: TODO: add an item to track the conversion to the new value setters
  gpio: TODO: add delimiters between tasks for better readability
  gpio: TODO: remove the pinctrl integration task
  gpio: TODO: remove task duplication
  gpio: TODO: remove the item about the new debugfs interface
  gpio: da9055: use new line value setter callbacks
  gpio: da9052: use new line value setter callbacks
  gpio: cs5535: use new line value setter callbacks
  gpio: crystalcove: use new line value setter callbacks
  gpio: cros-ec: use new line value setter callbacks
  gpio: creg-snps: use new line value setter callbacks
  gpio: cgbc: use new line value setter callbacks
  gpio: bt8xx: use new line value setter callbacks
  gpio: bt8xx: use lock guards
  gpio: bt8xx: allow to build the module with COMPILE_TEST=y
  gpio: bd9571mwv: use new line value setter callbacks
  gpio: bd71828: use new line value setter callbacks
  gpio: bd71815: use new line value setter callbacks
  gpio: bcm-kona: use new line value setter callbacks
  ...
2025-03-25 20:05:43 -07:00
Linus Torvalds
a50b4fe095 A treewide hrtimer timer cleanup
hrtimers are initialized with hrtimer_init() and a subsequent store to
   the callback pointer. This turned out to be suboptimal for the upcoming
   Rust integration and is obviously a silly implementation to begin with.
 
   This cleanup replaces the hrtimer_init(T); T->function = cb; sequence
   with hrtimer_setup(T, cb);
 
   The conversion was done with Coccinelle and a few manual fixups.
 
   Once the conversion has completely landed in mainline, hrtimer_init()
   will be removed and the hrtimer::function becomes a private member.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCgAxFiEEQp8+kY+LLUocC4bMphj1TA10mKEFAmff5jQTHHRnbHhAbGlu
 dXRyb25peC5kZQAKCRCmGPVMDXSYoVvRD/wKtuwmiA66NJFgXC0qVq82A6fO3bY8
 GBdbfysDJIbqGu5PTcULTbJ8qkqv3jeLUv6CcXvS4sZ7y/uJQl2lzf8yrD/0bbwc
 rLI6sHiPSZmK93kNVN4X5H7kvt7cE/DYC9nnEOgK3BY5FgKc4n9887d4aVBhL8Lv
 ODwVXvZ+xi351YCj7qRyPU24zt/p4tkkT1o2k4a0HBluqLI0D+V20fke9IERUL8r
 d1uWKlcn0TqYDesE8HXKIhbst3gx52rMJrXBJDHwFmG6v8Pj1fkTXCVpPo8QcBz8
 OTVkpomN9f/Tx4+GZwhZOF86LhLL3OhxD6pT7JhFCXdmSGv+Ez8uyk1YZysM/XpV
 Juy/1yAcBpDIDkmhMFGdAAn48Nn9Fotty0r4je60zSEp1d/4QMXcFme29qr2JTUE
 iWnQ/HD6DxUjVHqy7CYvvo26Xegg1C7qgyOVt4PYZwAM1VKF5P3kzYTb4SAdxtop
 Tpji1sfW9QV08jqMNo6XntD32DSP9S2HqjO9LwBw700jnx2jjJ35fcJs6iodMOUn
 gckIZLMn3L0OoglPdyA5O7SNTbKE7aFiRKdnT/cJtR3Fa39Qu27CwC5gfiyuie9I
 Q+LG8GLuYSBHXAR+PBK4GWlzJ7Dn8k3eqmbnLeKpRMsU6ZzcttgA64xhaviN2wN0
 iJbvLJeisXr3GA==
 =bYAX
 -----END PGP SIGNATURE-----

Merge tag 'timers-cleanups-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer cleanups from Thomas Gleixner:
 "A treewide hrtimer timer cleanup

  hrtimers are initialized with hrtimer_init() and a subsequent store to
  the callback pointer. This turned out to be suboptimal for the
  upcoming Rust integration and is obviously a silly implementation to
  begin with.

  This cleanup replaces the hrtimer_init(T); T->function = cb; sequence
  with hrtimer_setup(T, cb);

  The conversion was done with Coccinelle and a few manual fixups.

  Once the conversion has completely landed in mainline, hrtimer_init()
  will be removed and the hrtimer::function becomes a private member"

* tag 'timers-cleanups-2025-03-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits)
  wifi: rt2x00: Switch to use hrtimer_update_function()
  io_uring: Use helper function hrtimer_update_function()
  serial: xilinx_uartps: Use helper function hrtimer_update_function()
  ASoC: fsl: imx-pcm-fiq: Switch to use hrtimer_setup()
  RDMA: Switch to use hrtimer_setup()
  virtio: mem: Switch to use hrtimer_setup()
  drm/vmwgfx: Switch to use hrtimer_setup()
  drm/xe/oa: Switch to use hrtimer_setup()
  drm/vkms: Switch to use hrtimer_setup()
  drm/msm: Switch to use hrtimer_setup()
  drm/i915/request: Switch to use hrtimer_setup()
  drm/i915/uncore: Switch to use hrtimer_setup()
  drm/i915/pmu: Switch to use hrtimer_setup()
  drm/i915/perf: Switch to use hrtimer_setup()
  drm/i915/gvt: Switch to use hrtimer_setup()
  drm/i915/huc: Switch to use hrtimer_setup()
  drm/amdgpu: Switch to use hrtimer_setup()
  stm class: heartbeat: Switch to use hrtimer_setup()
  i2c: Switch to use hrtimer_setup()
  iio: Switch to use hrtimer_setup()
  ...
2025-03-25 10:54:15 -07:00
Avri Altman
c48e13e835 mmc: core: Remove redundant null check
This change removes a redundant null check found by Smatch.

Fixes: 403a0293f1 ("mmc: core: Add open-ended Ext memory addressing")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-mmc/345be6cd-f2f3-472e-a897-ca4b7c4cf826@stanley.mountain/
Signed-off-by: Avri Altman <avri.altman@sandisk.com>
Link: https://lore.kernel.org/r/20250319203642.778016-1-avri.altman@sandisk.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-21 09:48:37 +01:00
Erick Shepherd
31e75ed964 mmc: host: Wait for Vdd to settle on card power off
The SD spec version 6.0 section 6.4.1.5 requires that Vdd must be
lowered to less than 0.5V for a minimum of 1 ms when powering off a
card. Increase wait to 15 ms so that voltage has time to drain down
to 0.5V and cards can power off correctly. Issues with voltage drain
time were only observed on Apollo Lake and Bay Trail host controllers
so this fix is limited to those devices.

Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250314195021.1588090-1-erick.shepherd@ni.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-20 15:07:38 +01:00
Arnd Bergmann
64e70a729b Qualcomm driver updates for v6.15
Improve the client interface for the Qualcomm ICE driver to avoid
 leaking references, including fixing the client drivers to call the new
 function.
 
 Adopt str_on_off() helper in AOSS driver and mark non-global servreg QMI
 element info array in the PDR driver static.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmfYelQVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3Fy/0P/At3A+2YQTZB80ys0HlvGQnrihLo
 xKWW4RPApeia/IQKtMzZldyBSDSDSbx2D6WsWP+VE3/ICXsv5t00q9YtVINCPCYM
 cx0hv7RdNTSTyhwH5knO24zrdCn6KLAzrHdGeBMUByzGMh64GKoJBo8bFhkFOeYh
 Htk3Yj0gqwcUdmjLRqRIPem9NWha1zvUenhMa1FlcFxUgogcKFsCujQpP95NYf5x
 A36j6o0d0pg7SIQrANOH4xGhxUKdiADml8znVHBgxDdQ5cgVVg2I6jDjzBkt+5ik
 Xkb59KYT43kRoFGaUURURGl227oOUx/HDyO6II3SEaoRDkvTemqBMfFHeOTJCUgl
 wvUmrzy4Q93dASTz9Zq4jS9KPt5rgL8+fDz5/71Ye6w8d47I8dkqOmHxKKhcZN6L
 XNBBW9qUjqvL0w96+GyrE70adzThKGsEoEXmkhneo3oPEGOlMRmEvVJtb5RxM2BQ
 7ndP01utr0eksdB0ZY6MwvJA3u9085aqifEmHtckJVXv60H1JWVV23UzCeesoIHf
 GoItEtJ+aWccCQop8CjWwBcuIy2fsMHiO7nN9HFtHyNu3rVy3DHspCgWeVSbBaRl
 BH/UTgHmeYDzaJ7MzJCr+uElN0Gc2s+oOnei0QDKSEF6vdFzv1tbmcgBd4vJUMov
 2NEhnYk6YD4kO/lW
 =mBJ1
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmfbPTUACgkQYKtH/8kJ
 UieJFA/9F7FkIabs/b2H6zF6ZMWRAW5+0+cCFUmYW0CNG0oTX9bUuadYevQTo8QG
 FPgTZT0levM7pB7reiXxYkkIroUGNZ6lAvaDiGHzOAL21uFKNbh3qaZiDCWkkk8p
 376U4IV9BeS5WCW/meSxYiRpKtL9Vq0/0FxUk7xkUHJKMYsX3XFnRPTMt2Hk1IVP
 lLo0E9NgOIOSwJDBbD/8EJccZK8TCqdkw0zDzYmWEz+kmL6d2vByX2pJeJdLntnR
 /9W28U+y0pkyzs3KbwvPH9E6I9mGIhnMSpIed6BzHz/aW8hCDZL3PiHUrYXdDAUR
 zkRDS+AuOviCgQ1UczzWV9EJXaFKsEpoIpZ/vY5yO534r/ask3z8wKM6Yl/K/Wjx
 OqQUiNLZPzOn38SCeJ27C8BMqDVLBWRdDzsLIIQecaUl0V3NsfTixdTjs3tN53W3
 S3WGVVOsXqJy3L0NuA1LlEeFGWfGlokEqcoX6v3Y4BRrS5drjzJ+E4YKOfHeREZX
 wpt2822LuXsByQZiHE/XV7mwjxXh6RYcCvBKqE42rCeIJ9hVdWGgtuBtkrnAgzR3
 Rsp6ZR8f5cI1jcjoCxenAGWpzIb2GJaIhRdvp+4AI1pNbZD/pX+l9RknoF2RgHHD
 jrgSs4eJVJt0FgmDWsUxlOYvATYyrl99+kRg6HLCbWLT/gfbYVE=
 =WlxM
 -----END PGP SIGNATURE-----

Merge tag 'qcom-drivers-for-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.15

Improve the client interface for the Qualcomm ICE driver to avoid
leaking references, including fixing the client drivers to call the new
function.

Adopt str_on_off() helper in AOSS driver and mark non-global servreg QMI
element info array in the PDR driver static.

* tag 'qcom-drivers-for-6.15' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: Do not expose internal servreg_location_entry_ei array
  soc: qcom: ice: make of_qcom_ice_get() static
  scsi: ufs: qcom: fix dev reference leaked through of_qcom_ice_get
  mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get
  soc: qcom: ice: introduce devm_of_qcom_ice_get
  dt-bindings: soc: qcom: qcom,pmic-glink: Document SM8750 compatible
  soc: qcom: Use str_enable_disable-like helpers

Link: https://lore.kernel.org/r/20250317210158.2025380-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2025-03-19 22:55:01 +01:00
Ulf Hansson
f4dfef81e9 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.14-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.15.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-19 12:38:11 +01:00
Miaoqian Lin
3834a759af mmc: omap: Fix memory leak in mmc_omap_new_slot
Add err_free_host label to properly pair mmc_alloc_host() with
mmc_free_host() in GPIO error paths. The allocated host memory was
leaked when GPIO lookups failed.

Fixes: e519f0bb64 ("ARM/mmc: Convert old mmci-omap to GPIO descriptors")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250318140226.19650-1-linmq006@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-19 12:37:18 +01:00
Dan Carpenter
ede057759b mmc: renesas_sdhi: fix error code in renesas_sdhi_probe()
If devm_regulator_register() fails then propagate the error code.  Don't
return success.

Fixes: fae80a99dc ("mmc: renesas_sdhi: Add support for RZ/G3E SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/dc39e555-8ef7-4a39-9253-65bcf3e50c01@stanley.mountain
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-19 12:34:11 +01:00
Karel Balej
a41fcca4b3 mmc: sdhci-pxav3: set NEED_RSP_BUSY capability
Set the MMC_CAP_NEED_RSP_BUSY capability for the sdhci-pxav3 host to
prevent conversion of R1B responses to R1. Without this, the eMMC card
in the samsung,coreprimevelte smartphone using the Marvell PXA1908 SoC
with this mmc host doesn't probe with the ETIMEDOUT error originating in
__mmc_poll_for_busy.

Note that the other issues reported for this phone and host, namely
floods of "Tuning failed, falling back to fixed sampling clock" dmesg
messages for the eMMC and unstable SDIO are not mitigated by this
change.

Link: https://lore.kernel.org/r/20200310153340.5593-1-ulf.hansson@linaro.org/
Link: https://lore.kernel.org/r/D7204PWIGQGI.1FRFQPPIEE2P9@matfyz.cz/
Link: https://lore.kernel.org/r/20250115-pxa1908-lkml-v14-0-847d24f3665a@skole.hr/
Cc: stable@vger.kernel.org
Signed-off-by: Karel Balej <balejk@matfyz.cz>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20250310140707.23459-1-balejk@matfyz.cz
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-19 12:34:11 +01:00
Ulf Hansson
49d1626351 mmc: sdhci-omap: Disable MMC_CAP_AGGRESSIVE_PM for eMMC/SD
We have received reports about cards can become corrupt related to the
aggressive PM support. Let's make a partial revert of the change that
enabled the feature.

Reported-by: David Owens <daowens01@gmail.com>
Reported-by: Romain Naour <romain.naour@smile.fr>
Reported-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Fixes: 3edf588e7f ("mmc: sdhci-omap: Allow SDIO card power off and enable aggressive PM")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20250312121712.1168007-1-ulf.hansson@linaro.org
2025-03-19 12:33:20 +01:00
Kamal Dasu
723ef0e20d mmc: sdhci-brcmstb: add cqhci suspend/resume to PM ops
cqhci timeouts observed on brcmstb platforms during suspend:
  ...
  [  164.832853] mmc0: cqhci: timeout for tag 18
  ...

Adding cqhci_suspend()/resume() calls to disable cqe
in sdhci_brcmstb_suspend()/resume() respectively to fix
CQE timeouts seen on PM suspend.

Fixes: d46ba2d17f ("mmc: sdhci-brcmstb: Add support for Command Queuing (CQE)")
Cc: stable@vger.kernel.org
Signed-off-by: Kamal Dasu <kamal.dasu@broadcom.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20250311165946.28190-1-kamal.dasu@broadcom.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-17 11:42:42 +01:00
Jiri Slaby (SUSE)
38e7047a4d tty: mmc: sdio: use bool for cts and remove parentheses
'cts' in sdio_uart_check_modem_status() is considered a 'bool', but
typed as signed 'int'. Make it 'bool' so it is clear the code does not
care about the masked value, but true/false.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20250317070046.24386-18-jirislaby@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-17 11:22:06 +01:00
Anuj Gupta
75618ac6e9 block: remove unused parameter 'q' parameter in __blk_rq_map_sg()
request_queue param is no longer used by blk_rq_map_sg and
__blk_rq_map_sg. Remove it.

Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250313035322.243239-1-anuj20.g@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-03-13 05:46:19 -06:00
Ulf Hansson
4139badab0 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.14-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.15.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-12 12:21:57 +01:00
Biju Das
fae80a99dc mmc: renesas_sdhi: Add support for RZ/G3E SoC
The SDHI/eMMC IPs in the RZ/G3E SoC are similar to those in R-Car Gen3.
However, the RZ/G3E SD0 channel has Voltage level control and PWEN pin
support via SD_STATUS register.

internal regulator support is added to control the voltage levels of
the SD pins via sd_iovs/sd_pwen bits in SD_STATUS register by populating
vqmmc-regulator child node.

SD1 and SD2 channels have gpio regulator support and internal regulator
support. Selection of the regulator is based on the regulator phandle.
Similar case for SD0 fixed voltage (eMMC) that uses fixed regulator and
SD0 non-fixed voltage (SD0) that uses internal regulator.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20250305092958.21865-3-biju.das.jz@bp.renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-12 11:44:17 +01:00
Dragan Simic
3b791214c8 mmc: core: Trim trailing whitespace from card product names
Product names for some eMMC chips can include trailing whitespace, which
seems to be rather uncommon, but makes emitted messages and /sys properties
somewhat unsightly.  Here's such an example from a Pine64 PineNote, in which
"Biwin ", as the eMMC product name, contains trailing whitespace:

  mmc0: new HS200 MMC card at address 0001
  mmcblk0: mmc0:0001 Biwin  115 GiB
  mmcblk0: p1 p2 p3 p4 p5 p6 p7
  mmcblk0boot0: mmc0:0001 Biwin  4.00 MiB
  mmcblk0boot1: mmc0:0001 Biwin  4.00 MiB
  mmcblk0rpmb: mmc0:0001 Biwin  4.00 MiB, chardev (249:0)

Trailing whitespace in /sys properties may even cause some unforeseen issues
with some scripts, so let's have the trailing whitespace trimmed in product
names for eMMC chips.  Although not observed yet by the author of these
changes, the same trailing whitespace may appear in SD card product names,
so let's trim them as well, which can't hurt.

Touch-up one comment as well, by using proper capitalization.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Acked-by: Avri Altman <avri.altman@sandisk.com>
Link: https://lore.kernel.org/r/fb7fcecae737f3e8b279854d7c853000527cba9a.1740597891.git.dsimic@manjaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-12 11:30:22 +01:00
Gu Bowen
e51a349d2d mmc: atmel-mci: Add missing clk_disable_unprepare()
The error path when atmci_configure_dma() set dma fails in atmci driver
does not correctly disable the clock.
Add the missing clk_disable_unprepare() to the error path for pair with
clk_prepare_enable().

Fixes: 467e081d23 ("mmc: atmel-mci: use probe deferring if dma controller is not ready yet")
Signed-off-by: Gu Bowen <gubowen5@huawei.com>
Acked-by: Aubin Constans <aubin.constans@microchip.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250225022856.3452240-1-gubowen5@huawei.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-12 11:25:38 +01:00
Kaustabh Chakraborty
7cbe799ac1 mmc: dw_mmc: add exynos7870 DW MMC support
Add support for Exynos7870 DW MMC controllers, for both SMU and non-SMU
variants. These controllers require a quirk to access 64-bit FIFO in 32-bit
accesses (DW_MMC_QUIRK_FIFO64_32).

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Link: https://lore.kernel.org/r/20250219-exynos7870-mmc-v2-3-b4255a3e39ed@disroot.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-11 18:41:53 +01:00
Kaustabh Chakraborty
57c0902f8b mmc: dw_mmc: add a quirk for accessing 64-bit FIFOs in two halves
In certain DW MMC implementations (such as in some Exynos7870
controllers), 64-bit read/write is not allowed from a 64-bit FIFO.
Add a quirk which facilitates accessing the 64-bit FIFO registers in two
32-bit halves.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Link: https://lore.kernel.org/r/20250219-exynos7870-mmc-v2-2-b4255a3e39ed@disroot.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-11 18:41:53 +01:00
Erick Shepherd
fb3bbc46c9 mmc: sdhci: Disable SD card clock before changing parameters
Per the SD Host Controller Simplified Specification v4.20 §3.2.3, change
the SD card clock parameters only after first disabling the external card
clock. Doing this fixes a spurious clock pulse on Baytrail and Apollo Lake
SD controllers which otherwise breaks voltage switching with a specific
Swissbit SD card.

Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com>
Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Erick Shepherd <erick.shepherd@ni.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250211214645.469279-1-erick.shepherd@ni.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-11 18:15:23 +01:00
Jaehoon Chung
4e35c611ee mmc: sdhci-of-dwcmshc: Change to dwcmshc_phy_init for reusing codes
dwcmshc_phy_1_8v_init and dwcmshc_phy_3_3v_init differ only by a few
lines of code. This allow us to reuse code depending on voltage.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250131025406.1753513-1-jh80.chung@samsung.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-11 18:11:52 +01:00
Dr. David Alan Gilbert
6bc022653d mmc: slot-gpio: Remove unused mmc_gpio_set_cd_isr
mmc_gpio_set_cd_isr() last use was removed in 2018 by
commit 7838a8ddc8 ("mmc: omap_hsmmc: Kill off cover detection")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://lore.kernel.org/r/20250129214335.125292-1-linux@treblig.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-03-11 18:08:26 +01:00
Bartosz Golaszewski
2d13f801f1 Linux 6.14-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAme7hfkeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGU+IH/1bk6zIvAwXXS5yu
 KNsQ8dEkC3Xme6HqLtPsAhRLF+5YJf6MaGm1ip5dDMyIvasa2gwvCQQQoOpeMbKj
 79VKT+m9t3szMHZaQYjlOuYHBmNSJ4cMCD2Qh6ktXHGPfTTWDFGf7fBwBOkVNeJU
 1Ask+bxeop21aJMhfYXrUta3OYyerLBUR6jCiCM82A/GLtdv6oNGXBu3ygDt9Tjx
 ZHSl+CYjKpmGUP8JnMKwCBHVguEfqgzZ//dY1H16AvOLed9k2jkMFn8O5Vi3vjnx
 TWMMXoiJimuamGzbjxtCCqzxNlFFDT4gRpDqeJxb16W/gDTFmbRr9LDjNehCZe33
 AigLZ6M=
 =Y/7F
 -----END PGP SIGNATURE-----

Merge tag 'v6.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into HEAD

Linux 6.14-rc4
2025-02-24 09:58:42 +01:00
Nam Cao
3a1ed018e9 mmc: dw_mmc: Switch to use hrtimer_setup()
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.

Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.

Patch was created by using Coccinelle.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Zack Rusin <zack.rusin@broadcom.com>
Link: https://lore.kernel.org/all/4dec579387ced5e97bb25739fad2ac852e5a689c.1738746904.git.namcao@linutronix.de
2025-02-18 11:19:04 +01:00
David Lechner
aac4be9341 mmc: pwrseq_simple: use gpiod_multi_set_value_cansleep
Reduce verbosity by using gpiod_multi_set_value_cansleep() instead of
gpiod_set_array_value_cansleep().

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20250210-gpio-set-array-helper-v3-11-d6a673674da8@baylibre.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-02-17 14:27:34 +01:00
Tudor Ambarus
cbef7442fb mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get
The driver leaks the device reference taken with
of_find_device_by_node(). Fix the leak by using devm_of_qcom_ice_get().

Fixes: c7eed31e23 ("mmc: sdhci-msm: Switch to the new ICE API")
Cc: stable@vger.kernel.org
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20250117-qcom-ice-fix-dev-leak-v2-2-1ffa5b6884cb@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
2025-02-14 11:37:16 -06:00
Eric Biggers
ebc4176551 blk-crypto: add basic hardware-wrapped key support
To prevent keys from being compromised if an attacker acquires read
access to kernel memory, some inline encryption hardware can accept keys
which are wrapped by a per-boot hardware-internal key.  This avoids
needing to keep the raw keys in kernel memory, without limiting the
number of keys that can be used.  Such hardware also supports deriving a
"software secret" for cryptographic tasks that can't be handled by
inline encryption; this is needed for fscrypt to work properly.

To support this hardware, allow struct blk_crypto_key to represent a
hardware-wrapped key as an alternative to a raw key, and make drivers
set flags in struct blk_crypto_profile to indicate which types of keys
they support.  Also add the ->derive_sw_secret() low-level operation,
which drivers supporting wrapped keys must implement.

For more information, see the detailed documentation which this patch
adds to Documentation/block/inline-encryption.rst.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Tested-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> # sm8650
Link: https://lore.kernel.org/r/20250204060041.409950-2-ebiggers@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2025-02-10 09:54:19 -07:00
Andy-ld Lu
3e68abf2b9 mmc: mtk-sd: Fix register settings for hs400(es) mode
For hs400(es) mode, the 'hs400-ds-delay' is typically configured in the
dts. However, some projects may only define 'mediatek,hs400-ds-dly3',
which can lead to initialization failures in hs400es mode. CMD13 reported
response crc error in the mmc_switch_status() just after switching to
hs400es mode.

[    1.914038][   T82] mmc0: mmc_select_hs400es failed, error -84
[    1.914954][   T82] mmc0: error -84 whilst initialising MMC card

Currently, the hs400_ds_dly3 value is set within the tuning function. This
means that the PAD_DS_DLY3 field is not configured before tuning process,
which is the reason for the above-mentioned CMD13 response crc error.

Move the PAD_DS_DLY3 field configuration into msdc_prepare_hs400_tuning(),
and add a value check of hs400_ds_delay to prevent overwriting by zero when
the 'hs400-ds-delay' is not set in the dts. In addition, since hs400(es)
only tune the PAD_DS_DLY1, the PAD_DS_DLY2_SEL bit should be cleared to
bypass it.

Fixes: c4ac38c653 ("mmc: mtk-sd: Add HS400 online tuning support")
Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250123092644.7359-1-andy-ld.lu@mediatek.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-02-03 13:34:50 +01:00
Josua Mayer
ac5a41b472 Revert "mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch"
This reverts commit 941a7abd46.

This commit uses presence of device-tree properties vmmc-supply and
vqmmc-supply for deciding whether to enable a quirk affecting timing of
clock and data.
The intention was to address issues observed with eMMC and SD on AM62
platforms.

This new quirk is however also enabled for AM64 breaking microSD access
on the SolidRun HimmingBoard-T which is supported in-tree since v6.11,
causing a regression. During boot microSD initialization now fails with
the error below:

[    2.008520] mmc1: SDHCI controller on fa00000.mmc [fa00000.mmc] using ADMA 64-bit
[    2.115348] mmc1: error -110 whilst initialising SD card

The heuristics for enabling the quirk are clearly not correct as they
break at least one but potentially many existing boards.

Revert the change and restore original behaviour until a more
appropriate method of selecting the quirk is derived.

Fixes: 941a7abd46 ("mmc: sdhci_am654: Add sdhci_am654_start_signal_voltage_switch")
Closes: https://lore.kernel.org/linux-mmc/a70fc9fc-186f-4165-a652-3de50733763a@solid-run.com/
Cc: stable@vger.kernel.org
Signed-off-by: Josua Mayer <josua@solid-run.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20250127-am654-mmc-regression-v2-1-9bb39fb12810@solid-run.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-02-03 13:33:58 +01:00
Linus Torvalds
2bf717b079 MMC core:
- Share a helper to convert from crypto_profile to mmc_host
  - Respect quirk_max_rate for non-UHS SDIO card too
 
 MMC host:
  - Add DT bindings for the mmc-slot
  - Clarify DT bindings for the mmc-controller
  - bcm2835: Add support for system-wide suspend/resume PM
  - dw_mmc-exynos: Add support for the exynos8895 variant
  - meson-mx-sdio: Convert DT bindings to dtschema
  - mtk-sd: Fixup use of two register ranges
  - mtk-sd: Add support for ignoring cmd response CRC
  - sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G
  - sdhci-msm: Correctly set the load for the regulator
  - sdhci-msm: Convert to use custom crypto profile
  - sdhci-of-at91: Add support for the microchip sama7d65 variant
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmeOYOYXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjClhzxAAsytG5oxMbCNEbLV00CqX58n3
 BJTpDVaG6CYy+pr6lgNBljswl1kzX36sHuBsD6nUve8ZP145UU3PC8tEgdYTDzx1
 oLog+ObTTkHlVK2X9XWfhuv6EDhqBN5z3Z43yKVCAfFgti/amSgevv1DKJSZ5Q3W
 4ybo/4sttXL2PaShLkAUnm+w50Iq+D7i2vq6mvXyw90vsS/wvO//hljW3tLTKA5G
 Xsb3jNZt48F+AKFrIbB2V2c2SgiyyCR+po+5ZGCAIPwwC/SCJBjkmDzPd0+5aAVU
 HQudyUC6vdB/gODYJtsyV4q5YHOLqP4hLaN46hwD0SZHmQPgTIMxOlQCZDUqxwUn
 GlZsN5nBwEl+eKVDiiiS3b8wO0geXjUVvw5+qvb1mXeHULBFlYxksJGE+eUfrW9D
 ldouNLggHN6gtIFlPIS98D3ly2WPBGC/xMs3pvWaOK+hMeH1IpjZw+b8kcuojVIh
 7mODdyxZGGaqGyhaWQHvwtHgGJKMbqm5sr2amVZkoChgNysomGpR/bMvBpv0HMC8
 oUTGF8CaC8W4auTc6Jx7NtdAaHtPY9URN6Cdyuc8JeBDuKpG9B1m50lrUW3f3PZu
 7njzBMdUQ+IBZ5WyimM06qREyFVQEJHiNVb1EnPTWctPoKVj1ZKmS5QeEOYUbUWi
 9sC4TwrD2N2Rpuvl5MU=
 =KHab
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Share a helper to convert from crypto_profile to mmc_host
   - Respect quirk_max_rate for non-UHS SDIO card too

  MMC host:
   - Add DT bindings for the mmc-slot
   - Clarify DT bindings for the mmc-controller
   - bcm2835: Add support for system-wide suspend/resume PM
   - dw_mmc-exynos: Add support for the exynos8895 variant
   - meson-mx-sdio: Convert DT bindings to dtschema
   - mtk-sd: Fixup use of two register ranges
   - mtk-sd: Add support for ignoring cmd response CRC
   - sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G
   - sdhci-msm: Correctly set the load for the regulator
   - sdhci-msm: Convert to use custom crypto profile
   - sdhci-of-at91: Add support for the microchip sama7d65 variant"

* tag 'mmc-v6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (25 commits)
  mmc: sdhci-msm: Correctly set the load for the regulator
  mmc: hi3798mv200: Use syscon_regmap_lookup_by_phandle_args
  mmc: Use of_property_present() for non-boolean properties
  dt-bindings: mmc: samsung,exynos-dw-mshc: add specific compatible for exynos8895
  mmc: sdhci-msm: convert to use custom crypto profile
  mmc: crypto: add mmc_from_crypto_profile()
  mmc: mtk-sd: Limit getting top_base to SoCs that require it
  dt-bindings: mmc: mtk-sd: Document compatibles that need two register ranges
  mmc: sdhci-acpi: Use devm_platform_ioremap_resource()
  mmc: sdhci-acpi: Remove not so useful error message
  dt-bindings: mmc: convert amlogic,meson-mx-sdio.txt to dtschema
  dt-bindings: mmc: document mmc-slot
  dt-bindings: mmc: controller: remove '|' when not needed
  dt-bindings: mmc: controller: move properties common with slot out to mmc-controller-common
  dt-bindings: mmc: controller: clarify the address-cells description
  mmc: bcm2835: add suspend/resume pm support
  dt-bindings: Drop Bhupesh Sharma from maintainers
  mmc: core: don't include 'pm_wakeup.h' directly
  mmc: mtk-sd: Add support for ignoring cmd response CRC
  mmc: core: Introduce the MMC_RSP_R1B_NO_CRC response
  ...
2025-01-22 10:39:17 -08:00
Linus Torvalds
1cbfb828e0 for-6.14/block-20250118
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmeL6hoQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgppw2EADQV8nDgLRggZR+il4U03yKHXcQEdAX1GrB
 Erowx+dasIJuh6kp3n6qRe9QD/pRqt1DKyLvXoWF8Qfuwq85j7oDnDDYxutNYT27
 hDgrLJriJ3VeKYtTu+andHWt8P29b5h57UayInDOUJurEPA6rXyFZ5YVIti8n21K
 uDOrQXiACG3qRWS2+p2f3UNhX0MkFNFdN/lxi13WMIJtRWF5bXAP+JOgIWCID4Ze
 QuSY6rQD4dp4Q6M2erpX6tn0YZb7Hvw3rPjsd91n6jvYfTUVLH375zg8jCBpi6Wi
 Syufbb8xcTtriVPTDRNu0ekjebkc8wD8ax/h86g0z9v3Ua4DlNmsx9eXrtv6r5nu
 YXqDODOad6stI0+owFquW2vas0gHmfNSfyfGdlk2g24PMtP5Yx0V6FIEvwIeqnje
 ghgxQvBuKUsdhqakByfNnc+XvXi3+RUJek8kvMeUSUQWT1IyMQqPOOk0yp9WdyWD
 bY1f2ECP5BR1b37zYOyawewsI5xTupHUswn5a4r4qtGn3O15rGDkX98Nab5aLCnR
 rW/DvX7+wT6gW9EwrRHiwjwfNDZbsJ9Ggu3lMhtUl5GUWdk58yTiVgKaHJLnlX9/
 CKFKfyyIR1Vl8+gYIpemyFhhcoN+dCSf06ISkrg0jeS0/tYwydaAaCBPL5J4kxZA
 h3Rtbh+Pgg==
 =EXYs
 -----END PGP SIGNATURE-----

Merge tag 'for-6.14/block-20250118' of git://git.kernel.dk/linux

Pull block updates from Jens Axboe:

 - NVMe pull requests via Keith:
      - Target support for PCI-Endpoint transport (Damien)
      - TCP IO queue spreading fixes (Sagi, Chaitanya)
      - Target handling for "limited retry" flags (Guixen)
      - Poll type fix (Yongsoo)
      - Xarray storage error handling (Keisuke)
      - Host memory buffer free size fix on error (Francis)

 - MD pull requests via Song:
      - Reintroduce md-linear (Yu Kuai)
      - md-bitmap refactor and fix (Yu Kuai)
      - Replace kmap_atomic with kmap_local_page (David Reaver)

 - Quite a few queue freeze and debugfs deadlock fixes

   Ming introduced lockdep support for this in the 6.13 kernel, and it
   has (unsurprisingly) uncovered quite a few issues

 - Use const attributes for IO schedulers

 - Remove bio ioprio wrappers

 - Fixes for stacked device atomic write support

 - Refactor queue affinity helpers, in preparation for better supporting
   isolated CPUs

 - Cleanups of loop O_DIRECT handling

 - Cleanup of BLK_MQ_F_* flags

 - Add rotational support for null_blk

 - Various fixes and cleanups

* tag 'for-6.14/block-20250118' of git://git.kernel.dk/linux: (106 commits)
  block: Don't trim an atomic write
  block: Add common atomic writes enable flag
  md/md-linear: Fix a NULL vs IS_ERR() bug in linear_add()
  block: limit disk max sectors to (LLONG_MAX >> 9)
  block: Change blk_stack_atomic_writes_limits() unit_min check
  block: Ensure start sector is aligned for stacking atomic writes
  blk-mq: Move more error handling into blk_mq_submit_bio()
  block: Reorder the request allocation code in blk_mq_submit_bio()
  nvme: fix bogus kzalloc() return check in nvme_init_effects_log()
  md/md-bitmap: move bitmap_{start, end}write to md upper layer
  md/raid5: implement pers->bitmap_sector()
  md: add a new callback pers->bitmap_sector()
  md/md-bitmap: remove the last parameter for bimtap_ops->endwrite()
  md/md-bitmap: factor behind write counters out from bitmap_{start/end}write()
  md: Replace deprecated kmap_atomic() with kmap_local_page()
  md: reintroduce md-linear
  partitions: ldm: remove the initial kernel-doc notation
  blk-cgroup: rwstat: fix kernel-doc warnings in header file
  blk-cgroup: fix kernel-doc warnings in header file
  nbd: fix partial sending
  ...
2025-01-20 19:38:46 -08:00
Yuanjie Yang
20a0c37e44 mmc: sdhci-msm: Correctly set the load for the regulator
Qualcomm regulator supports two power supply modes: HPM and LPM.
Currently, the sdhci-msm.c driver does not set the load to adjust
the current for eMMC and SD. If the regulator dont't set correct
load in LPM state, it will lead to the inability to properly
initialize eMMC and SD.

Set the correct regulator current for eMMC and SD to ensure that the
device can work normally even when the regulator is in LPM.

Signed-off-by: Yuanjie Yang <quic_yuanjiey@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20250114083514.258379-1-quic_yuanjiey@quicinc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-01-17 12:31:03 +01:00
Krzysztof Kozlowski
1931cd769a mmc: hi3798mv200: Use syscon_regmap_lookup_by_phandle_args
Use syscon_regmap_lookup_by_phandle_args() which is a wrapper over
syscon_regmap_lookup_by_phandle() combined with getting the syscon
argument.  Except simpler code this annotates within one line that given
phandle has arguments, so grepping for code would be easier.

There is also no real benefit in printing errors on missing syscon
argument, because this is done just too late: runtime check on
static/build-time data.  Dtschema and Devicetree bindings offer the
static/build-time check for this already.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/all/20250111185410.183896-1-krzysztof.kozlowski@linaro.org>/
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-01-13 16:36:13 +01:00
Rob Herring (Arm)
57a217f193 mmc: Use of_property_present() for non-boolean properties
The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://lore.kernel.org/all/20250109155255.3438450-1-robh@kernel.org/
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2025-01-13 16:32:56 +01:00
Christoph Hellwig
cc76ace465 block: remove BLK_MQ_F_SHOULD_MERGE
BLK_MQ_F_SHOULD_MERGE is set for all tag_sets except those that purely
process passthrough commands (bsg-lib, ufs tmf, various nvme admin
queues) and thus don't even check the flag.  Remove it to simplify the
driver interface.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241219060214.1928848-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2024-12-23 08:17:23 -07:00
Eric Biggers
741521fa27 mmc: sdhci-msm: convert to use custom crypto profile
As is being done in ufs-qcom, make the sdhci-msm driver override the
full crypto profile rather than "just" key programming and eviction.
This makes it much more straightforward to add support for
hardware-wrapped inline encryption keys.  It also makes it easy to pass
the original blk_crypto_key down to qcom_ice_program_key() once it is
updated to require the key in that form.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Message-ID: <20241213041958.202565-8-ebiggers@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-19 14:43:33 +01:00
Eric Biggers
08a7ead324 mmc: crypto: add mmc_from_crypto_profile()
Add a helper function that encapsulates a container_of expression.  For
now there is just one user but soon there will be more.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Message-ID: <20241213041958.202565-7-ebiggers@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-19 14:43:28 +01:00
Ulf Hansson
f2d3630f1c mmc: Merge branch fixes into next
Merge the mmc fixes for v6.13-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.14.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-19 14:42:22 +01:00
Eric Biggers
8d90a86ed0 mmc: sdhci-msm: fix crypto key eviction
Commit c7eed31e23 ("mmc: sdhci-msm: Switch to the new ICE API")
introduced an incorrect check of the algorithm ID into the key eviction
path, and thus qcom_ice_evict_key() is no longer ever called.  Fix it.

Fixes: c7eed31e23 ("mmc: sdhci-msm: Switch to the new ICE API")
Cc: stable@vger.kernel.org
Cc: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Message-ID: <20241213041958.202565-6-ebiggers@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-19 14:42:10 +01:00
Chen-Yu Tsai
6ee5233a4c mmc: mtk-sd: Limit getting top_base to SoCs that require it
Currently the mtk-sd driver tries to get and map the second register
base, named top_base in the code, regardless of whether the SoC model
actually has it or not. This produces confusing big error messages on
the platforms that don't need it:

    mtk-msdc 11260000.mmc: error -EINVAL: invalid resource (null)

Limit it to the platforms that actually require it, based on their
device tree entries, and properly fail if it is missing.

Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Message-ID: <20241210073212.3917912-3-wenst@chromium.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-18 15:57:59 +01:00
Andy Shevchenko
ecfe4926dc mmc: sdhci-acpi: Use devm_platform_ioremap_resource()
The struct resource is not used for anything else, so we can simplify
the code a bit by using the helper function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241101101441.3518612-5-andriy.shevchenko@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-18 15:42:35 +01:00
Andy Shevchenko
88e3008424 mmc: sdhci-acpi: Remove not so useful error message
First of all, this error message is just informative and doesn't prevent
driver from going on. Second, the ioremap() on many architectures just
works on page size granularity, which is higher than 256 bytes. Last,
but not lease, this is an impediment for furhter cleanups, hence remove
it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241101101441.3518612-4-andriy.shevchenko@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-18 15:42:35 +01:00
Ulf Hansson
df42581401 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.13-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.14.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 17:05:47 +01:00
Joe Hattori
f3d87abe11 mmc: mtk-sd: disable wakeup in .remove() and in the error path of .probe()
Current implementation leaves pdev->dev as a wakeup source. Add a
device_init_wakeup(&pdev->dev, false) call in the .remove() function and
in the error path of the .probe() function.

Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Fixes: 527f36f5ef ("mmc: mediatek: add support for SDIO eint wakup IRQ")
Cc: stable@vger.kernel.org
Message-ID: <20241203023442.2434018-1-joe@pf.is.s.u-tokyo.ac.jp>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 16:02:34 +01:00
Prathamesh Shete
a56335c85b mmc: sdhci-tegra: Remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk
Value 0 in ADMA length descriptor is interpreted as 65536 on new Tegra
chips, remove SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC quirk to make sure max
ADMA2 length is 65536.

Fixes: 4346b7c794 ("mmc: tegra: Add Tegra186 support")
Cc: stable@vger.kernel.org
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241209101009.22710-1-pshete@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 16:00:07 +01:00
Stefan Wahren
aee2ae1423 mmc: bcm2835: add suspend/resume pm support
Add a minimalistic suspend/resume PM support.

Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Message-ID: <20241202115140.33492-1-wahrenst@gmx.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Wolfram Sang
65169604e8 mmc: core: don't include 'pm_wakeup.h' directly
The header clearly states that it does not want to be included directly,
only via 'device.h'. 'platform_device.h' works equally well. Remove the
direct inclusion.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Message-ID: <20241118072917.3853-9-wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Andy-ld Lu
02fcf9c9e2 mmc: mtk-sd: Add support for ignoring cmd response CRC
The current process flow does not handle MMC requests that are indicated
to ignore the command response CRC. For instance, cmd12 and cmd48 from
mmc_cqe_recovery() are marked to ignore CRC, but they are not matched to
the appropriate response type in msdc_cmd_find_resp(). As a result, they
are defaulted to 'MMC_RSP_NONE', which means no response is expected.

This commit applies the flag 'MMC_RSP_R1B_NO_CRC' to fix the response type
setting in msdc_cmd_find_resp() and adds the logic to ignore CRC in
msdc_cmd_done().

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Message-ID: <20241126125041.16071-3-andy-ld.lu@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Andy-ld Lu
ed97550d47 mmc: core: Introduce the MMC_RSP_R1B_NO_CRC response
The R1B response type with ignoring CRC is used in the mmc_cqe_recovery(),
introduce the MMC_RSP_R1B_NO_CRC response type to simplify the code.

Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Message-ID: <20241126125041.16071-2-andy-ld.lu@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Ulf Hansson
ea79df1033 mmc: core: Drop the MMC_RSP_R1_NO_CRC response
The MMC_RSP_R1_NO_CRC type of response is not being used by the mmc core
for any commands. Let's therefore drop it, together with the corresponding
code in the host drivers.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # for TMIO
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Message-ID: <20241125132311.23939-1-ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Ciprian Marian Costea
0202dfbdc5 mmc: sdhci-esdhc-imx: enable 'SDHCI_QUIRK_NO_LED' quirk for S32G
Enable SDHCI_QUIRK_NO_LED quirk for S32G2/S32G3 variants as the controller
does not have a LED signal line.

Signed-off-by: Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Message-ID: <20241125083357.1041949-1-ciprianmarian.costea@oss.nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Shawn Lin
a2a44f8da2 mmc: core: Respect quirk_max_rate for non-UHS SDIO card
The card-quirk was added to limit the clock-rate for a card with UHS-mode
support, although let's respect the quirk for non-UHS mode too, to make the
behaviour consistent.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Message-ID: <1732268242-72799-1-git-send-email-shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-10 11:18:45 +01:00
Ulf Hansson
87a0d90fcd mmc: core: Further prevent card detect during shutdown
Disabling card detect from the host's ->shutdown_pre() callback turned out
to not be the complete solution. More precisely, beyond the point when the
mmc_bus->shutdown() has been called, to gracefully power off the card, we
need to prevent card detect. Otherwise the mmc_rescan work may poll for the
card with a CMD13, to see if it's still alive, which then will fail and
hang as the card has already been powered off.

To fix this problem, let's disable mmc_rescan prior to power off the card
during shutdown.

Reported-by: Anthony Pighin <anthony.pighin@nokia.com>
Fixes: 66c915d09b ("mmc: core: Disable card detect during shutdown")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Closes: https://lore.kernel.org/all/BN0PR08MB695133000AF116F04C3A9FFE83212@BN0PR08MB6951.namprd08.prod.outlook.com/
Tested-by: Anthony Pighin <anthony.pighin@nokia.com>
Message-ID: <20241125122446.18684-1-ulf.hansson@linaro.org>
2024-12-02 15:37:16 +01:00
Hans de Goede
7f0fa47cee mmc: sdhci-pci: Add DMI quirk for missing CD GPIO on Vexia Edu Atla 10 tablet
The Vexia Edu Atla 10 tablet distributed to schools in the Spanish
Andalucía region has no ACPI fwnode associated with the SDHCI controller
for its microsd-slot and thus has no ACPI GPIO resource info.

This causes the following error to be logged and the slot to not work:
[   10.572113] sdhci-pci 0000:00:12.0: failed to setup card detect gpio

Add a DMI quirk table for providing gpiod_lookup_tables with manually
provided CD GPIO info and use this DMI table to provide the CD GPIO info
on this tablet. This fixes the microsd-slot not working.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
Message-ID: <20241118210049.311079-1-hdegoede@redhat.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-12-02 15:06:03 +01:00
Linus Torvalds
38556294b8 MMC core:
- Add support for Ultra Capacity SD cards (SDUC, 2TB to 128TB)
  - Add support for Ultra High-Speed II SD cards (UHS-II)
  - Use a reset control for pwrseq_simple
  - Add SD card quirk for broken poweroff notification
  - Use GFP_NOIO for SD ACMD22
 
 MMC host:
  - bcm2835: Introduce proper clock handling
  - mtk-sd: Add support for the Host-Software-Queue interface
  - mtk-sd: Add support for the mt7988/mt8196 variants
  - mtk-sd: Fix a couple of error paths in ->probe()
  - sdhci: Add interface to support UHS-II SD cards
  - sdhci_am654: Fixup support for changing the signal voltage level
  - sdhci-cadence: Add support for the Microchip PIC64GX variant
  - sdhci-esdhc-imx: Add support for eMMC HW-reset
  - sdhci-msm: Add support for the X1E80100/IPQ5424/SAR2130P/QCS615 variants
  - sdhci-of-arasan: Add support for eMMC HW-reset
  - sdhci-pci-gli: Add UHS-II support for the GL9767/GL9755 variants
 
 MEMSTICK:
  - A couple of minor updates
 -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEugLDXPmKSktSkQsV/iaEJXNYjCkFAmc7NnoXHHVsZi5oYW5z
 c29uQGxpbmFyby5vcmcACgkQ/iaEJXNYjCnQPRAAkxvhptCjKuLBIMBrNZglQElp
 Ncm8fXDiS72CvLwC3bp7rxognCKLVQGWc8GrxcBOxMSB5eiDyPe6xcLLQ2Zrm4l/
 msnfP29VDtmWw3K1iC2Uzo0vlMWYyRFX0OK3fz3d6WL0dE6TXy5adsdy9BmdxGXk
 vpDgiTWkSZcoT/upuXs8/0N87eSgLUFzZ8uPNP+aHtF4AVWIwhJ3Y1MKqdfGrUlw
 7b9bFeh6DelA+jGDxsPsqSwDBh2CDDP3YaPFYf4yyaeTRJmp6DMSEqjDifBa+hDn
 wkwNGj9bN05HeRN3TfsF/Z22LcaPcbWlLYh8p06h+Ws+R/2KxAXdV3oWnKNLQB9R
 5WIdgb7HBD2OS2RymPeHygPPGt6zgxk55UfTBwchg7fHyugXvpcT/JDS2mbPQT4w
 Ty4s217wBn6Kkt4/8fWhHyG/rKBTq02Etmdery4AAM49M2iPvf+edio53FLnskrq
 xB8kYn5UZkk9dQ+GseC4+tXe8A1G/sxh/E2aJ/b15Mc9Mh1/BqL3g2532A+z6x5Q
 8o4nyztCJhKWtfYxo1slnWzF+Axrz6ZXgVYh5MecMk9EjKVcX6oN+FGpiK/cg3dQ
 7FFyzf+YGwdnOhuHhdBG0NTbvKvIRA0rMQ3xvhsfXqCI206j7FZNpWOxXYn36Lgt
 oZlprarw04AoECCg5Ko=
 =LGdl
 -----END PGP SIGNATURE-----

Merge tag 'mmc-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc

Pull MMC updates from Ulf Hansson:
 "MMC core:
   - Add support for Ultra Capacity SD cards (SDUC, 2TB to 128TB)
   - Add support for Ultra High-Speed II SD cards (UHS-II)
   - Use a reset control for pwrseq_simple
   - Add SD card quirk for broken poweroff notification
   - Use GFP_NOIO for SD ACMD22

  MMC host:
   - bcm2835: Introduce proper clock handling
   - mtk-sd: Add support for the Host-Software-Queue interface
   - mtk-sd: Add support for the mt7988/mt8196 variants
   - mtk-sd: Fix a couple of error paths in ->probe()
   - sdhci: Add interface to support UHS-II SD cards
   - sdhci_am654: Fixup support for changing the signal voltage level
   - sdhci-cadence: Add support for the Microchip PIC64GX variant
   - sdhci-esdhc-imx: Add support for eMMC HW-reset
   - sdhci-msm: Add support for the X1E80100/IPQ5424/SAR2130P/QCS615 variants
   - sdhci-of-arasan: Add support for eMMC HW-reset
   - sdhci-pci-gli: Add UHS-II support for the GL9767/GL9755 variants

  MEMSTICK:
   - A couple of minor updates"

* tag 'mmc-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc: (78 commits)
  mmc: pwrseq_simple: Handle !RESET_CONTROLLER properly
  mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting
  mmc: mtk-sd: Fix error handle of probe function
  mmc: core: Correction a warning caused by incorrect type in assignment for UHS-II
  mmc: sdhci-esdhc-imx: Update esdhc sysctl dtocv bitmask
  mmc: sdhci-esdhc-imx: Implement emmc hardware reset
  mmc: core: Correct type in variable assignment for UHS-II
  mmc: sdhci-uhs2: correction a warning caused by incorrect type in argument
  mmc: sdhci-uhs2: Remove unnecessary variables
  mmc: sdhci-uhs2: Correct incorrect type in argument
  mmc: sdhci: Make MMC_SDHCI_UHS2 config symbol invisible
  mmc: sdhci-uhs2: Remove unnecessary NULL check
  mmc: core: Fix error paths for UHS-II card init and re-init
  mmc: core: Add error handling of sd_uhs2_power_up()
  mmc: core: Simplify sd_uhs2_power_up()
  mmc: bcm2835: Introduce proper clock handling
  mmc: bcm2835: Fix type of current clock speed
  dt-bindings: mmc: Add sdhci compatible for QCS615
  mmc: core: Use GFP_NOIO in ACMD22
  dt-bindings: mmc: sdhci-msm: Add SAR2130P compatible
  ...
2024-11-20 12:51:32 -08:00
Linus Torvalds
77a0cfafa9 for-6.13/block-20241118
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmc7S40QHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpjHVD/43rDZ8ehs+IAAr6S0RemNX1SRG0mK2UOEb
 kMoNogS7StO/c4JYW3JuzCyLRn5ZsgeWV/muqxwDEWQrmTGrvi+V45KikrZPwm3k
 p0ump33qV9EU2jiR1MKZjtwK2P0CI7/DD3W8ww6IOvKbTT7RcqQcdHznvXArFBtc
 xCuQPpayFG7ZasC+N9VaBwtiUEVgU3Ek9AFT7UVZRWajjHPNalQwaooJWayO0rEG
 KdoW5yG0ryLrgCY2ACSvRLS+2s14EJtb8hgT08WKHTNgd5LxhSKxfsTapamua+7U
 FdVS6Ij0tEkgu2jpvgj7QKO0Uw10Cnep2gj7RHts/LVewvkliS6XcheOzqRS1jWU
 I2EI+UaGOZ11OUiw52VIveEVS5zV/NWhgy5BSP9LYEvXw0BUAHRDYGMem8o5G1V1
 SWqjIM1UWvcQDlAnMF9FDVzojvjVUmYWvcAlFFztO8J0B7SavHR3NcfHwEf57reH
 rNoUbi/9c4/wjJJF33gejiR5pU+ewy/Mk75GrtX3xpEqlztfRbf9/FbPCMEAO1KR
 DF/b3lkUV9i2/BRW6a0SpZ5RDSmSYMnateel6TrPyVSRnpiSSFO8FrbynwUOa17b
 6i49YDFWzzXOrR1YWDg6IEtTrcmBEmvi7F6aoDs020qUnL0hwLn1ZuoIxuiFEpor
 Z0iFF1B/nw==
 =PWTH
 -----END PGP SIGNATURE-----

Merge tag 'for-6.13/block-20241118' of git://git.kernel.dk/linux

Pull block updates from Jens Axboe:

 - NVMe updates via Keith:
      - Use uring_cmd helper (Pavel)
      - Host Memory Buffer allocation enhancements (Christoph)
      - Target persistent reservation support (Guixin)
      - Persistent reservation tracing (Guixen)
      - NVMe 2.1 specification support (Keith)
      - Rotational Meta Support (Matias, Wang, Keith)
      - Volatile cache detection enhancment (Guixen)

 - MD updates via Song:
      - Maintainers update
      - raid5 sync IO fix
      - Enhance handling of faulty and blocked devices
      - raid5-ppl atomic improvement
      - md-bitmap fix

 - Support for manually defining embedded partition tables

 - Zone append fixes and cleanups

 - Stop sending the queued requests in the plug list to the driver
   ->queue_rqs() handle in reverse order.

 - Zoned write plug cleanups

 - Cleanups disk stats tracking and add support for disk stats for
   passthrough IO

 - Add preparatory support for file system atomic writes

 - Add lockdep support for queue freezing. Already found a bunch of
   issues, and some fixes for that are in here. More will be coming.

 - Fix race between queue stopping/quiescing and IO queueing

 - ublk recovery improvements

 - Fix ublk mmap for 64k pages

 - Various fixes and cleanups

* tag 'for-6.13/block-20241118' of git://git.kernel.dk/linux: (118 commits)
  MAINTAINERS: Update git tree for mdraid subsystem
  block: make struct rq_list available for !CONFIG_BLOCK
  block/genhd: use seq_put_decimal_ull for diskstats decimal values
  block: don't reorder requests in blk_mq_add_to_batch
  block: don't reorder requests in blk_add_rq_to_plug
  block: add a rq_list type
  block: remove rq_list_move
  virtio_blk: reverse request order in virtio_queue_rqs
  nvme-pci: reverse request order in nvme_queue_rqs
  btrfs: validate queue limits
  block: export blk_validate_limits
  nvmet: add tracing of reservation commands
  nvme: parse reservation commands's action and rtype to string
  nvmet: report ns's vwc not present
  md/raid5: Increase r5conf.cache_name size
  block: remove the ioprio field from struct request
  block: remove the write_hint field from struct request
  nvme: check ns's volatile write cache not present
  nvme: add rotational support
  nvme: use command set independent id ns if available
  ...
2024-11-18 16:50:08 -08:00
Ulf Hansson
c0baf6ead7 mmc: Merge branch fixes into next
Merge the mmc fixes for v6.12-rc[n] into the next branch, to allow them to
get tested together with the new mmc changes that are targeted for v6.13.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 19:41:24 +01:00
Aurelien Jarno
1635e407a4 Revert "mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K"
The commit 8396c793ff ("mmc: dw_mmc: Fix IDMAC operation with pages
bigger than 4K") increased the max_req_size, even for 4K pages, causing
various issues:
- Panic booting the kernel/rootfs from an SD card on Rockchip RK3566
- Panic booting the kernel/rootfs from an SD card on StarFive JH7100
- "swiotlb buffer is full" and data corruption on StarFive JH7110

At this stage no fix have been found, so it's probably better to just
revert the change.

This reverts commit 8396c793ff.

Cc: stable@vger.kernel.org
Cc: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: 8396c793ff ("mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K")
Closes: https://lore.kernel.org/linux-mmc/614692b4-1dbe-31b8-a34d-cb6db1909bb7@w6rz.net/
Closes: https://lore.kernel.org/linux-mmc/CAC8uq=Ppnmv98mpa1CrWLawWoPnu5abtU69v-=G-P7ysATQ2Pw@mail.gmail.com/
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Message-ID: <20241110114700.622372-1-aurelien@aurel32.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 19:40:40 +01:00
Stefan Wahren
3f31337cf2 mmc: pwrseq_simple: Handle !RESET_CONTROLLER properly
The recent introduction of reset control in pwrseq_simple introduced
a regression for platforms without RESET_CONTROLLER support, because
devm_reset_control_get_optional_shared() would return NULL and make all
resets no-ops. Instead of enforcing this dependency, rely on this behavior
to determine reset support. As a benefit we can get the rid of the
use_reset flag.

Fixes: 73bf4b7381 ("mmc: pwrseq_simple: add support for one reset control")
Signed-off-by: Stefan Wahren <wahrenst@gmx.net>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Message-ID: <20241108130647.8281-1-wahrenst@gmx.net>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 19:38:47 +01:00
Andy-ld Lu
2508925fb3 mmc: mtk-sd: Fix MMC_CAP2_CRYPTO flag setting
Currently, the MMC_CAP2_CRYPTO flag is set by default for eMMC hosts.
However, this flag should not be set for hosts that do not support inline
encryption.

The 'crypto' clock, as described in the documentation, is used for data
encryption and decryption. Therefore, only hosts that are configured with
this 'crypto' clock should have the MMC_CAP2_CRYPTO flag set.

Fixes: 7b438d0377 ("mmc: mtk-sd: add Inline Crypto Engine clock control")
Fixes: ed299eda8f ("mmc: mtk-sd: fix devm_clk_get_optional usage")
Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Cc: stable@vger.kernel.org
Message-ID: <20241111085039.26527-1-andy-ld.lu@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 19:36:30 +01:00
Andy-ld Lu
291220451c mmc: mtk-sd: Fix error handle of probe function
In the probe function, it goes to 'release_mem' label and returns after
some procedure failure. But if the clocks (partial or all) have been
enabled previously, they would not be disabled in msdc_runtime_suspend,
since runtime PM is not yet enabled for this case.

That cause mmc related clocks always on during system suspend and block
suspend flow. Below log is from a SDCard issue of MT8196 chromebook, it
returns -ETIMEOUT while polling clock stable in the msdc_ungate_clock()
and probe failed, but the enabled clocks could not be disabled anyway.

[  129.059253] clk_chk_dev_pm_suspend()
[  129.350119] suspend warning: msdcpll is on
[  129.354494] [ck_msdc30_1_sel : enabled, 1, 1, 191999939,   ck_msdcpll_d2]
[  129.362787] [ck_msdcpll_d2   : enabled, 1, 1, 191999939,         msdcpll]
[  129.371041] [ck_msdc30_1_ck  : enabled, 1, 1, 191999939, ck_msdc30_1_sel]
[  129.379295] [msdcpll         : enabled, 1, 1, 383999878,          clk26m]

Add a new 'release_clk' label and reorder the error handle functions to
make sure the clocks be disabled after probe failure.

Fixes: ffaea6ebfe ("mmc: mtk-sd: Use readl_poll_timeout instead of open-coded polling")
Fixes: 7a2fa8eed9 ("mmc: mtk-sd: use devm_mmc_alloc_host")
Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: stable@vger.kernel.org
Message-ID: <20241107121215.5201-1-andy-ld.lu@mediatek.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 18:31:05 +01:00
Andre Przywara
85b580afc2 mmc: sunxi-mmc: Fix A100 compatible description
It turns out that the Allwinner A100/A133 SoC only supports 8K DMA
blocks (13 bits wide), for both the SD/SDIO and eMMC instances.
And while this alone would make a trivial fix, the H616 falls back to
the A100 compatible string, so we have to now match the H616 compatible
string explicitly against the description advertising 64K DMA blocks.

As the A100 is now compatible with the D1 description, let the A100
compatible string point to that block instead, and introduce an explicit
match against the H616 string, pointing to the old description.
Also remove the redundant setting of clk_delays to NULL on the way.

Fixes: 3536b82e58 ("mmc: sunxi: add support for A100 mmc controller")
Cc: stable@vger.kernel.org
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Parthiban Nallathambi <parthiban@linumiz.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Message-ID: <20241107014240.24669-1-andre.przywara@arm.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 18:22:57 +01:00
Victor Shih
7f083e4b9b mmc: core: Correction a warning caused by incorrect type in assignment for UHS-II
There is a type issue in the assignment in the sd_uhs2_dev_init()
that will generate a warning when building the kernel.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202411051248.wvjHSFNj-lkp@intel.com/
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241105102901.351429-1-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-12 17:49:00 +01:00
Josua Mayer
84185573da mmc: sdhci-esdhc-imx: Update esdhc sysctl dtocv bitmask
NXP ESDHC supports setting data timeout using uSDHCx_SYS_CTRL register
DTOCV bits (bits 16-19).
Currently the driver accesses those bits by 32-bit write using
SDHCI_TIMEOUT_CONTROL (0x2E) defined in drivers/mmc/host/sdhci.h.
This is offset by two bytes relative to uSDHCx_SYS_CTRL (0x2C).
The driver also defines ESDHC_SYS_CTRL_DTOCV_MASK as first 4 bits, which
is correct relative to SDHCI_TIMEOUT_CONTROL but not relative to
uSDHCx_SYS_CTRL. The definition carrying control register in its name is
therefore inconsistent.

Update the bitmask definition for bits 16-19 to be correct relative to
control register base.
Update the esdhc_set_timeout function to set timeout value at control
register base, not timeout offset.

This solves a purely cosmetic problem.

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241101-imx-emmc-reset-v3-2-184965eed476@solid-run.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-04 12:16:39 +01:00
Josua Mayer
8ba9d45a33 mmc: sdhci-esdhc-imx: Implement emmc hardware reset
NXP ESDHC supports control of native emmc reset signal when pinmux is
set accordingly, using uSDHCx_SYS_CTRL register IPP_RST_N bit.
Documentation is available in NXP i.MX6Q Reference Manual.

Implement the hw_reset function in sdhci_ops asserting reset for at
least 1us and waiting at least 200us after deassertion.
Lower bounds are based on:
JEDEC Standard No. 84-B51, 6.15.10 H/W Reset Operation, page 159.
Upper bounds are chosen allowing flexibility to the scheduler.

Tested on SolidRun i.MX8DXL SoM with a scope, and confirmed that eMMC is
still accessible after boot:
- eMMC extcsd has RST_N_FUNCTION=0x01
- sdhc node has cap-mmc-hw-reset
- pinmux set for EMMC0_RESET_B
- Linux v5.15

Signed-off-by: Josua Mayer <josua@solid-run.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241101-imx-emmc-reset-v3-1-184965eed476@solid-run.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-04 12:16:30 +01:00
Victor Shih
53857ced9f mmc: core: Correct type in variable assignment for UHS-II
There is a type issue in assignment in the sd_uhs2_dev_init(),
sd_uhs2_enum() and sd_uhs2_config_write() that will generate
a warning when building the kernel. Let's fix it.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410260423.15jvE6qc-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202410261827.7h8YK8u2-lkp@intel.com/
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Message-ID: <20241101104416.4954-2-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-04 12:11:37 +01:00
Victor Shih
dd92de9f99 mmc: sdhci-uhs2: correction a warning caused by incorrect type in argument
There is a type issue in the argument in the uhs2_dev_cmd()
that will generate a warning when building the kernel.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410260525.ZUuPhMJz-lkp@intel.com/
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Message-ID: <20241101104416.4954-1-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-11-04 12:11:17 +01:00
Victor Shih
c61bc45cf1 mmc: sdhci-uhs2: Remove unnecessary variables
There are unnecessary variables in the sdhci_uhs2_send_command() that will
generate a warning when building the kernel. Let's drop them!

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410252107.y9EgrTbA-lkp@intel.com/
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Message-ID: <20241030112216.4057-2-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-10-31 17:36:34 +01:00
Victor Shih
259d262e8d mmc: sdhci-uhs2: Correct incorrect type in argument
There is a type issue in the argument in the __sdhci_uhs2_send_command()
that will generate a warning when building the kernel.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410260525.ZUuPhMJz-lkp@intel.com/
Suggested-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw>
Signed-off-by: Victor Shih <victor.shih@genesyslogic.com.tw>
Message-ID: <20241030112216.4057-1-victorshihgli@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-10-31 17:31:22 +01:00
Geert Uytterhoeven
8a98e86a5a mmc: sdhci: Make MMC_SDHCI_UHS2 config symbol invisible
There is no need to ask the user about enabling UHS-II support, as all
drivers that support UHS2-capable devices already select MMC_SDHCI_UHS2.
Hence make the symbol invisible, unless when compile-testing.

Fixes: 2af7dd8b64 ("mmc: sdhci: add UHS-II module and add a kernel configuration")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Message-ID: <079f2b7473d34895843ad278d79930c681385b2e.1730282633.git.geert+renesas@glider.be>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2024-10-30 12:06:25 +01:00