1. 26 Apr, 2024 2 commits
    • Adrian Hunter's avatar
      mmc: sdhci: Add support for "Tuning Error" interrupts · b3855668
      Adrian Hunter authored
      Most Bay Trail devices do not enable UHS modes for the external sdcard slot
      the Lenovo Yoga Tablet 2 830 / 1050 and Lenovo Yoga Tablet 2 Pro 1380 (8",
      10" and 13") models however do enable this.
      
      Using a UHS cards in these tablets results in errors like this one:
      
      [  225.272001] mmc2: Unexpected interrupt 0x04000000.
      [  225.272024] mmc2: sdhci: ============ SDHCI REGISTER DUMP ===========
      [  225.272034] mmc2: sdhci: Sys addr:  0x0712c400 | Version:  0x0000b502
      [  225.272044] mmc2: sdhci: Blk size:  0x00007200 | Blk cnt:  0x00000007
      [  225.272054] mmc2: sdhci: Argument:  0x00000000 | Trn mode: 0x00000023
      [  225.272064] mmc2: sdhci: Present:   0x01e20002 | Host ctl: 0x00000016
      [  225.272073] mmc2: sdhci: Power:     0x0000000f | Blk gap:  0x00000000
      [  225.272082] mmc2: sdhci: Wake-up:   0x00000000 | Clock:    0x00000107
      [  225.272092] mmc2: sdhci: Timeout:   0x0000000e | Int stat: 0x00000001
      [  225.272101] mmc2: sdhci: Int enab:  0x03ff000b | Sig enab: 0x03ff000b
      [  225.272110] mmc2: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000001
      [  225.272119] mmc2: sdhci: Caps:      0x076864b2 | Caps_1:   0x00000004
      [  225.272129] mmc2: sdhci: Cmd:       0x00000c1b | Max curr: 0x00000000
      [  225.272138] mmc2: sdhci: Resp[0]:   0x00000c00 | Resp[1]:  0x00000000
      [  225.272147] mmc2: sdhci: Resp[2]:   0x00000000 | Resp[3]:  0x00000900
      [  225.272155] mmc2: sdhci: Host ctl2: 0x0000000c
      [  225.272164] mmc2: sdhci: ADMA Err:  0x00000003 | ADMA Ptr: 0x0712c200
      [  225.272172] mmc2: sdhci: ============================================
      
      which results in IO errors leading to issues accessing the sdcard.
      
      0x04000000 is a so-called "Tuning Error" which sofar the SDHCI driver
      does not support / enable. Modify the IRQ handler to process these.
      
      This fixes UHS microsd cards not working with these tablets.
      
      Link: https://lore.kernel.org/r/199bb4aa-c6b5-453e-be37-58bbf468800c@intel.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20240410191639.526324-3-hdegoede@redhat.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b3855668
    • Hans de Goede's avatar
      mmc: core: Add mmc_gpiod_set_cd_config() function · 63a7cd66
      Hans de Goede authored
      Some mmc host drivers may need to fixup a card-detection GPIO's config
      to e.g. enable the GPIO controllers builtin pull-up resistor on devices
      where the firmware description of the GPIO is broken (e.g. GpioInt with
      PullNone instead of PullUp in ACPI DSDT).
      
      Since this is the exception rather then the rule adding a config
      parameter to mmc_gpiod_request_cd() seems undesirable, so instead
      add a new mmc_gpiod_set_cd_config() function. This is simply a wrapper
      to call gpiod_set_config() on the card-detect GPIO acquired through
      mmc_gpiod_request_cd().
      Reviewed-by: default avatarAndy Shevchenko <andy@kernel.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: stable@vger.kernel.org
      Link: https://lore.kernel.org/r/20240410191639.526324-2-hdegoede@redhat.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      63a7cd66
  2. 25 Apr, 2024 3 commits
  3. 04 Apr, 2024 9 commits
  4. 02 Apr, 2024 26 commits