All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthias Brugger <matthias.bgg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: James Liao <jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
Cc: Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	srv_heupstream-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org,
	Eddie Huang <eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Henry Chen <henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Yingjoe Chen
	<yingjoe.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Daniel Kurtz <djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Ricky Liang <jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 4/5] clk: mediatek: Add subsystem clocks of MT8173
Date: Fri, 12 Jun 2015 19:09:02 +0200	[thread overview]
Message-ID: <5809360.66NP4oPW1R@ubix> (raw)
In-Reply-To: <1432192376-6712-5-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>

On Thursday, May 21, 2015 03:12:55 PM James Liao wrote:
> Most multimedia subsystem clocks will be accessed by multiple
> drivers, so it's a better way to manage these clocks in CCF.
> This patch adds clock support for MM, IMG, VDEC, VENC and VENC_LT
> subsystems.
> 
> Signed-off-by: James Liao <jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
> ---
>  drivers/clk/mediatek/clk-mt8173.c      | 310
> +++++++++++++++++++++++++++++++++ include/dt-bindings/clock/mt8173-clk.h | 
> 87 +++++++++
>  2 files changed, 397 insertions(+)
> 
> diff --git a/drivers/clk/mediatek/clk-mt8173.c
> b/drivers/clk/mediatek/clk-mt8173.c index eb175ac..e2f40ba 100644
> --- a/drivers/clk/mediatek/clk-mt8173.c
> +++ b/drivers/clk/mediatek/clk-mt8173.c
> @@ -700,6 +700,195 @@ static const struct mtk_composite peri_clks[]
> __initconst = { MUX(CLK_PERI_UART3_SEL, "uart3_ck_sel",
> uart_ck_sel_parents, 0x40c, 3, 1), };
> 
> +static struct mtk_gate_regs img_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_IMG(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &img_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr,			\
> +	}
> +
[...]
> +
> +static struct mtk_gate_regs venc_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_VENC(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &venc_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr_inv,		\
> +	}
> +
> +static struct mtk_gate venc_clks[] __initdata = {
> +	GATE_VENC(CLK_VENC_CKE0, "venc_cke0", "mm_sel", 0),
> +	GATE_VENC(CLK_VENC_CKE1, "venc_cke1", "venc_sel", 4),
> +	GATE_VENC(CLK_VENC_CKE2, "venc_cke2", "venc_sel", 8),
> +	GATE_VENC(CLK_VENC_CKE3, "venc_cke3", "venc_sel", 12),
> +};
> +
> +static struct mtk_gate_regs venclt_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};


The register for imagesys, vencsys and vencltsys have all the same offset.
We could use just one struct for all of them. 

Cheers,
Matthias
--
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

WARNING: multiple messages have this Message-ID (diff)
From: matthias.bgg@gmail.com (Matthias Brugger)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] clk: mediatek: Add subsystem clocks of MT8173
Date: Fri, 12 Jun 2015 19:09:02 +0200	[thread overview]
Message-ID: <5809360.66NP4oPW1R@ubix> (raw)
In-Reply-To: <1432192376-6712-5-git-send-email-jamesjj.liao@mediatek.com>

On Thursday, May 21, 2015 03:12:55 PM James Liao wrote:
> Most multimedia subsystem clocks will be accessed by multiple
> drivers, so it's a better way to manage these clocks in CCF.
> This patch adds clock support for MM, IMG, VDEC, VENC and VENC_LT
> subsystems.
> 
> Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
> ---
>  drivers/clk/mediatek/clk-mt8173.c      | 310
> +++++++++++++++++++++++++++++++++ include/dt-bindings/clock/mt8173-clk.h | 
> 87 +++++++++
>  2 files changed, 397 insertions(+)
> 
> diff --git a/drivers/clk/mediatek/clk-mt8173.c
> b/drivers/clk/mediatek/clk-mt8173.c index eb175ac..e2f40ba 100644
> --- a/drivers/clk/mediatek/clk-mt8173.c
> +++ b/drivers/clk/mediatek/clk-mt8173.c
> @@ -700,6 +700,195 @@ static const struct mtk_composite peri_clks[]
> __initconst = { MUX(CLK_PERI_UART3_SEL, "uart3_ck_sel",
> uart_ck_sel_parents, 0x40c, 3, 1), };
> 
> +static struct mtk_gate_regs img_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_IMG(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &img_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr,			\
> +	}
> +
[...]
> +
> +static struct mtk_gate_regs venc_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_VENC(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &venc_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr_inv,		\
> +	}
> +
> +static struct mtk_gate venc_clks[] __initdata = {
> +	GATE_VENC(CLK_VENC_CKE0, "venc_cke0", "mm_sel", 0),
> +	GATE_VENC(CLK_VENC_CKE1, "venc_cke1", "venc_sel", 4),
> +	GATE_VENC(CLK_VENC_CKE2, "venc_cke2", "venc_sel", 8),
> +	GATE_VENC(CLK_VENC_CKE3, "venc_cke3", "venc_sel", 12),
> +};
> +
> +static struct mtk_gate_regs venclt_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};


