Page MenuHomeFreeBSD

Add LS1046A clockgen driver.
ClosedPublic

Authored by dgr_semihalf.com on Apr 9 2020, 2:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 12, 8:56 AM
Unknown Object (File)
Fri, Apr 5, 12:54 PM
Unknown Object (File)
Thu, Mar 28, 8:48 PM
Unknown Object (File)
Feb 27 2024, 6:14 AM
Unknown Object (File)
Feb 17 2024, 5:43 AM
Unknown Object (File)
Feb 7 2024, 4:05 PM
Unknown Object (File)
Jan 16 2024, 9:25 PM
Unknown Object (File)
Jan 3 2024, 4:21 AM

Details

Summary

Driver provides probe and attach functions for LS1046A clockgen and passes
configuration information to QorIQ clockgen class. May be used as
reference implementation for different QorIQ clockgen devices.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

This is a comment for all the LS1046A reviews: Please add a new SOC_NXP_LS1046A option to sys/conf/options.arm64 and make the drivers depend on that in sys/conf/files.arm64
Thanks

I modified the driver to use the modified QorIQ clockgen classes.
Also added dependency on SOC_NXP_LS104A.

sys/arm64/qoriq/clk/ls1046a_clkgen.c
173

this is the same id as the hwaccel1, is that intentional ?
If the clocks aren't exposed in the DTS an id of 0 is perfectly fine.

213

Why does this fixed clock needs a init function to be registered ?

sys/arm64/qoriq/clk/ls1046a_clkgen.c
173

No, that was not intentional.
Most of the clocks are exposed in dts, but due to using two clock cells in dts the custom ofw_mapper function finds clock based on name instead of id.

213

I used init function here as the way FMAN nodes work is specific to SoC, so different way of creating this node may be needed.

Hi, if you have any more comments or remarks, please let me know. Thanks.

Imho, It will be better to wait with this until we find consensus with D24351, right ?

sys/arm64/qoriq/clk/ls1046a_clkgen.c
59

There is no reason to obfuscate clock node name in this way, please use names from TRM

126

huh!. Use nitems() :)

173

again this is wrong way. Simply encode both cells into one id and use it.

Modified to work with new version of D24351

The LS family has too many members and can share 99% of the code. It seems unnecessary for me to have the option for each individual variant. How about 'SOC_NXP_LS' ?

This revision is now accepted and ready to land.May 22 2020, 12:46 PM

I'll change it in all the patches to SOC_NXP_LS.

In D24352#549462, @mmel wrote:

The LS family has too many members and can share 99% of the code. It seems unnecessary for me to have the option for each individual variant. How about 'SOC_NXP_LS' ?

That might be fine for now but what about the future ?

@mmel @manu Please agree on the desired option naming as it affects all submitted patches. Once done, I'll commit.

Just go with NXP_LS, if there is any problem later we'll handle it at this moment.

from IRC:
There is at least 11 variants of QoriQ arm64 based SoCs. This is too much for per-SOC options.
We can always add a SOC_NXP_LS_BLAH and !it if one soc differs

Replace SOC_NXP_LS1046 with SOC_NXP_LS.

This revision now requires review to proceed.May 22 2020, 7:58 PM
This revision was not accepted when it landed; it landed in state Needs Review.May 25 2020, 2:45 PM
Closed by commit rS361459: Add LS1046A clockgen driver. (authored by mw). · Explain Why
This revision was automatically updated to reflect the committed changes.