linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: yingjoe.chen@mediatek.com (Yingjoe Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform
Date: Wed, 20 Jan 2016 17:14:04 +0800	[thread overview]
Message-ID: <1453281244.16515.3.camel@mtksdaap41> (raw)
In-Reply-To: <1453270097-53853-2-git-send-email-jamesjj.liao@mediatek.com>

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.

Joe.C

  reply	other threads:[~2016-01-20  9:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  6:08 [PATCH v4 0/4] Mediatek MT2701 SCPSYS power domain support James Liao
2016-01-20  6:08 ` [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform James Liao
2016-01-20  9:14   ` Yingjoe Chen [this message]
2016-01-21  5:27     ` James Liao
2016-01-31 11:51   ` Matthias Brugger
2016-02-02  6:56     ` James Liao
2016-02-02 10:44       ` Matthias Brugger
2016-02-03  5:22         ` James Liao
2016-02-03  9:00           ` Matthias Brugger
2016-02-15  9:09             ` James Liao
2016-01-20  6:08 ` [PATCH v4 2/4] soc: mediatek: Init MT8173 scpsys driver earlier James Liao
2016-01-20  6:08 ` [PATCH v4 3/4] soc: mediatek: Add MT2701 power dt-bindings James Liao
2016-01-20  9:29   ` Yingjoe Chen
2016-01-20 16:35     ` Rob Herring
2016-01-21  5:22       ` James Liao
2016-01-20  6:08 ` [PATCH v4 4/4] soc: mediatek: Add MT2701 scpsys driver James Liao

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=1453281244.16515.3.camel@mtksdaap41 \
    --to=yingjoe.chen@mediatek.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).