From: "Rafał Miłecki" <zajec5@gmail.com>
To: Sebastian Reichel <sebastian.reichel@collabora.com>
Cc: "Rob Herring" <robh+dt@kernel.org>,
"open list:THERMAL" <linux-pm@vger.kernel.org>,
devicetree@vger.kernel.org, "Lee Jones" <lee.jones@linaro.org>,
"Wim Van Sebroeck" <wim@linux-watchdog.org>,
"Guenter Roeck" <linux@roeck-us.net>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"maintainer:BROADCOM BCM7XXX ARM ARCHITECTURE"
<bcm-kernel-feedback-list@broadcom.com>,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: Re: [PATCH RFC 0/3] reset: syscon-reboot: add "reg" property support
Date: Thu, 2 Dec 2021 18:23:19 +0100 [thread overview]
Message-ID: <b95213ca-2597-fd27-7e0c-50250e645d48@gmail.com> (raw)
In-Reply-To: <20211202172143.44bwtgiiagczfqlr@earth.universe>
Hi,
On 02.12.2021 18:21, Sebastian Reichel wrote:
> On Fri, Nov 12, 2021 at 04:32:48PM -0600, Rob Herring wrote:
>> On Fri, Nov 12, 2021 at 4:23 PM Rafał Miłecki <zajec5@gmail.com> wrote:
>>>
>>> On 12.11.2021 23:18, Rob Herring wrote:
>>>> On Tue, Nov 2, 2021 at 10:22 AM Rafał Miłecki <zajec5@gmail.com> wrote:
>>>>>
>>>>> From: Rafał Miłecki <rafal@milecki.pl>
>>>>>
>>>>> During my work on MFD binding for Broadcom's TWD block I received
>>>>> comment from Rob saying that "syscon-reboot" should use "reg" property.
>>>>> I'm not sure if my understanding & implementation are correct so I'm
>>>>> sending this RFC.
>>>>>
>>>>> What bothers me is non-standard "reg" property usage. Treating it as a
>>>>> simple (unsigned) integer number means different logic when it comes to
>>>>> ranges.
>>>>
>>>> It shouldn't be. The idea is that 'reg' works like normal. See below.
>>>>
>>>>> Consider this example:
>>>>>
>>>>> timer@400 {
>>>>> compatible = "simple-mfd", "syscon";
>>>>> reg = <0x400 0x3c>;
>>>>> ranges;
>>>>
>>>> ranges = <0 0x400 0x100>; // Just guessing for size
>>>>
>>>>>
>>>>> #address-cells = <1>;
>>>>> #size-cells = <1>;
>>>>>
>>>>> reboot@434 {
>>>>
>>>> reboot@34
>>>>
>>>> Just reading 'reg' is fine, but really, Linux should be either getting
>>>> the translated address or have a function to get the offset from the
>>>> parent base. IOW, it should also work if you just changed 'reg' to
>>>> '<0x434 0x4>'.
>>>
>>> Are you aware of anyone working on support for getting translated
>>> address? Do you recall any efforts on implementing such a helper?
>>
>> All the DT address functions give you translated addresses. It's the
>> latter that doesn't exist that I'm aware of offhand. It's just
>> of_address_to_resource() on the child and parent nodes and then
>> calculate the offset.
>
> Has a new version beent sent with this change, that I missed?
Not yet, I was sidetracked by pinctrl & OpenWrt stuff.
prev parent reply other threads:[~2021-12-02 17:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-02 15:22 [PATCH RFC 0/3] reset: syscon-reboot: add "reg" property support Rafał Miłecki
2021-11-02 15:22 ` [PATCH RFC 1/3] dt-bindings: power: reset: syscon-reboot: use non-deprecated example Rafał Miłecki
2021-11-12 19:33 ` Rob Herring
2021-11-02 15:22 ` [PATCH RFC 2/3] dt-bindings: power: reset: syscon-reboot: add "reg" property Rafał Miłecki
2021-11-12 19:34 ` Rob Herring
2021-11-02 15:22 ` [PATCH RFC 3/3] power: reset: syscon-reboot: support " Rafał Miłecki
2021-11-02 15:26 ` [PATCH RFC 0/3] reset: syscon-reboot: add "reg" property support Rafał Miłecki
2021-11-12 22:18 ` Rob Herring
2021-11-12 22:23 ` Rafał Miłecki
2021-11-12 22:32 ` Rob Herring
2021-12-02 17:21 ` Sebastian Reichel
2021-12-02 17:23 ` Rafał Miłecki [this message]
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=b95213ca-2597-fd27-7e0c-50250e645d48@gmail.com \
--to=zajec5@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=devicetree@vger.kernel.org \
--cc=f.fainelli@gmail.com \
--cc=lee.jones@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=rafal@milecki.pl \
--cc=robh+dt@kernel.org \
--cc=sebastian.reichel@collabora.com \
--cc=wim@linux-watchdog.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).