mbox series

[v2,0/4] mmc: renesas_sdhi: upport improvements from BSP

Message ID 20221120113457.42010-1-wsa+renesas@sang-engineering.com
Headers show
Series mmc: renesas_sdhi: upport improvements from BSP | expand

Message

Wolfram Sang Nov. 20, 2022, 11:34 a.m. UTC
This series upports two BSP improvements in a refactored way. BSP patch
de9461ece1fa ("mmc: renesas_sdhi: scc_ctl is always set in after R-Car
Gen3") made sure we have a pointer to always reset SCC. I refactored it
to include Gen2 as well, so we can optimize the following code a bit.
This is patch 1. BSP patch 15d7abbfc3f0 ("mmc: renesas_sdhi: reset
calibration register") added a new quirk for devices which always should
disable HS400 adjustment. This was only applicable for SoCs which either
had bad_taps or needed a calibration table. So, I simply used this logic
directly instead of a quirk. This is patch 2.

Two cleanups come afterwards. To increase readability, I finally did
something I wanted to do for some time now. Having a helper to check for
SDHI quirks. This is patch 3. And while working on this, I discovered a
new macro from the MMC core which we can make use of. This is patch 4.

The series has been tested on a Salvator-XS (R-Car M3-N) and a Lager
(R-Car H2) board. The patches are based on mmc/next as of today as they
depend on d901e2ba566 ("mmc: renesas_sdhi: take DMA end interrupts into
account"). A branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/for-6.2

Let me know what you think!

Happy hacking,

   Wolfram

Changes since V1:
* added another improvement to the series
* reordered cleanups last so backporting fixes is easier


Wolfram Sang (4):
  mmc: renesas_sdhi: alway populate SCC pointer
  mmc: renesas_sdhi: better reset from HS400 mode
  mmc: renesas_sdhi: add helper to access quirks
  mmc: renesas_sdhi: use new convenience macro from MMC core

 drivers/mmc/host/renesas_sdhi.h               |  2 ++
 drivers/mmc/host/renesas_sdhi_core.c          | 29 ++++++++++---------
 drivers/mmc/host/renesas_sdhi_internal_dmac.c |  8 ++---
 3 files changed, 21 insertions(+), 18 deletions(-)

Comments

Ulf Hansson Nov. 21, 2022, 8:29 p.m. UTC | #1
On Sun, 20 Nov 2022 at 12:35, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> This series upports two BSP improvements in a refactored way. BSP patch
> de9461ece1fa ("mmc: renesas_sdhi: scc_ctl is always set in after R-Car
> Gen3") made sure we have a pointer to always reset SCC. I refactored it
> to include Gen2 as well, so we can optimize the following code a bit.
> This is patch 1. BSP patch 15d7abbfc3f0 ("mmc: renesas_sdhi: reset
> calibration register") added a new quirk for devices which always should
> disable HS400 adjustment. This was only applicable for SoCs which either
> had bad_taps or needed a calibration table. So, I simply used this logic
> directly instead of a quirk. This is patch 2.
>
> Two cleanups come afterwards. To increase readability, I finally did
> something I wanted to do for some time now. Having a helper to check for
> SDHI quirks. This is patch 3. And while working on this, I discovered a
> new macro from the MMC core which we can make use of. This is patch 4.
>
> The series has been tested on a Salvator-XS (R-Car M3-N) and a Lager
> (R-Car H2) board. The patches are based on mmc/next as of today as they
> depend on d901e2ba566 ("mmc: renesas_sdhi: take DMA end interrupts into
> account"). A branch can be found here:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/sdhi/for-6.2
>
> Let me know what you think!
>
> Happy hacking,
>
>    Wolfram
>
> Changes since V1:
> * added another improvement to the series
> * reordered cleanups last so backporting fixes is easier
>
>
> Wolfram Sang (4):
>   mmc: renesas_sdhi: alway populate SCC pointer
>   mmc: renesas_sdhi: better reset from HS400 mode
>   mmc: renesas_sdhi: add helper to access quirks
>   mmc: renesas_sdhi: use new convenience macro from MMC core
>
>  drivers/mmc/host/renesas_sdhi.h               |  2 ++
>  drivers/mmc/host/renesas_sdhi_core.c          | 29 ++++++++++---------
>  drivers/mmc/host/renesas_sdhi_internal_dmac.c |  8 ++---
>  3 files changed, 21 insertions(+), 18 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe