mbox series

[RESEND,v3,0/7] Cleanup Tegra210 EMC frequency scaling

Message ID 20240507093056.3921-1-diogo.ivo@tecnico.ulisboa.pt
Headers show
Series Cleanup Tegra210 EMC frequency scaling | expand

Message

Diogo Ivo May 7, 2024, 9:30 a.m. UTC
Hello,

This patch series consists of a general cleanup of the Tegra210 EMC
frequency scaling code for revision 7.

Currently the code is relying heavily on a function, update_clock_tree_delay(),
that is responsible for too many things, making it long and confusing.
The general idea with these patches is to simplify this function and its
surrounding code, making it more modular.

The motivation behind these changes (besides improving readability and
maintainability) is to make it simpler to add support in the future for
frequency change revisions other than 7, where we can reuse a large
portion of the modularized code rather than essentially repeating 2k
lines of code with minimal changes.

There are no functional changes with this patch set, as it is only meant
as preparation for following patches where revision 6 support is added.

The second version of the series can be found in [1]. v3 contains
changes only in patch 02/07 where a variable is renamed in order to fix
a build error on some architectures.

[1]: https://lore.kernel.org/linux-tegra/20240419104516.308975-1-diogo.ivo@tecnico.ulisboa.pt/

Diogo Ivo (7):
  memory: tegra: Remove periodic compensation duplicate calls
  memory: tegra: Move DQSOSC measurement to common place
  memory: tegra: Reword and correct comments
  memory: tegra: Change macros to interpret parameter as integer
  memory: tegra: Loop update_clock_tree_delay()
  memory: tegra: Move compare/update current delay values to a function
  memory: tegra: Rework update_clock_tree_delay()

 drivers/memory/tegra/tegra210-emc-cc-r21021.c | 427 ++++--------------
 1 file changed, 84 insertions(+), 343 deletions(-)

Comments

Diogo Ivo May 27, 2024, 10:15 a.m. UTC | #1
Hello,

On Tue, May 07, 2024 at 10:30:43AM GMT, Diogo Ivo wrote:
> Hello,
> 
> This patch series consists of a general cleanup of the Tegra210 EMC
> frequency scaling code for revision 7.
> 
> Currently the code is relying heavily on a function, update_clock_tree_delay(),
> that is responsible for too many things, making it long and confusing.
> The general idea with these patches is to simplify this function and its
> surrounding code, making it more modular.
> 
> The motivation behind these changes (besides improving readability and
> maintainability) is to make it simpler to add support in the future for
> frequency change revisions other than 7, where we can reuse a large
> portion of the modularized code rather than essentially repeating 2k
> lines of code with minimal changes.

Gentle ping on this patch series. I think this version addressed all of
the review comments, is there anything missing?

Best regards,
Diogo
Krzysztof Kozlowski May 27, 2024, 10:20 a.m. UTC | #2
On 27/05/2024 12:15, Diogo Ivo wrote:
> Hello,
> 
> On Tue, May 07, 2024 at 10:30:43AM GMT, Diogo Ivo wrote:
>> Hello,
>>
>> This patch series consists of a general cleanup of the Tegra210 EMC
>> frequency scaling code for revision 7.
>>
>> Currently the code is relying heavily on a function, update_clock_tree_delay(),
>> that is responsible for too many things, making it long and confusing.
>> The general idea with these patches is to simplify this function and its
>> surrounding code, making it more modular.
>>
>> The motivation behind these changes (besides improving readability and
>> maintainability) is to make it simpler to add support in the future for
>> frequency change revisions other than 7, where we can reuse a large
>> portion of the modularized code rather than essentially repeating 2k
>> lines of code with minimal changes.
> 
> Gentle ping on this patch series. I think this version addressed all of
> the review comments, is there anything missing?

I think I explained you the process. Merge window finished yesterday
(today for this timezone), so why pinging the same day? Give some time...

Best regards,
Krzysztof
Diogo Ivo May 27, 2024, 11:42 p.m. UTC | #3
On Mon, May 27, 2024 at 12:20:07PM GMT, Krzysztof Kozlowski wrote:
> On 27/05/2024 12:15, Diogo Ivo wrote:
> > Gentle ping on this patch series. I think this version addressed all of
> > the review comments, is there anything missing?
> 
> I think I explained you the process. Merge window finished yesterday
> (today for this timezone), so why pinging the same day? Give some time...

Sorry, I didn't mean to spam you. In fact it's actually good that you
didn't merge this yet as I just noticed that there should be parenthesis
in patch 7 around (rate_mhz * 2 * dqsosc) so that we get the proper result
for the delay. I apologize for missing this and I will send a v4 once I
re-check the series for mistakes like this.

Best regards,
Diogo