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]
Message-ID: <907a40d6-7d55-4bdf-b16b-01c71b5f4104@gmail.com>
Date: Wed, 9 Jul 2025 11:29:16 +0300
From: Laurentiu Mihalcea <laurentiumihalcea111@...il.com>
To: Uwe Kleine-König <ukleinek@...nel.org>
Cc: Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
 Fabio Estevam <festevam@...il.com>,
 Pengutronix Kernel Team <kernel@...gutronix.de>, linux-pwm@...r.kernel.org,
 imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
 linux-kernel@...r.kernel.org, Laurentiu Mihalcea <laurentiu.mihalcea@....com>
Subject: Re: [PATCH] pwm: imx-tpm: reset counter if CMOD is 0



On 7/9/2025 9:05 AM, Uwe Kleine-König wrote:
> Hello Laurentiu,
>
> On Wed, Jul 02, 2025 at 11:31:28AM +0300, Laurentiu Mihalcea wrote:
>> On 7/2/2025 8:51 AM, Uwe Kleine-König wrote:
>>> On Tue, Jul 01, 2025 at 06:01:47PM -0400, Laurentiu Mihalcea wrote:
>>>> +		 * MOD will NOT reset the value of the TPM counter.
>>>> +		 *
>>>> +		 * Therefore, if CNT.COUNT > MOD.MOD, the counter will reset
>>>> +		 * after UINT32_MAX - CNT.COUNT + MOD.MOD cycles, which is
>>>> +		 * incorrect.
>>>> +		 *
>>>> +		 * To avoid this, we need to force a reset of the
>>>> +		 * counter before writing the new MOD value.
>>>> +		 */
>>> Without the reference manual at hand or a deeper understanding of the
>>> hardware this isn't understandable. What is MOD? What is CMOD?
>> so, MOD is the reference value for the counter. The counter needs to
>> count until this value is reached, at which point the counter value
>> gets reset to 0 and the output signal is driven HIGH or LOW (depends
>> on the configured polarity). This value is used to define the period
>> of the PWM.
>>
>> CMOD, on the other hand, is a clocking-related configuration option.
>> I'd say what we're most interested in here is the fact that if CMOD is
>> 0 then the counter will be disabled. Otherwise, it will be enabled.
> JFTR: I marked your patch as "changes requested" now in patchwork and my
> inbox and expect an updated patch, but without holding my breath :-)

Sorry for the long delay! Got this on my TODO list. Busy week :(


Thanks,
Laurentiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