The register for imagesys, vencsys and vencltsys have all the same offset.
We could use just one struct for all of them. 

Cheers,
Matthias

WARNING: multiple messages have this Message-ID (diff)
From: Matthias Brugger <matthias.bgg@gmail.com>
To: James Liao <jamesjj.liao@mediatek.com>
Cc: Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	srv_heupstream@mediatek.com,
	Eddie Huang <eddie.huang@mediatek.com>,
	Henry Chen <henryc.chen@mediatek.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>,
	Daniel Kurtz <djkurtz@chromium.org>,
	Ricky Liang <jcliang@chromium.org>,
	Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org
Subject: Re: [PATCH 4/5] clk: mediatek: Add subsystem clocks of MT8173
Date: Fri, 12 Jun 2015 19:09:02 +0200	[thread overview]
Message-ID: <5809360.66NP4oPW1R@ubix> (raw)
In-Reply-To: <1432192376-6712-5-git-send-email-jamesjj.liao@mediatek.com>

On Thursday, May 21, 2015 03:12:55 PM James Liao wrote:
> Most multimedia subsystem clocks will be accessed by multiple
> drivers, so it's a better way to manage these clocks in CCF.
> This patch adds clock support for MM, IMG, VDEC, VENC and VENC_LT
> subsystems.
> 
> Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
> ---
>  drivers/clk/mediatek/clk-mt8173.c      | 310
> +++++++++++++++++++++++++++++++++ include/dt-bindings/clock/mt8173-clk.h | 
> 87 +++++++++
>  2 files changed, 397 insertions(+)
> 
> diff --git a/drivers/clk/mediatek/clk-mt8173.c
> b/drivers/clk/mediatek/clk-mt8173.c index eb175ac..e2f40ba 100644
> --- a/drivers/clk/mediatek/clk-mt8173.c
> +++ b/drivers/clk/mediatek/clk-mt8173.c
> @@ -700,6 +700,195 @@ static const struct mtk_composite peri_clks[]
> __initconst = { MUX(CLK_PERI_UART3_SEL, "uart3_ck_sel",
> uart_ck_sel_parents, 0x40c, 3, 1), };
> 
> +static struct mtk_gate_regs img_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_IMG(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &img_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr,			\
> +	}
> +
[...]
> +
> +static struct mtk_gate_regs venc_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};
> +
> +#define GATE_VENC(_id, _name, _parent, _shift) {	\
> +		.id = _id,					\
> +		.name = _name,					\
> +		.parent_name = _parent,				\
> +		.regs = &venc_cg_regs,				\
> +		.shift = _shift,				\
> +		.ops = &mtk_clk_gate_ops_setclr_inv,		\
> +	}
> +
> +static struct mtk_gate venc_clks[] __initdata = {
> +	GATE_VENC(CLK_VENC_CKE0, "venc_cke0", "mm_sel", 0),
> +	GATE_VENC(CLK_VENC_CKE1, "venc_cke1", "venc_sel", 4),
> +	GATE_VENC(CLK_VENC_CKE2, "venc_cke2", "venc_sel", 8),
> +	GATE_VENC(CLK_VENC_CKE3, "venc_cke3", "venc_sel", 12),
> +};
> +
> +static struct mtk_gate_regs venclt_cg_regs = {
> +	.set_ofs = 0x0004,
> +	.clr_ofs = 0x0008,
> +	.sta_ofs = 0x0000,
> +};


The register for imagesys, vencsys and vencltsys have all the same offset.
We could use just one struct for all of them. 

