Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313899

Re: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform

From James Liao <jamesjj.liao@mediatek.com>
Newsgroups linux.kernel
Subject Re: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform
Date 2016-01-21 06:30 +0100
Message-ID <qTfYL-Ea-13@gated-at.bofh.it> (permalink)
References <qSU7T-2tK-3@gated-at.bofh.it> <qSU7U-2tK-11@gated-at.bofh.it> <qSX5N-4m2-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2016-01-20 at 17:14 +0800, Yingjoe Chen wrote:
> On Wed, 2016-01-20 at 14:08 +0800, James Liao wrote:
> > Refine scpsys driver common code to support multiple SoC / platform.
> > 
> > Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
> <...>
> > diff --git a/drivers/soc/mediatek/mtk-scpsys.h b/drivers/soc/mediatek/mtk-scpsys.h
> > new file mode 100644
> > index 0000000..e435bc3
> > --- /dev/null
> > +++ b/drivers/soc/mediatek/mtk-scpsys.h
> > @@ -0,0 +1,55 @@
> > +#ifndef __DRV_SOC_MTK_H
> > +#define __DRV_SOC_MTK_H
> > +
> > +enum clk_id {
> > +	CLK_NONE,
> > +	CLK_MM,
> > +	CLK_MFG,
> > +	CLK_VENC,
> > +	CLK_VENC_LT,
> > +	CLK_MAX,
> > +};
> > +
> > +#define MAX_CLKS	2
> > +
> > +struct scp_domain_data {
> > +	const char *name;
> > +	u32 sta_mask;
> > +	int ctl_offs;
> > +	u32 sram_pdn_bits;
> > +	u32 sram_pdn_ack_bits;
> > +	u32 bus_prot_mask;
> > +	enum clk_id clk_id[MAX_CLKS];
> > +	bool active_wakeup;
> > +};
> > +
> > +struct scp;
> > +
> > +struct scp_domain {
> > +	struct generic_pm_domain genpd;
> > +	struct scp *scp;
> > +	struct clk *clk[MAX_CLKS];
> > +	u32 sta_mask;
> > +	void __iomem *ctl_addr;
> > +	u32 sram_pdn_bits;
> > +	u32 sram_pdn_ack_bits;
> > +	u32 bus_prot_mask;
> > +	bool active_wakeup;
> > +	struct regulator *supply;
> > +};
> > +
> > +struct scp {
> > +	struct scp_domain *domains;
> > +	struct genpd_onecell_data pd_data;
> > +	struct device *dev;
> > +	void __iomem *base;
> > +	struct regmap *infracfg;
> > +};
> > +
> > +struct scp *init_scp(struct platform_device *pdev,
> > +			const struct scp_domain_data *scp_domain_data, int num);
> > +
> > +void mtk_register_power_domains(struct platform_device *pdev,
> > +				struct scp *scp, int num);
> > +
> > +#endif /* __DRV_SOC_MTK_H */
> 
> After merge, only mtk-scpsys.c will use this file. I think it make sense
> to just include them in mtk-scpsys.c. Also init_scp and
> mtk_register_power_domains can be static now.

Hi Yingjoe,

OK. I can merge this header file into mtk-scpsys.c when we confirmed the
MT8173 + MT2701 implementation is OK.


Hi Matthias,

Do you have suggestions for this implementation that merge MT8173 and
MT2701 support in the same file?


Best regards,

James

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform James Liao <jamesjj.liao@mediatek.com> - 2016-01-20 07:10 +0100
  Re: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple  platform Yingjoe Chen <yingjoe.chen@mediatek.com> - 2016-01-20 10:20 +0100
    Re: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple  platform James Liao <jamesjj.liao@mediatek.com> - 2016-01-21 06:30 +0100

csiph-web