From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: shawn.lin@rock-chips.com, linux-mmc@vger.kernel.org,
Jaehoon Chung <jh80.chung@samsung.com>
Subject: Re: [PATCH 0/13] dw_mmc cleanup
Date: Thu, 20 Nov 2025 20:51:55 +0800 [thread overview]
Message-ID: <dedc2dec-59f0-4656-b8d7-73d3e6a7c13e@rock-chips.com> (raw)
In-Reply-To: <CAPDyKFqHM8VvpTVT-iAbPUvo2Q2EHhyZD2xpgWYTt-4oXrucUQ@mail.gmail.com>
在 2025/11/20 星期四 19:10, Ulf Hansson 写道:
> On Thu, 20 Nov 2025 at 11:29, Shawn Lin <shawn.lin@rock-chips.com> wrote:
>>
>> Hi Ulf & Jaehoon
>>
>> As you can see, dw_mmc is likely one of the most complex and difficult-to-read
>> host driver at present. It maintains various states and bottom-half scheduling,
>> containing a significant amount of redundant code—including a multi-slot mechanism
>> that has been unsupported for over a decade.
>>
>> Jaehoon attempted to remove cur_slot more than ten years ago, but the driver still
>> retains the slot structure and the associated queue mechanism designed to support
>> multiple slots. This has made the already complex code even harder to read and maintain.
>>
>> The first four patches aim to eliminate some of the redundant code, while the remaining
>> patches are intended to ultimately remove the dw_mci_slot variable. To facilitate review
>> and minimize the risk of regression, each patch is designed to accomplish a single,
>> clear objective.
>>
>> This series have been tested on the RK3588S EVB1 platform.
>
> Thanks for working on this! I had something similar on my todo list
> for dw_mmc for years, but never reached to actually work on it.
> Anyway, I will review the code shortly.
Thanks for helping review it. I found patch 8,12 and 13 need to be
improved a bit after another round of self-reviewing, but they are
trival formatting issues. Will update onced get reviewed.
>
> That said, would it be possible for you to step in and help Jaehoon
> with the maintenance going forward?
>
As I do have other follow-up patches to improve this driver, it would be
good for me to keep an eye on changes of dw_mmc. So yes, I am OK
to step in and help review dw_mmc patches.
> Kind regards
> Uffe
>
>>
>>
>>
>> Shawn Lin (13):
>> mmc: dw_mmc: Remove unused struct dma_pdata
>> mmc: dw_mmc: add dw_mci_prepare_desc() for both of 32bit and 64bit DMA
>> mmc: dw_mmc: Remove vqmmc_enabled from struct dw_mci
>> mmc: dw_mmc: Remove unused header files and keep alphabetical order
>> mmc: dw_mmc: Move struct mmc_host from struct dw_mci_slot to struct
>> dw_mci
>> mmc: dw_mmc: Let glue drivers to use struct dw_mci as possible
>> mmc: dw_mmc: Move flags from struct dw_mci_slot to struct dw_mci
>> mmc: dw_mmc: Remove id from dw_mci_slot
>> mmc: dw_mmc: Remove sdio_id from struct dw_mci_slot
>> mmc: dw_mmc: Move clock rate stuff from struct dw_mci_slot to struct
>> dw_mci
>> mmc: dw_mmc: Remove mrq from struct dw_mci_slot
>> mmc: dw_mmc: Remove queue from dw_mci
>> mmc: dw_mmc: Remove struct dw_mci_slot
>>
>> drivers/mmc/host/dw_mmc-exynos.c | 9 +-
>> drivers/mmc/host/dw_mmc-hi3798cv200.c | 6 +-
>> drivers/mmc/host/dw_mmc-hi3798mv200.c | 17 +-
>> drivers/mmc/host/dw_mmc-k3.c | 21 +-
>> drivers/mmc/host/dw_mmc-pltfm.c | 2 +-
>> drivers/mmc/host/dw_mmc-rockchip.c | 9 +-
>> drivers/mmc/host/dw_mmc-starfive.c | 5 +-
>> drivers/mmc/host/dw_mmc.c | 606 ++++++++++++++--------------------
>> drivers/mmc/host/dw_mmc.h | 83 ++---
>> 9 files changed, 297 insertions(+), 461 deletions(-)
>>
>> --
>> 2.7.4
>>
>
next prev parent reply other threads:[~2025-11-20 12:52 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-20 10:29 [PATCH 0/13] dw_mmc cleanup Shawn Lin
2025-11-20 10:29 ` [PATCH 01/13] mmc: dw_mmc: Remove unused struct dma_pdata Shawn Lin
2025-11-20 10:29 ` [PATCH 02/13] mmc: dw_mmc: add dw_mci_prepare_desc() for both of 32bit and 64bit DMA Shawn Lin
2025-11-20 10:29 ` [PATCH 03/13] mmc: dw_mmc: Remove vqmmc_enabled from struct dw_mci Shawn Lin
2025-11-25 12:23 ` Ulf Hansson
2025-11-20 10:29 ` [PATCH 04/13] mmc: dw_mmc: Remove unused header files and keep alphabetical order Shawn Lin
2025-11-20 10:29 ` [PATCH 05/13] mmc: dw_mmc: Move struct mmc_host from struct dw_mci_slot to struct dw_mci Shawn Lin
2025-11-20 10:29 ` [PATCH 06/13] mmc: dw_mmc: Let glue drivers to use struct dw_mci as possible Shawn Lin
2025-11-20 10:29 ` [PATCH 07/13] mmc: dw_mmc: Move flags from struct dw_mci_slot to struct dw_mci Shawn Lin
2025-11-20 10:29 ` [PATCH 08/13] mmc: dw_mmc: Remove id from dw_mci_slot Shawn Lin
2025-11-20 10:29 ` [PATCH 09/13] mmc: dw_mmc: Remove sdio_id from struct dw_mci_slot Shawn Lin
2025-11-20 10:29 ` [PATCH 10/13] mmc: dw_mmc: Move clock rate stuff from struct dw_mci_slot to struct dw_mci Shawn Lin
2025-11-20 10:29 ` [PATCH 11/13] mmc: dw_mmc: Remove mrq from struct dw_mci_slot Shawn Lin
2025-11-20 10:29 ` [PATCH 12/13] mmc: dw_mmc: Remove queue from dw_mci Shawn Lin
2025-11-20 10:29 ` [PATCH 13/13] mmc: dw_mmc: Remove struct dw_mci_slot Shawn Lin
2025-11-22 18:40 ` kernel test robot
2025-11-22 19:54 ` kernel test robot
2025-11-20 11:10 ` [PATCH 0/13] dw_mmc cleanup Ulf Hansson
2025-11-20 12:51 ` Shawn Lin [this message]
2025-11-25 12:33 ` Ulf Hansson
2025-11-25 14:00 ` Shawn Lin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dedc2dec-59f0-4656-b8d7-73d3e6a7c13e@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox