All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Verdun, Jean-Marie" <verdun@hpe.com>,
	Olof Johansson <olof@lixom.net>,
	"soc@kernel.org" <soc@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree
Date: Thu, 31 Mar 2022 21:09:38 +0000	[thread overview]
Message-ID: <PH0PR84MB17186189F5025374AA39584D88E19@PH0PR84MB1718.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAK8P3a1080yz9jggOrwz2iQ1sAB2Xe2Emh22uCuqRok60BQSiA@mail.gmail.com>



-----Original Message-----
From: Arnd Bergmann [mailto:arnd@arndb.de] 
Sent: Thursday, March 31, 2022 4:30 AM
To: Hawkins, Nick <nick.hawkins@hpe.com>
Cc: Arnd Bergmann <arnd@arndb.de>; Verdun, Jean-Marie <verdun@hpe.com>; Olof Johansson <olof@lixom.net>; soc@kernel.org; Rob Herring <robh+dt@kernel.org>; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree

On Thu, Mar 31, 2022 at 12:27 AM Hawkins, Nick <nick.hawkins@hpe.com> wrote:
> On Tue, Mar 29, 2022 at 9:38 PM Hawkins, Nick <nick.hawkins@hpe.com>> wrote:
>
> >> I am in the process of rewriting the timer driver for Linux but have hit a dilemma and I am looking for some direction. The registers that represent the watchdog timer, and timer all lay in the same register region and they are spread out to the point where there are other controls  in the same area.
> >
> >> For instance with our watchdog controls we have:
> >
> >> @90 the countdown value
> >> @96 the configuration
> >
> >> And for our timer we have:
> >> @80 the countdown value
> >> @94 the configuration
> >> @88 this is actually our timestamp register but is being included in with the timer driver currently to call clocksource_mmio_init.
> >
> >> What would be your recommendation for this? I was considering creating a gxp-clock that specifically points at the timestamp register but I still have the issue with gxp-timer and gxp-wdt being spread across the same area of registers.
>>
> > I think this is most commonly done using a 'syscon' node, have a 
> > look at the files listed by
>>
>> I found an example and copied it although I have a couple questions when it comes to actually coding it. Can that be here or should I post these questions in the patch that actually concern the file?
>>
>> st: timer@80 {
>>         compatible = "hpe,gxp-timer","syscon","simple-mfd";
>>         reg = <0x80 0x16>;
>>         interrupts = <0>;
>>         interrupt-parent = <&vic0>;
>>         clocks = <&ppuclk>;
>>         clock-names = "ppuclk";
>>         clock-frequency = <400000000>;
>>
>>         watchdog {
>>                 compatible = "hpe,gxp-wdt";
>>         };
>>  };

> I'd have to study the other examples myself to see what is most common.

> My feeling would be that it's better to either have a "hpe,gxp-timer" parent device with a watchdog child but no syscon, or to have a syscon/simple-mfd parent with both the timer and the watchdog as children.

Arnd, thanks for the feedback. I am trying to use the approach you recommend where you have a syscon/simple-mfd parent with watchdog and timer as children.

st: chip-controller@80 {
                                compatible = "hpe,gxp-ctrl-st","syscon","simple-mfd";
                                reg = <0x80 0x16>;

                                timer0: timer {
                                        compatible = "hpe,gxp-timer";
                                        interrupts = <0>;
                                        interrupt-parent = <&vic0>;
                                        clocks = <&ppuclk>;
                                        clock-names = "ppuclk";
                                };

                                watchdog {
                                        compatible = "hpe,gxp-wdt";
                                };
};

This compiles without any errors but I do have some questions about accessing the regmap in both drivers, specifically the timer code. How do you use a regmap with clocksource_mmio_init? I tried searching through the codebase and could not find the answer. I assume I am missing some vital step.

Thanks,

-Nick





WARNING: multiple messages have this Message-ID (diff)
From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Verdun, Jean-Marie" <verdun@hpe.com>,
	Olof Johansson <olof@lixom.net>,
	"soc@kernel.org" <soc@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree
Date: Thu, 31 Mar 2022 21:09:38 +0000	[thread overview]
Message-ID: <PH0PR84MB17186189F5025374AA39584D88E19@PH0PR84MB1718.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAK8P3a1080yz9jggOrwz2iQ1sAB2Xe2Emh22uCuqRok60BQSiA@mail.gmail.com>



