From: hdegoede@redhat.com (Hans de Goede)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] Re: [PATCH 5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI
Date: Tue, 27 Oct 2015 09:12:17 +0100 [thread overview]
Message-ID: <562F31E1.9070203@redhat.com> (raw)
In-Reply-To: <20151026210623.GB10947@lukather>
Hi,
On 26-10-15 22:06, Maxime Ripard wrote:
> On Sat, Oct 24, 2015 at 10:47:49AM +0200, Jean-Francois Moine wrote:
>> On Sat, 24 Oct 2015 09:13:28 +0200
>> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>>
>>> Or simply
>>>
>>> bus_gates {
>>> clocks = <&ahb1>, <&ahb2>;
>>> clock-indices = <5>, <6>, <8>, ...
>>> clock-output-names = "bus_ce", "bus_dma", "bus_mmc0"
>>> };
>>
>> I don't understand: the apb1, apb2, ahb1 and ahb2 clocks may be
>> programmed independently to different frequencies
>
> I don't understand why you're talking about frequencies here.
>
>> and you have to know which of them is the parent of each leaf clock.
>
> Indeed, but that's also doable here. Just not in the DT.
>
>> So, either you hard-code the parents as Jens did in a first proposal,
>> or you define the full list of parents in the DT as in the last
>> proposal, or you use a container per parent in the DT as I proposed.
>>
>> There could be an other solution using the output clock name to define
>> the parent clock:
>>
>> bus_gates {
>> clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
>> clock-indices = <5>, <6>, <8>, ...
>> clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0"
>> };
>>
>> with the documentation:
>>
>> "the clocks MUST be defined in order: ahb1, ahb2, apb1, apb2."
>>
>> and the code
>>
>> if (strncmp(clock_name, "ahb1", 4) == 0)
>> clk_parent = of_clk_get_parent_name(node, 0);
>> else if (..)
>>
>> but it seems a bit hacky.
>
> It's exactly what I suggested, without the string comparison, but
> relying on the ID instead.
I'm not following you here, what do you mean with "the ID" ?
Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Jean-Francois Moine <moinejf-GANU6spQydw@public.gmane.org>
Cc: "Jens Kuske" <jenskuske-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Vishnu Patekar"
<vishnupatekar0510-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Emilio López" <emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>,
"Michael Turquette"
<mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Chen-Yu Tsai" <wens-jdAy2FN1RRM@public.gmane.org>,
"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Philipp Zabel" <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"Linus Walleij"
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: Re: [PATCH 5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI
Date: Tue, 27 Oct 2015 09:12:17 +0100 [thread overview]
Message-ID: <562F31E1.9070203@redhat.com> (raw)
In-Reply-To: <20151026210623.GB10947@lukather>
Hi,
On 26-10-15 22:06, Maxime Ripard wrote:
> On Sat, Oct 24, 2015 at 10:47:49AM +0200, Jean-Francois Moine wrote:
>> On Sat, 24 Oct 2015 09:13:28 +0200
>> Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
>>
>>> Or simply
>>>
>>> bus_gates {
>>> clocks = <&ahb1>, <&ahb2>;
>>> clock-indices = <5>, <6>, <8>, ...
>>> clock-output-names = "bus_ce", "bus_dma", "bus_mmc0"
>>> };
>>
>> I don't understand: the apb1, apb2, ahb1 and ahb2 clocks may be
>> programmed independently to different frequencies
>
> I don't understand why you're talking about frequencies here.
>
>> and you have to know which of them is the parent of each leaf clock.
>
> Indeed, but that's also doable here. Just not in the DT.
>
>> So, either you hard-code the parents as Jens did in a first proposal,
>> or you define the full list of parents in the DT as in the last
>> proposal, or you use a container per parent in the DT as I proposed.
>>
>> There could be an other solution using the output clock name to define
>> the parent clock:
>>
>> bus_gates {
>> clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
>> clock-indices = <5>, <6>, <8>, ...
>> clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0"
>> };
>>
>> with the documentation:
>>
>> "the clocks MUST be defined in order: ahb1, ahb2, apb1, apb2."
>>
>> and the code
>>
>> if (strncmp(clock_name, "ahb1", 4) == 0)
>> clk_parent = of_clk_get_parent_name(node, 0);
>> else if (..)
>>
>> but it seems a bit hacky.
>
> It's exactly what I suggested, without the string comparison, but
> relying on the ID instead.
I'm not following you here, what do you mean with "the ID" ?
Regards,
Hans
WARNING: multiple messages have this Message-ID (diff)
From: Hans de Goede <hdegoede@redhat.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>,
Jean-Francois Moine <moinejf@free.fr>
Cc: "Jens Kuske" <jenskuske@gmail.com>,
devicetree@vger.kernel.org,
"Vishnu Patekar" <vishnupatekar0510@gmail.com>,
"Emilio López" <emilio@elopez.com.ar>,
"Michael Turquette" <mturquette@baylibre.com>,
linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org,
"Chen-Yu Tsai" <wens@csie.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Linus Walleij" <linus.walleij@linaro.org>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [linux-sunxi] Re: [PATCH 5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI
Date: Tue, 27 Oct 2015 09:12:17 +0100 [thread overview]
Message-ID: <562F31E1.9070203@redhat.com> (raw)
In-Reply-To: <20151026210623.GB10947@lukather>
Hi,
On 26-10-15 22:06, Maxime Ripard wrote:
> On Sat, Oct 24, 2015 at 10:47:49AM +0200, Jean-Francois Moine wrote:
>> On Sat, 24 Oct 2015 09:13:28 +0200
>> Maxime Ripard <maxime.ripard@free-electrons.com> wrote:
>>
>>> Or simply
>>>
>>> bus_gates {
>>> clocks = <&ahb1>, <&ahb2>;
>>> clock-indices = <5>, <6>, <8>, ...
>>> clock-output-names = "bus_ce", "bus_dma", "bus_mmc0"
>>> };
>>
>> I don't understand: the apb1, apb2, ahb1 and ahb2 clocks may be
>> programmed independently to different frequencies
>
> I don't understand why you're talking about frequencies here.
>
>> and you have to know which of them is the parent of each leaf clock.
>
> Indeed, but that's also doable here. Just not in the DT.
>
>> So, either you hard-code the parents as Jens did in a first proposal,
>> or you define the full list of parents in the DT as in the last
>> proposal, or you use a container per parent in the DT as I proposed.
>>
>> There could be an other solution using the output clock name to define
>> the parent clock:
>>
>> bus_gates {
>> clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
>> clock-indices = <5>, <6>, <8>, ...
>> clock-output-names = "ahb1_ce", "ahb1_dma", "ahb1_mmc0"
>> };
>>
>> with the documentation:
>>
>> "the clocks MUST be defined in order: ahb1, ahb2, apb1, apb2."
>>
>> and the code
>>
>> if (strncmp(clock_name, "ahb1", 4) == 0)
>> clk_parent = of_clk_get_parent_name(node, 0);
>> else if (..)
>>
>> but it seems a bit hacky.
>
> It's exactly what I suggested, without the string comparison, but
> relying on the ID instead.
I'm not following you here, what do you mean with "the ID" ?
Regards,
Hans
next prev parent reply other threads:[~2015-10-27 8:12 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 16:20 [PATCH 4/6] reset: sunxi: Add compatible for Allwinner H3 bus resets Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-21 16:20 ` [PATCH 5/6] ARM: dts: sunxi: Add Allwinner H3 DTSI Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-22 8:05 ` Maxime Ripard
2015-10-22 8:05 ` Maxime Ripard
2015-10-22 8:05 ` Maxime Ripard
2015-10-22 8:29 ` Jean-Francois Moine
2015-10-22 8:29 ` Jean-Francois Moine
2015-10-22 8:29 ` Jean-Francois Moine
2015-10-22 8:47 ` Maxime Ripard
2015-10-22 8:47 ` Maxime Ripard
2015-10-22 8:47 ` Maxime Ripard
2015-10-22 8:57 ` Jean-Francois Moine
2015-10-22 8:57 ` Jean-Francois Moine
2015-10-22 8:57 ` Jean-Francois Moine
2015-10-22 9:14 ` Maxime Ripard
2015-10-22 9:14 ` Maxime Ripard
2015-10-22 9:14 ` Maxime Ripard
2015-10-22 11:30 ` Jens Kuske
2015-10-22 11:30 ` Jens Kuske
2015-10-22 11:30 ` Jens Kuske
2015-10-23 18:09 ` Maxime Ripard
2015-10-23 18:09 ` Maxime Ripard
2015-10-23 18:09 ` Maxime Ripard
2015-10-22 17:30 ` Jean-Francois Moine
2015-10-22 17:30 ` Jean-Francois Moine
2015-10-22 17:30 ` Jean-Francois Moine
2015-10-23 18:14 ` Maxime Ripard
2015-10-23 18:14 ` Maxime Ripard
2015-10-23 18:14 ` Maxime Ripard
2015-10-23 19:20 ` Jean-Francois Moine
2015-10-23 19:20 ` Jean-Francois Moine
2015-10-23 19:20 ` Jean-Francois Moine
2015-10-24 7:13 ` Maxime Ripard
2015-10-24 7:13 ` Maxime Ripard
2015-10-24 7:13 ` Maxime Ripard
2015-10-24 8:47 ` Jean-Francois Moine
2015-10-24 8:47 ` Jean-Francois Moine
2015-10-24 8:47 ` Jean-Francois Moine
2015-10-26 21:06 ` Maxime Ripard
2015-10-26 21:06 ` Maxime Ripard
2015-10-26 21:06 ` Maxime Ripard
2015-10-27 8:12 ` Hans de Goede [this message]
2015-10-27 8:12 ` [linux-sunxi] " Hans de Goede
2015-10-27 8:12 ` Hans de Goede
2015-10-24 8:39 ` [linux-sunxi] " Hans de Goede
2015-10-24 8:39 ` Hans de Goede
2015-10-24 8:39 ` Hans de Goede
2015-10-26 21:00 ` [linux-sunxi] " Maxime Ripard
2015-10-26 21:00 ` Maxime Ripard
2015-10-26 21:00 ` Maxime Ripard
2015-10-21 16:20 ` [PATCH 6/6] ARM: dts: sun8i: Add Orange Pi Plus support Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-21 16:20 ` Jens Kuske
2015-10-22 7:58 ` [PATCH 4/6] reset: sunxi: Add compatible for Allwinner H3 bus resets Maxime Ripard
2015-10-22 7:58 ` Maxime Ripard
2015-10-22 7:58 ` Maxime Ripard
2015-10-27 16:54 ` Jens Kuske
2015-10-27 16:54 ` Jens Kuske
2015-10-27 16:54 ` Jens Kuske
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=562F31E1.9070203@redhat.com \
--to=hdegoede@redhat.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 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.