[PATCH v4 1/4] mmc: sdhci-of-dwcmshc: add callback functions for dwcmshc

Chen Wang unicorn_wang at outlook.com
Wed Jul 17 01:05:58 PDT 2024


On 2024/6/27 3:13, Adrian Hunter wrote:
> On 18/06/24 11:38, Chen Wang wrote:
>> From: Chen Wang <unicorn_wang at outlook.com>
>>
>> The current framework is not easily extended to support new SOCs.
>> For example, in the current code we see that the SOC-level
>> structure `rk35xx_priv` and related logic are distributed in
>> functions such as dwcmshc_probe/dwcmshc_remove/dwcmshc_suspend/......,
>> which is inappropriate.
>>
>> The solution is to abstract some possible common operations of soc
>> as dwcmshc platform data. Each soc implements the corresponding callback
>> function according to its own needs.
>> dwcmshc framework is responsible for calling these callback functions
>> in those dwcmshc_xxx functions at proper positions.
> This could be 5 patches:
> 	1. Common bulk optional clocks support (as suggested below)
> 	2. Move functions dwcmshc_rk35xx_init() and dwcmshc_rk35xx_postinit()
> 	3. Factor out code for th1520_init()
> 	4. Factor out code into dwcmshc_rk35xx_init
> 	5. Add dwcmshc_pltfm_data etc

Hi, I'm back, and I finally found the time to continue this work.

Thank you Adrian for your execllent input, I will investigate and rework 
the code as per your suggestion.

Regards,

Chen

[......]





More information about the linux-riscv mailing list