From: Yong Wu <yong.wu@mediatek.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: James Liao <jamesjj.liao@mediatek.com>,
devicetree@vger.kernel.org,
Mike Turquette <mturquette@linaro.org>,
srv_heupstream@mediatek.com, Stephen Boyd <sboyd@codeaurora.org>,
linux-kernel@vger.kernel.org,
Henry Chen <henryc.chen@mediatek.com>,
Ricky Liang <jcliang@chromium.org>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org,
Sascha Hauer <kernel@pengutronix.de>,
Matthias Brugger <matthias.bgg@gmail.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 3/5] dt-bindings: ARM: Mediatek: Document devicetree bindings for clock controllers
Date: Wed, 27 May 2015 14:12:49 +0800 [thread overview]
Message-ID: <1432707169.721.81.camel@mhfsdcap03> (raw)
In-Reply-To: <20150526110819.GI6325@pengutronix.de>
On Tue, 2015-05-26 at 13:08 +0200, Sascha Hauer wrote:
> On Tue, May 26, 2015 at 04:55:36PM +0800, James Liao wrote:
> > Hi Sascha,
> >
> > On Tue, 2015-05-26 at 09:56 +0200, Sascha Hauer wrote:
> > > On Thu, May 21, 2015 at 03:12:54PM +0800, James Liao wrote:
> > > > This adds the binding documentation for the mmsys, imgsys, vdecsys,
> > > > vencsys and vencltsys controllers found on Mediatek SoCs.
> > > >
> > > > index 0000000..a5b94a7
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
> > >
> > > Do these really become multiple drivers so that it's worth abstracting
> > > them in the clock framework?
> >
> > These clocks need to be controlled among several drivers. For example,
> > vdecsys clocks will be controlled by VDEC driver (not ready yet) and
> > MT8173 SMI driver [1]. That means these clocks need a mechanism to share
> > between these 2 drivers. CCF share clocks by using of reference count,
> > so I think it's suitable to implement these subsystem clocks.
> >
> > As I know SMI driver need to access clocks among mmsys, imgsys, vdecsys,
> > vencsys and vencltsys. So in this patch I added clocks of these
> > subsystems into CCF.
> >
> > [1]
> > http://lists.infradead.org/pipermail/linux-mediatek/2015-March/000058.html
>
> Looking at the 3.18 tree we have this:
>
> vdecsys: vdecsys@16000000 {
> compatible = "mediatek,mt8173-vdecsys", "syscon";
> reg = <0 0x16000000 0 0x1000>;
> #clock-cells = <1>;
> };
>
> larb1:larb@16010000 {
> compatible = "mediatek,mt8173-smi-larb";
> reg = <0 0x16010000 0 0x1000>;
> clocks = <&mmsys MM_SMI_COMMON>,
> <&vdecsys VDEC_CKEN>,
> <&vdecsys VDEC_LARB_CKEN>;
> clock-names = "larb_sub0", "larb_sub1", "larb_sub2";
> };
>
> I believe that the larb needs the MM_SMI_COMMON clock to modify the larb
> registers, but is it really necessary to enable VDEC_CKEN and
> VDEC_LARB_CKEN just to set the F_SMI_MMU_EN bit in the larb?
Yes. SMI need the two clock while smi work.
the lastest smi binding is [1].
smi need "apb" and "smi" clocks.
[1]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013025.html
>
> With the above we have the situation that the vdec driver calls into the
> iommu driver which then calls into the larb driver which calls back into
> the vdec driver via the clk API. This seems very suspicious.
iommu driver will call into the larb driver.
but I don't think the larb driver will call into the vdec driver. is it
right?
At the end of the latest smi driver[2].
smi has provide two interface. the multimedia HW could call it to enable
smi clock, then they can delete some node like <&vdecsys VDEC_CKEN>. in
their dtsi.
//=====
+int mtk_smi_larb_get(struct device *plarbdev);
+void mtk_smi_larb_put(struct device *plarbdev);
//=====
SMI only help control the smi relational clockes.
The other clocks of multimedia module also should control theirself.
[2]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013030.html
>
> Sascha
>
WARNING: multiple messages have this Message-ID (diff)
From: yong.wu@mediatek.com (Yong Wu)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] dt-bindings: ARM: Mediatek: Document devicetree bindings for clock controllers
Date: Wed, 27 May 2015 14:12:49 +0800 [thread overview]
Message-ID: <1432707169.721.81.camel@mhfsdcap03> (raw)
In-Reply-To: <20150526110819.GI6325@pengutronix.de>
On Tue, 2015-05-26 at 13:08 +0200, Sascha Hauer wrote:
> On Tue, May 26, 2015 at 04:55:36PM +0800, James Liao wrote:
> > Hi Sascha,
> >
> > On Tue, 2015-05-26 at 09:56 +0200, Sascha Hauer wrote:
> > > On Thu, May 21, 2015 at 03:12:54PM +0800, James Liao wrote:
> > > > This adds the binding documentation for the mmsys, imgsys, vdecsys,
> > > > vencsys and vencltsys controllers found on Mediatek SoCs.
> > > >
> > > > index 0000000..a5b94a7
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
> > >
> > > Do these really become multiple drivers so that it's worth abstracting
> > > them in the clock framework?
> >
> > These clocks need to be controlled among several drivers. For example,
> > vdecsys clocks will be controlled by VDEC driver (not ready yet) and
> > MT8173 SMI driver [1]. That means these clocks need a mechanism to share
> > between these 2 drivers. CCF share clocks by using of reference count,
> > so I think it's suitable to implement these subsystem clocks.
> >
> > As I know SMI driver need to access clocks among mmsys, imgsys, vdecsys,
> > vencsys and vencltsys. So in this patch I added clocks of these
> > subsystems into CCF.
> >
> > [1]
> > http://lists.infradead.org/pipermail/linux-mediatek/2015-March/000058.html
>
> Looking at the 3.18 tree we have this:
>
> vdecsys: vdecsys at 16000000 {
> compatible = "mediatek,mt8173-vdecsys", "syscon";
> reg = <0 0x16000000 0 0x1000>;
> #clock-cells = <1>;
> };
>
> larb1:larb at 16010000 {
> compatible = "mediatek,mt8173-smi-larb";
> reg = <0 0x16010000 0 0x1000>;
> clocks = <&mmsys MM_SMI_COMMON>,
> <&vdecsys VDEC_CKEN>,
> <&vdecsys VDEC_LARB_CKEN>;
> clock-names = "larb_sub0", "larb_sub1", "larb_sub2";
> };
>
> I believe that the larb needs the MM_SMI_COMMON clock to modify the larb
> registers, but is it really necessary to enable VDEC_CKEN and
> VDEC_LARB_CKEN just to set the F_SMI_MMU_EN bit in the larb?
Yes. SMI need the two clock while smi work.
the lastest smi binding is [1].
smi need "apb" and "smi" clocks.
[1]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013025.html
>
> With the above we have the situation that the vdec driver calls into the
> iommu driver which then calls into the larb driver which calls back into
> the vdec driver via the clk API. This seems very suspicious.
iommu driver will call into the larb driver.
but I don't think the larb driver will call into the vdec driver. is it
right?
At the end of the latest smi driver[2].
smi has provide two interface. the multimedia HW could call it to enable
smi clock, then they can delete some node like <&vdecsys VDEC_CKEN>. in
their dtsi.
//=====
+int mtk_smi_larb_get(struct device *plarbdev);
+void mtk_smi_larb_put(struct device *plarbdev);
//=====
SMI only help control the smi relational clockes.
The other clocks of multimedia module also should control theirself.
[2]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013030.html
>
> Sascha
>
WARNING: multiple messages have this Message-ID (diff)
From: Yong Wu <yong.wu@mediatek.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: James Liao <jamesjj.liao@mediatek.com>,
<devicetree@vger.kernel.org>,
"Mike Turquette" <mturquette@linaro.org>,
<srv_heupstream@mediatek.com>,
"Stephen Boyd" <sboyd@codeaurora.org>,
<linux-kernel@vger.kernel.org>,
Henry Chen <henryc.chen@mediatek.com>,
Ricky Liang <jcliang@chromium.org>,
Rob Herring <robh+dt@kernel.org>,
<linux-mediatek@lists.infradead.org>,
Sascha Hauer <kernel@pengutronix.de>,
Matthias Brugger <matthias.bgg@gmail.com>,
Yingjoe Chen <yingjoe.chen@mediatek.com>,
Eddie Huang <eddie.huang@mediatek.com>,
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 3/5] dt-bindings: ARM: Mediatek: Document devicetree bindings for clock controllers
Date: Wed, 27 May 2015 14:12:49 +0800 [thread overview]
Message-ID: <1432707169.721.81.camel@mhfsdcap03> (raw)
In-Reply-To: <20150526110819.GI6325@pengutronix.de>
On Tue, 2015-05-26 at 13:08 +0200, Sascha Hauer wrote:
> On Tue, May 26, 2015 at 04:55:36PM +0800, James Liao wrote:
> > Hi Sascha,
> >
> > On Tue, 2015-05-26 at 09:56 +0200, Sascha Hauer wrote:
> > > On Thu, May 21, 2015 at 03:12:54PM +0800, James Liao wrote:
> > > > This adds the binding documentation for the mmsys, imgsys, vdecsys,
> > > > vencsys and vencltsys controllers found on Mediatek SoCs.
> > > >
> > > > index 0000000..a5b94a7
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vdecsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencltsys.txt
> > > > +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,vencsys.txt
> > >
> > > Do these really become multiple drivers so that it's worth abstracting
> > > them in the clock framework?
> >
> > These clocks need to be controlled among several drivers. For example,
> > vdecsys clocks will be controlled by VDEC driver (not ready yet) and
> > MT8173 SMI driver [1]. That means these clocks need a mechanism to share
> > between these 2 drivers. CCF share clocks by using of reference count,
> > so I think it's suitable to implement these subsystem clocks.
> >
> > As I know SMI driver need to access clocks among mmsys, imgsys, vdecsys,
> > vencsys and vencltsys. So in this patch I added clocks of these
> > subsystems into CCF.
> >
> > [1]
> > http://lists.infradead.org/pipermail/linux-mediatek/2015-March/000058.html
>
> Looking at the 3.18 tree we have this:
>
> vdecsys: vdecsys@16000000 {
> compatible = "mediatek,mt8173-vdecsys", "syscon";
> reg = <0 0x16000000 0 0x1000>;
> #clock-cells = <1>;
> };
>
> larb1:larb@16010000 {
> compatible = "mediatek,mt8173-smi-larb";
> reg = <0 0x16010000 0 0x1000>;
> clocks = <&mmsys MM_SMI_COMMON>,
> <&vdecsys VDEC_CKEN>,
> <&vdecsys VDEC_LARB_CKEN>;
> clock-names = "larb_sub0", "larb_sub1", "larb_sub2";
> };
>
> I believe that the larb needs the MM_SMI_COMMON clock to modify the larb
> registers, but is it really necessary to enable VDEC_CKEN and
> VDEC_LARB_CKEN just to set the F_SMI_MMU_EN bit in the larb?
Yes. SMI need the two clock while smi work.
the lastest smi binding is [1].
smi need "apb" and "smi" clocks.
[1]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013025.html
>
> With the above we have the situation that the vdec driver calls into the
> iommu driver which then calls into the larb driver which calls back into
> the vdec driver via the clk API. This seems very suspicious.
iommu driver will call into the larb driver.
but I don't think the larb driver will call into the vdec driver. is it
right?
At the end of the latest smi driver[2].
smi has provide two interface. the multimedia HW could call it to enable
smi clock, then they can delete some node like <&vdecsys VDEC_CKEN>. in
their dtsi.
//=====
+int mtk_smi_larb_get(struct device *plarbdev);
+void mtk_smi_larb_put(struct device *plarbdev);
//=====
SMI only help control the smi relational clockes.
The other clocks of multimedia module also should control theirself.
[2]http://lists.linuxfoundation.org/pipermail/iommu/2015-May/013030.html
>
> Sascha
>
next prev parent reply other threads:[~2015-05-27 6:12 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 [this message]
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
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=1432707169.721.81.camel@mhfsdcap03 \
--to=yong.wu@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=eddie.huang@mediatek.com \
--cc=henryc.chen@mediatek.com \
--cc=jamesjj.liao@mediatek.com \
--cc=jcliang@chromium.org \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=mturquette@linaro.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@codeaurora.org \
--cc=srv_heupstream@mediatek.com \
--cc=yingjoe.chen@mediatek.com \
/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.