Add a means to specify mask/value for the prediv condition instead of shift/width/value for clocks that have a more complex mux scenario.
Specifically, ahb1 on the a83t has the prediv applied if mux is either b10 or b11.
Differential D12851
aw_ccung: changes to accommodate upcoming a83t support kevans on Oct 31 2017, 1:13 PM. Authored by Tags None Referenced Files
Details
Add a means to specify mask/value for the prediv condition instead of shift/width/value for clocks that have a more complex mux scenario. Specifically, ahb1 on the a83t has the prediv applied if mux is either b10 or b11.
Diff Detail
Event Timeline
Comment Actions I think that the cpupll can be added just by using the N factor (so a simple mult clock), the P factor is used when the output is less than 288 Mhz. For AHB1 just list the parent twice, it's already done that way for APB2 on A31 for example. Comment Actions Should I go ahead and write a clk_mult, or would it suffice for these purposes to go ahead and model these two clocks as an NM clk with a fixed M? Comment Actions Just use NM clock, I use fake factor for every other SoCs, no reason that you cannot do it too :) Comment Actions And as said on IRC, for bit cond just rewrite the logic with shift/mask (if shift is 0, use mask directly instead of computing it etc ...). That should solve all your problems for those new clocks. Comment Actions Something like this, perhaps? Use looks like this: PREDIV_CLK_WITH_MASK(ahb1_clk, CLK_AHB1, /* id */ "ahb1", ahb1_parents, /* name, parents */ 0x54, /* offset */ 12, 2, /* mux */ 4, 2, 0, AW_CLK_FACTOR_POWER_OF_TWO, /* div */ 6, 2, 0, AW_CLK_FACTOR_HAS_COND, /* prediv */ (2 << 12), (2 << 12)); /* prediv condition */ |