diff options
| author | Benoît Monin <benoit.monin@bootlin.com> | 2025-12-10 17:01:25 +0100 |
|---|---|---|
| committer | Benoît Monin <benoit.monin@bootlin.com> | 2026-07-17 10:09:56 +0200 |
| commit | a922374afc3693542f21661cf8b31f5a16c24879 (patch) | |
| tree | da303ebf3088348fbd28e3587b51d008b65c1052 /include/linux/debugobjects.h | |
| parent | 111f35a673079c4fc0c930716836652bf579e276 (diff) | |
clk: eyeq: Introduce a generic clock type
Currently, the clocks contained in the OLB are represented as three
separate structures: PLL, dividers and fixed factors. These clock objects
are stored in three separate arrays in the match data and registered in
a fixed order: first the PLL, then the dividers, and finally the fixed
factors. While this is sufficient for the clocks found in the OLB of
the EyeQ5 and EyeQ6, it does not allow declaring the more complex clock
interdependencies for those found in the OLB of the EyeQ7H.
We add a new type of clock represented by the struct eqc_clock that covers
all types of clocks found in OLB. It contains the clock index and its
name, alongside the parent clock index and name. The index refers to
the position in the array of clk_hw in the struct clk_hw_onecell_data
that is filled when registering the clocks. The parent name is optional
and can refer to the parent clock either via the device tree or via
its globally unique name. Two special index values are used to select
which type of lookup is done. The function eqc_fill_parent_data() fill
a clk_parent_data structure based on the parent index and name values.
The struct eqc_clock also contains two function pointers: .probe()
and .unregister(). The probe() function parses the eqc_clock structure,
registers a new clock as a clk_hw and adds it to the clk_hw_onecell_data
structure. It can be called during probe and early init. The unregister()
function unregisters the clk_hw. This patch adds the probe functions
for the PLLs, the dividers and the fixed factors found in the EyeQ OLB.
Finally, a union is also part of the eqc_clock structure to store the
data specific to each type of clock.
To help in declaring struct eqc_clock, three macros are added. They set
the correct function pointers for .probe() and .unregister() based on
the type of clock being declared.
An array of eqc_clock is added to the match data and early match
data. They are parsed during probe and early initialization respectively.
There is no user yet of the eqc_clock structure.
Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