-----Original Message-----
From: Arnd Bergmann [mailto:arnd@arndb.de] 
Sent: Thursday, March 31, 2022 4:30 AM
To: Hawkins, Nick <nick.hawkins@hpe.com>
Cc: Arnd Bergmann <arnd@arndb.de>; Verdun, Jean-Marie <verdun@hpe.com>; Olof Johansson <olof@lixom.net>; soc@kernel.org; Rob Herring <robh+dt@kernel.org>; linux-arm-kernel@lists.infradead.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree

On Thu, Mar 31, 2022 at 12:27 AM Hawkins, Nick <nick.hawkins@hpe.com> wrote:
> On Tue, Mar 29, 2022 at 9:38 PM Hawkins, Nick <nick.hawkins@hpe.com>> wrote:
>
> >> I am in the process of rewriting the timer driver for Linux but have hit a dilemma and I am looking for some direction. The registers that represent the watchdog timer, and timer all lay in the same register region and they are spread out to the point where there are other controls  in the same area.
> >
> >> For instance with our watchdog controls we have:
> >
> >> @90 the countdown value
> >> @96 the configuration
> >
> >> And for our timer we have:
> >> @80 the countdown value
> >> @94 the configuration
> >> @88 this is actually our timestamp register but is being included in with the timer driver currently to call clocksource_mmio_init.
> >
> >> What would be your recommendation for this? I was considering creating a gxp-clock that specifically points at the timestamp register but I still have the issue with gxp-timer and gxp-wdt being spread across the same area of registers.
>>
> > I think this is most commonly done using a 'syscon' node, have a 
> > look at the files listed by
>>
>> I found an example and copied it although I have a couple questions when it comes to actually coding it. Can that be here or should I post these questions in the patch that actually concern the file?
>>
>> st: timer@80 {
>>         compatible = "hpe,gxp-timer","syscon","simple-mfd";
>>         reg = <0x80 0x16>;
>>         interrupts = <0>;
>>         interrupt-parent = <&vic0>;
>>         clocks = <&ppuclk>;
>>         clock-names = "ppuclk";
>>         clock-frequency = <400000000>;
>>
>>         watchdog {
>>                 compatible = "hpe,gxp-wdt";
>>         };
>>  };

> I'd have to study the other examples myself to see what is most common.

> My feeling would be that it's better to either have a "hpe,gxp-timer" parent device with a watchdog child but no syscon, or to have a syscon/simple-mfd parent with both the timer and the watchdog as children.

Arnd, thanks for the feedback. I am trying to use the approach you recommend where you have a syscon/simple-mfd parent with watchdog and timer as children.

st: chip-controller@80 {
                                compatible = "hpe,gxp-ctrl-st","syscon","simple-mfd";
                                reg = <0x80 0x16>;

                                timer0: timer {
                                        compatible = "hpe,gxp-timer";
                                        interrupts = <0>;
                                        interrupt-parent = <&vic0>;
                                        clocks = <&ppuclk>;
                                        clock-names = "ppuclk";
                                };

                                watchdog {
                                        compatible = "hpe,gxp-wdt";
                                };
};

This compiles without any errors but I do have some questions about accessing the regmap in both drivers, specifically the timer code. How do you use a regmap with clocksource_mmio_init? I tried searching through the codebase and could not find the answer. I assume I am missing some vital step.

Thanks,

