On 11/01/18 18:03, Ed Blake wrote:
> On 11/01/18 17:55, Nuno Gonçalves wrote:
>> So, for me clk_round_rate() always returns 2400, and only the loop
>> variable i changes, so the search is monotonic, from the highest baud
>> to the lowest (increasing divider).
>>
>> I am using a Allwiner H2+, wi
On 11/01/18 17:55, Nuno Gonçalves wrote:
> So, for me clk_round_rate() always returns 2400, and only the loop
> variable i changes, so the search is monotonic, from the highest baud
> to the lowest (increasing divider).
>
> I am using a Allwiner H2+, with the serial port configuration from
> su
So, for me clk_round_rate() always returns 2400, and only the loop
variable i changes, so the search is monotonic, from the highest baud
to the lowest (increasing divider).
I am using a Allwiner H2+, with the serial port configuration from
sunxi-h3-h5.dtsi.
Are you sure that clk_round_rate ca
On 11/01/18 17:28, Nuno Gonçalves wrote:
> I have to disagree :)
>
> if (rate < i * min_rate) is true to i=a, then
>
> (rate >= i * min_rate && rate <= i * max_rate) will always be false
> for any i=b, where b>a.
No, because 'rate' is assigned from clk_round_rate() each iteration.
The idea of thi
I have to disagree :)
if (rate < i * min_rate) is true to i=a, then
(rate >= i * min_rate && rate <= i * max_rate) will always be false
for any i=b, where b>a.
If this condition is true, it means the old condition would be always
false for the remaining of the iteration.
My patch "only" avoids
Hi Nuno,
Thanks for reporting this and the patch.
On 11/01/18 13:38, Nuno Goncalves wrote:
> When target_rate is big enough and not permitted in hardware,
> then i is looped to UART_DIV_MAX (0x), and i * max_rate will overflow
> (32b signed).
>
> A fix is to quit the loop early enough, as soo
When target_rate is big enough and not permitted in hardware,
then i is looped to UART_DIV_MAX (0x), and i * max_rate will overflow
(32b signed).
A fix is to quit the loop early enough, as soon as rate < i * min_rate as it
means the rate is not permitted.
This avoids arbitraty rates to be app
7 matches
Mail list logo