On 27/10/2023 10:10, Bryan O'Donoghue wrote:
power-domains = <VFE_0>,
<VFE_1>,
<TITAN_TOP>; // the controller pd
vfe-set = <VFE_0>, // has its own PD vfe->id = 0
<VFE_1>, // has its own PD vfe->id = 1
<VFE_LITE_N>; // has no PD vfe->id = 2
The basic problem this series fixes is magic indexing.
So be a little clearer; this would be an invalid declaration in dtsi
right now
power-domains = <TITAN_TOP>, // has to come last
<VFE_0>,
<VFE_1>; // the code would think this TOP
The TOP GDSC must come last.
Similarly this would an invalid declaration in our resource structure
vfe-set = <VFE_LITE_0>, //the code thinks this is a VFE
<VFE_LITE_1>, //the code thinks this is a VFE
<VFE_0>,
<VFE_1>; // and that this is VFE Lite
vfe_num = 2;
vfe-id = {0..3}
// don't hook a PD for VFE Lite
if (vfe->id >= camss->res->vfe_num)
return 0;
has_pd fixes checks like that. Eventually we will throw away has_pd when
legacy indexing is dropped - in which case if vfe->id has a res->pd_name
we hook it, if not, then not.
The order of declaration won't matter.
---
bod