[Skiboot] [PATCH 2/2] platform/mihawk: Tune equalization settings for opencapi

Frederic Barrat fbarrat at linux.ibm.com
Fri Apr 10 00:05:51 AEST 2020

>>> -#define MARGIN_RATIO        (0)
>>> -#define FFE_PRE_COEFF        (0)
>>> -#define FFE_POST_COEFF        (0)
>>> +int ffe_pre_coeff = 0;
>>> +int ffe_post_coeff = 0;
>> Is there any way to do this without exposing global variables? (My 
>> primary objection is that global variables for specific things in 
>> specific subsystems is ugly and inelegant)
> So those parameters are input parameters when computing the zcal and we 
> need a new per-platform way of defining them. So one way or another, 
> we'll end up with some kind of per-platform global, I think. And I agree 
> it would be a bit better than a pure global. I went this way as a 
> compromise between minimizing the impact on the "nvlink on witherspoon" 
> path and giving us flexibility to hack anything for opencapi. The whole 
> thing was highly empirical and feels like a hack anyway.
> Another option I can think of would be to have a per-platform hook (and 
> no longer in the platform_ocapi struct) at the beginning of 
> phy_tx_zcal_calculate(), defaulting to the current 0 values if none are 
> defined. The hook would give the values to use for the ffe_pre_coeff and 
> ffe_post_coeff parameters. Probably a bit cleaner, but doesn't feel as 
> easily extensible in the future if needed, I think.

Andrew, so do you think we can live with it or do you see a better 
option (proposal above or else)?


More information about the Skiboot mailing list