8586 Commits

Author SHA1 Message Date
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: 403a0293f1c2 ("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: e519f0bb64ef ("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: fae80a99dc03 ("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: 3edf588e7fe0 ("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: d46ba2d17f90 ("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: 467e081d23e6 ("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 7838a8ddc80b ("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: c7eed31e235c ("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: c4ac38c6539b ("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 941a7abd4666912b84ab209396fdb54b0dae685d.

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: 941a7abd4666 ("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 c7eed31e235c ("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: c7eed31e235c ("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: 527f36f5efa4 ("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: 4346b7c7941d ("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