From: James Liao <jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
To: Yingjoe Chen
<yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
Matthias Brugger
<matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Kevin Hilman <khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform
Date: Thu, 21 Jan 2016 13:27:41 +0800 [thread overview]
Message-ID: <1453354061.5384.40.camel@mtksdaap41> (raw)
In-Reply-To: <1453281244.16515.3.camel@mtksdaap41>
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-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> <...>
> > 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
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-01-21 5:27 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
[not found] ` <1453270097-53853-1-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-01-20 6:08 ` [PATCH v4 1/4] soc: mediatek: Refine scpsys to support multiple platform James Liao
[not found] ` <1453270097-53853-2-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2016-01-20 9:14 ` Yingjoe Chen
2016-01-21 5:27 ` James Liao [this message]
2016-01-31 11:51 ` Matthias Brugger
[not found] ` <56ADF556.6070402-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-02 6:56 ` James Liao
2016-02-02 10:44 ` Matthias Brugger
[not found] ` <56B0889A.1010305-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-03 5:22 ` James Liao
2016-02-03 9:00 ` Matthias Brugger
[not found] ` <56B1C19F.9070300-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
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
[not found] ` <1453270097-53853-4-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
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=1453354061.5384.40.camel@mtksdaap41 \
--to=jamesjj.liao-nus5lvnupcjwk0htik3j/w@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=khilman-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
--cc=yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.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).