mbox series

[0/4] mmc: mtk-sd: Cleanups for register R/W

Message ID 20250325110701.52623-1-angelogioacchino.delregno@collabora.com (mailing list archive)
Headers show
Series mmc: mtk-sd: Cleanups for register R/W | expand

Message

AngeloGioacchino Del Regno March 25, 2025, 11:06 a.m. UTC
This series adds missing register field definitions for the MSDC patch
bit registers and aggregates various register writes into just one,
greatly lowering the amount of register reads and writes especially
during the controller initialization phase, other than the tuning
phases and set_ios for mclk setting.

While this will have a performance gain, that is completely ignorable,
hence this series' only focus is a cleanup and an improvement in the
readability of the register settings (as those now have actual names,
some documenting, and no magic numbers around).

This series brings no functional differences.

AngeloGioacchino Del Regno (4):
  mmc: mtk-sd: Clarify patch bit register initialization and layout
  mmc: mtk-sd: Aggregate writes for MSDC_PATCH_BIT1/2 setup
  mmc: mtk-sd: Do single write in function msdc_new_tx_setting
  mmc: mtk-sd: Aggregate R/W for top_base iospace case where possible

 drivers/mmc/host/mtk-sd.c | 207 ++++++++++++++++++++++++--------------
 1 file changed, 132 insertions(+), 75 deletions(-)

Comments

Ulf Hansson April 9, 2025, 1:13 p.m. UTC | #1
On Tue, 25 Mar 2025 at 12:07, AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> This series adds missing register field definitions for the MSDC patch
> bit registers and aggregates various register writes into just one,
> greatly lowering the amount of register reads and writes especially
> during the controller initialization phase, other than the tuning
> phases and set_ios for mclk setting.
>
> While this will have a performance gain, that is completely ignorable,
> hence this series' only focus is a cleanup and an improvement in the
> readability of the register settings (as those now have actual names,
> some documenting, and no magic numbers around).
>
> This series brings no functional differences.
>
> AngeloGioacchino Del Regno (4):
>   mmc: mtk-sd: Clarify patch bit register initialization and layout
>   mmc: mtk-sd: Aggregate writes for MSDC_PATCH_BIT1/2 setup
>   mmc: mtk-sd: Do single write in function msdc_new_tx_setting
>   mmc: mtk-sd: Aggregate R/W for top_base iospace case where possible
>
>  drivers/mmc/host/mtk-sd.c | 207 ++++++++++++++++++++++++--------------
>  1 file changed, 132 insertions(+), 75 deletions(-)
>

Applied for next, thanks!

Kind regards
Uffe