7 Commits

Author SHA1 Message Date
Damien Lespiau
eab0823e0e ddi_compute_wrpll: Do not use a double constant
Otherwise the expression will be promoted to a floating point
multiplication

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
3b79360642 ddi_compute_wrpll: Factor out a common expression
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
4897ac41da ddi_compute_wrpll: Rework the logic around r2 and n2 a bit
Let's not use the 2K variants of the frequencies it does not help
in anything here and the explanations are hopefuly more understandable
this way.

On top of that, I noticed that we can just compute the desired min/max
boundaries for r2 and n2, so use that instead of the two tests to
discard out of range values.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:42 +01:00
Damien Lespiau
bb1dfd5613 ddi_compute_wrpll: Fix the reference for 222525Khz and 296703Khz
Assume that the budget for those frequencies were tuned after the
reference table was created.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
a59b0cd01d ddi_compute_wrpll: Fix the reference table for 37762500Hz
The 5 was lost when stored in KHz.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
8cf09e5ed4 ddi_compute_wrpll: Code the reference frequencies in Hz
Because the reference frequencies were stored in KHz, we've lost
precision for 37762500Hz and the test is failing. Let's express the
reference frequencies in Hz then.

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00
Damien Lespiau
0be2723c30 tools: Add a standalone tool to test the computation of r,n,p for WRPLLs
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2013-05-10 15:26:41 +01:00