On 6/20/20 7:31 PM, Richard Henderson wrote:
> On 6/17/20 12:15 PM, Philippe Mathieu-Daudé wrote:
>> +    /* XTAL range: 8-14 MHz */
>> +    if (s->xtal_freq_hz < 8e6 || s->xtal_freq_hz > 14e6) {
>> +        error_setg(errp, "\"xtal-frequency-hz\" property in incorrect 
>> range.");
>> +        return;
>> +    }
>> +    /* Use a 4x fixed multiplier */
>> +    s->pclk_freq_hz = 4 * s->xtal_freq_hz;
>> +    /* PCLK range: 8-50 MHz */
>> +    assert(s->pclk_freq_hz <= 50e6);
> 
> It's just startup, so it's not vital, but forcing floating-point comparisons
> just because the notation is shorter isn't ideal.

OK.

> 
> Perhaps just a local "const uint32_t MHz = 10000000;", and some multiplies.

/10 :P

> 
> Otherwise,
> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

Thanks a lot for reviewing all the patches!

Regards,

Phil.

Reply via email to