[PATCH V2 06/12] clk: mediatek: reset: Revise structure to control reset register

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Thu Apr 21 02:07:52 PDT 2022


Il 20/04/22 15:05, Rex-BC Chen ha scritto:
> Add mtk_clk_rst_desc to input the reset register data, and replace the
> structure "struct mtk_reset" to reset.h, and rename it as
> "mtk_clk_rst_data". We use them to store reset register data and
> store reset controller device.
> 
> Signed-off-by: Rex-BC Chen <rex-bc.chen at mediatek.com>
> ---
>   drivers/clk/mediatek/clk-mt2701-eth.c |  8 +++++-
>   drivers/clk/mediatek/clk-mt2701-g3d.c |  8 +++++-
>   drivers/clk/mediatek/clk-mt2701-hif.c |  8 +++++-
>   drivers/clk/mediatek/clk-mt2701.c     | 19 ++++++++++++--
>   drivers/clk/mediatek/clk-mt2712.c     | 19 ++++++++++++--
>   drivers/clk/mediatek/clk-mt7622-eth.c |  8 +++++-
>   drivers/clk/mediatek/clk-mt7622-hif.c | 10 ++++++--
>   drivers/clk/mediatek/clk-mt7622.c     | 19 ++++++++++++--
>   drivers/clk/mediatek/clk-mt7629-eth.c |  8 +++++-
>   drivers/clk/mediatek/clk-mt7629-hif.c | 10 ++++++--
>   drivers/clk/mediatek/clk-mt8135.c     | 19 ++++++++++++--
>   drivers/clk/mediatek/clk-mt8173.c     | 19 ++++++++++++--
>   drivers/clk/mediatek/clk-mt8183.c     |  9 +++++--
>   drivers/clk/mediatek/reset.c          | 36 +++++++++++++--------------
>   drivers/clk/mediatek/reset.h          | 15 ++++++++++-
>   15 files changed, 174 insertions(+), 41 deletions(-)
> 

..snip..

> diff --git a/drivers/clk/mediatek/reset.c b/drivers/clk/mediatek/reset.c
> index 8e42deee80a3..d67c13958458 100644
> --- a/drivers/clk/mediatek/reset.c
> +++ b/drivers/clk/mediatek/reset.c
> @@ -14,25 +14,19 @@
>   
>   #include "clk-mtk.h"
>   
> -struct mtk_reset {
> -	struct regmap *regmap;
> -	int regofs;
> -	struct reset_controller_dev rcdev;
> -};
> -
> -static inline struct mtk_reset *to_rst_data(struct reset_controller_dev *rcdev)
> +static inline struct mtk_clk_rst_data *to_rst_data(struct reset_controller_dev *rcdev)
>   {

to_mtk_clk_rst_data()...
by the way, it's probably better if you introduce this helper here directly,
instead of introducing it in commit 03/12 and changing it entirely in 06/12.

The rest of the code looks good to me, I'm sure that you'll get my R-b in the
next version.




More information about the Linux-mediatek mailing list