-Nick




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-03-31 21:09 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 19:52 [PATCH v3 01/10] arch: arm: mach-hpe: Introduce the HPE GXP architecture nick.hawkins
2022-03-10 19:52 ` nick.hawkins
2022-03-10 19:52 ` [PATCH v3 02/10] arch: arm: configs: multi_v7_defconfig nick.hawkins
2022-03-10 19:52   ` nick.hawkins
2022-03-10 19:52 ` [PATCH v3 03/10] drivers: wdt: Introduce HPE GXP SoC Watchdog nick.hawkins
2022-04-04 14:28   ` Guenter Roeck
2022-04-04 16:25     ` Hawkins, Nick
2022-04-04 16:41       ` Guenter Roeck
2022-03-10 19:52 ` [PATCH v3 04/10] clocksource/drivers: Add HPE GXP timer nick.hawkins
2022-04-06 11:13   ` Daniel Lezcano
2022-04-06 22:02     ` Hawkins, Nick
2022-03-10 19:52 ` [PATCH v3 05/10] dt-bindings: timer: Add HPE GXP Timer Binding nick.hawkins
2022-03-11  9:32   ` Krzysztof Kozlowski
2022-03-11 15:40   ` Rob Herring
2022-03-11 16:22     ` Hawkins, Nick
2022-03-11 17:13       ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 06/10] dt-bindings: watchdog: Add HPE GXP Watchdog timer binding nick.hawkins
2022-03-11  9:34   ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 07/10] dt-bindings: arm: Add HPE GXP Binding nick.hawkins
2022-03-11 10:20   ` Krzysztof Kozlowski
2022-03-10 19:52 ` [PATCH v3 08/10] dt-bindings: arm: Add HPE GXP CPU Init nick.hawkins
2022-03-11 10:22   ` Krzysztof Kozlowski
2022-03-16 21:33     ` Hawkins, Nick
2022-03-10 19:52 ` [PATCH v3 09/10] arch: arm: boot: dts: Introduce HPE GXP Device tree nick.hawkins
2022-03-10 19:52   ` nick.hawkins
2022-03-11  8:17   ` Arnd Bergmann
2022-03-11  8:17     ` Arnd Bergmann
2022-03-11 10:29   ` Krzysztof Kozlowski
2022-03-11 10:29     ` Krzysztof Kozlowski
2022-03-16 15:41     ` Hawkins, Nick
2022-03-16 15:41       ` Hawkins, Nick
2022-03-16 15:50       ` Krzysztof Kozlowski
2022-03-16 15:50         ` Krzysztof Kozlowski
2022-03-16 20:10         ` Hawkins, Nick
2022-03-16 20:10           ` Hawkins, Nick
2022-03-17  8:36           ` Krzysztof Kozlowski
2022-03-17  8:36             ` Krzysztof Kozlowski
2022-03-29 19:38             ` Hawkins, Nick
2022-03-29 19:38               ` Hawkins, Nick
2022-03-29 21:13               ` Arnd Bergmann
2022-03-29 21:13                 ` Arnd Bergmann
2022-03-29 21:45                 ` Hawkins, Nick
2022-03-29 21:45                   ` Hawkins, Nick
2022-03-30 22:27                   ` Hawkins, Nick
2022-03-30 22:27                     ` Hawkins, Nick
2022-03-31  9:30                     ` Arnd Bergmann
2022-03-31  9:30                       ` Arnd Bergmann
2022-03-31 21:09                       ` Hawkins, Nick [this message]
2022-03-31 21:09                         ` Hawkins, Nick
2022-03-31 21:52                         ` Arnd Bergmann
2022-03-31 21:52                           ` Arnd Bergmann
2022-04-01 16:05                           ` Hawkins, Nick
2022-04-01 16:05                             ` Hawkins, Nick
2022-04-01 16:30                             ` Arnd Bergmann
2022-04-01 16:30                               ` Arnd Bergmann
2022-04-04 20:22                               ` Hawkins, Nick
2022-04-04 20:22                                 ` Hawkins, Nick
2022-04-04 22:02                                 ` Arnd Bergmann
2022-04-04 22:02                                   ` Arnd Bergmann
2022-04-05 21:21                                   ` Hawkins, Nick
2022-04-05 21:21                                     ` Hawkins, Nick
2022-04-06  7:24                                     ` Arnd Bergmann
2022-04-06  7:24                                       ` Arnd Bergmann
2022-04-13 16:48                                       ` Hawkins, Nick
2022-04-13 16:48                                         ` Hawkins, Nick
2022-04-13 17:42                                         ` Arnd Bergmann
2022-04-13 17:42                                           ` Arnd Bergmann
2022-03-10 19:52 ` [PATCH v3 10/10] maintainers: Introduce HPE GXP Architecture nick.hawkins
2022-03-11 10:33   ` Joe Perches
2022-03-11  7:21 ` [PATCH v3 01/10] arch: arm: mach-hpe: Introduce the HPE GXP architecture kernel test robot
2022-03-11  7:21   ` kernel test robot
2022-03-11  8:06 ` Arnd Bergmann
2022-03-11  8:06   ` Arnd Bergmann
2022-03-11 12:40 ` kernel test robot
2022-03-11 12:40   ` kernel test robot
2022-03-12 13:27 ` kernel test robot
2022-03-12 13:27   ` kernel test robot
2022-03-12 15:14   ` Arnd Bergmann
2022-03-12 15:14     ` Arnd Bergmann
2022-03-12 15:14     ` Arnd Bergmann

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=PH0PR84MB17186189F5025374AA39584D88E19@PH0PR84MB1718.NAMPRD84.PROD.OUTLOOK.COM \
    --to=nick.hawkins@hpe.com \
    --cc=arnd@arndb.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olof@lixom.net \
    --cc=robh+dt@kernel.org \
    --cc=soc@kernel.org \
    --cc=verdun@hpe.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.