lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 1 Jul 2024 02:15:05 +0000
From: Chris Packham <Chris.Packham@...iedtelesis.co.nz>
To: Sander Vanheule <sander@...nheule.net>, "tglx@...utronix.de"
	<tglx@...utronix.de>, "robh@...nel.org" <robh@...nel.org>,
	"krzk+dt@...nel.org" <krzk+dt@...nel.org>, "conor+dt@...nel.org"
	<conor+dt@...nel.org>, "tsbogend@...ha.franken.de"
	<tsbogend@...ha.franken.de>, "daniel.lezcano@...aro.org"
	<daniel.lezcano@...aro.org>, "paulburton@...nel.org" <paulburton@...nel.org>,
	"peterz@...radead.org" <peterz@...radead.org>, "mail@...ger-koblitz.de"
	<mail@...ger-koblitz.de>, "bert@...t.com" <bert@...t.com>, "john@...ozen.org"
	<john@...ozen.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"linux-mips@...r.kernel.org" <linux-mips@...r.kernel.org>, "kabel@...nel.org"
	<kabel@...nel.org>, "ericwouds@...il.com" <ericwouds@...il.com>
Subject: Re: [PATCH v3 5/9] dt-bindings: timer: Add schema for
 realtek,otto-timer


On 30/06/24 08:40, Sander Vanheule wrote:
> Hi Chris,
>
> Thanks for submitting these patches!
>
> On Thu, 2024-06-27 at 16:33 +1200, Chris Packham wrote:
>> Add the devicetree schema for the realtek,otto-timer present on a number
>> of Realtek SoCs.
>>
>> Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
>> ---
> [...]
>
>> +
>> +  reg:
>> +    items:
>> +      - description: timer0 registers
>> +      - description: timer1 registers
>> +      - description: timer2 registers
>> +      - description: timer3 registers
>> +      - description: timer4 registers
>> +
>> +  clocks:
>> +    maxItems: 1
>> +
>> +  interrupts:
>> +    items:
>> +      - description: timer0 interrupt
>> +      - description: timer1 interrupt
>> +      - description: timer2 interrupt
>> +      - description: timer3 interrupt
>> +      - description: timer4 interrupt
> Instead of providing a (SoC dependent) number of reg and interrupt items, can't we just
> provide one reg+interrupt per timer and instantiate one block for however many timers the
> SoC has?
>
>> +
>> +additionalProperties: false
>> +
>> +examples:
>> +  - |
>> +    timer@...0 {
>> +      compatible = "realtek,rtl9302-timer", "realtek,otto-timer";
>> +      reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
>> +            <0x3230 0x10>, <0x3240 0x10>;
>> +
>> +      interrupt-parent = <&intc>;
>> +      interrupts = <7>, <8>, <9>, <10>, <11>;
>> +      clocks = <&lx_clk>;
>> +    };
> So this would become:
> 	timer@...0 {
> 		compatible = ...
> 		reg = <0x3200 0x10>;
> 		interrupt-parent = <&intc>;
> 		interrupts = <7>;
> 		...
> 	};
> 	timer@...0 {
> 		compatible = ...
> 		reg = <0x3210 0x10>;
> 		interrupt-parent = <&intc>;
> 		interrupts = <8>;
> 		...
> 	};
> 	...
>
> More verbose, but it also makes the binding a bit simpler. The driver can then still do
> whatever it wants with all the timers that are registered, although some more resource
> locking might be required.

I kind of prefer the single entry for the whole TCU. If we were to fold 
the watchdog into this then we could have a single larger range that 
covered all the timers similar to the ingenic,tcu. But that would 
technically be a breaking change at this point.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