Cheers,
Matthias

  parent reply	other threads:[~2015-06-12 17:09 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  7:12 [PATCH 0/5] Add Mediatek MT8173 subsystem clocks support James Liao
2015-05-21  7:12 ` James Liao
2015-05-21  7:12 ` James Liao
     [not found] ` <1432192376-6712-1-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-21  7:12   ` [PATCH 1/5] clk: mediatek: Fix apmixedsys clock registration James Liao
2015-05-21  7:12     ` James Liao
2015-05-21  7:12     ` James Liao
2015-05-26  7:42     ` Sascha Hauer
2015-05-26  7:42       ` Sascha Hauer
2015-06-04 21:07     ` Stephen Boyd
2015-06-04 21:07       ` Stephen Boyd
2015-05-21  7:12 ` [PATCH 2/5] clk: mediatek: mt8173: Fix enabling of critical clocks James Liao
2015-05-21  7:12   ` James Liao
2015-05-21  7:12   ` James Liao
2015-05-26  7:46   ` Sascha Hauer
2015-05-26  7:46     ` Sascha Hauer
     [not found]     ` <20150526074608.GE6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-26  8:36       ` James Liao
2015-05-26  8:36         ` James Liao
2015-05-26  8:36         ` James Liao
2015-05-21  7:12 ` [PATCH 3/5] dt-bindings: ARM: Mediatek: Document devicetree bindings for clock controllers James Liao
2015-05-21  7:12   ` James Liao
2015-05-21  7:12   ` James Liao
     [not found]   ` <1432192376-6712-4-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-26  7:56     ` Sascha Hauer
2015-05-26  7:56       ` Sascha Hauer
2015-05-26  7:56       ` Sascha Hauer
     [not found]       ` <20150526075643.GF6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-26  8:55         ` James Liao
2015-05-26  8:55           ` James Liao
2015-05-26  8:55           ` James Liao
2015-05-26 11:08           ` Sascha Hauer
2015-05-26 11:08             ` Sascha Hauer
2015-05-26 11:08             ` Sascha Hauer
2015-05-27  6:12             ` Yong Wu
2015-05-27  6:12               ` Yong Wu
2015-05-27  6:12               ` Yong Wu
2015-05-27  7:27               ` Sascha Hauer
2015-05-27  7:27                 ` Sascha Hauer
     [not found]                 ` <20150527072759.GS6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-28  5:14                   ` Yong Wu
2015-05-28  5:14                     ` Yong Wu
2015-05-28  5:14                     ` Yong Wu
2015-05-21  7:12 ` [PATCH 4/5] clk: mediatek: Add subsystem clocks of MT8173 James Liao
2015-05-21  7:12   ` James Liao
2015-05-21  7:12   ` James Liao
     [not found]   ` <1432192376-6712-5-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-22  4:22     ` Daniel Kurtz
2015-05-22  4:22       ` Daniel Kurtz
2015-05-22  4:22       ` Daniel Kurtz
2015-05-22  6:03       ` James Liao
2015-05-22  6:03         ` James Liao
2015-05-22  6:03         ` James Liao
2015-06-12 17:09     ` Matthias Brugger [this message]
2015-06-12 17:09       ` Matthias Brugger
2015-06-12 17:09       ` Matthias Brugger
2015-06-15  2:10       ` James Liao
2015-06-15  2:10         ` James Liao
2015-06-15  2:10         ` James Liao
2015-05-21  7:12 ` [PATCH 5/5] clk: mediatek: Add USB clock support in MT8173 APMIXEDSYS James Liao
2015-05-21  7:12   ` James Liao
2015-05-21  7:12   ` James Liao
     [not found]   ` <1432192376-6712-6-git-send-email-jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-05-26  8:05     ` Sascha Hauer
2015-05-26  8:05       ` Sascha Hauer
2015-05-26  8:05       ` Sascha Hauer
     [not found]       ` <20150526080516.GG6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-26  9:11         ` James Liao
2015-05-26  9:11           ` James Liao
2015-05-26  9:11           ` James Liao
2015-05-26  9:41           ` Sascha Hauer
2015-05-26  9:41             ` Sascha Hauer
2015-05-26  9:41             ` Sascha Hauer
     [not found]             ` <20150526094140.GH6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-26  9:58               ` James Liao
2015-05-26  9:58                 ` James Liao
2015-05-26  9:58                 ` James Liao
2015-05-28 13:24 ` [PATCH 0/5] Add Mediatek MT8173 subsystem clocks support Sascha Hauer
2015-05-28 13:24   ` Sascha Hauer
     [not found]   ` <20150528132452.GI26575-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-29  2:47     ` James Liao
2015-05-29  2:47       ` James Liao
2015-05-29  2:47       ` James Liao
2015-05-29  6:23       ` Sascha Hauer
2015-05-29  6:23         ` Sascha Hauer
2015-05-29  6:23         ` Sascha Hauer
     [not found]         ` <20150529062345.GY6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-06-04 21:02           ` Stephen Boyd
2015-06-04 21:02             ` Stephen Boyd
2015-06-04 21:02             ` Stephen Boyd
     [not found]             ` <20150604210212.GM676-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-06-05  1:45               ` James Liao
2015-06-05  1:45                 ` James Liao
2015-06-05  1:45                 ` James Liao
2015-06-06  0:59                 ` Stephen Boyd
2015-06-06  0:59                   ` Stephen Boyd
     [not found]                   ` <20150606005912.GC29237-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-06-08  7:27                     ` James Liao
2015-06-08  7:27                       ` James Liao
2015-06-08  7:27                       ` James Liao
2015-06-08  7:48                     ` Sascha Hauer
2015-06-08  7:48                       ` Sascha Hauer
2015-06-08  7:48                       ` Sascha Hauer
     [not found]                       ` <20150608074858.GK6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-06-11 23:52                         ` Stephen Boyd
2015-06-11 23:52                           ` Stephen Boyd
2015-06-11 23:52                           ` Stephen Boyd
     [not found]                           ` <20150611235212.GI29640-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2015-06-12 17:05                             ` Matthias Brugger
2015-06-12 17:05                               ` Matthias Brugger
2015-06-12 17:05                               ` Matthias Brugger

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=5809360.66NP4oPW1R@ubix \
    --to=matthias.bgg-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=djkurtz-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=eddie.huang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=henryc.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=jamesjj.liao-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=jcliang-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@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=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sboyd-sgV2jX0FEOL9JmXXK+q4OQ@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.