HomeFreeBSD

MFC r363887 (by manu), r365395: allwinner: clk: Fix nm clock calculation

Description

MFC r363887 (by manu), r365395: allwinner: clk: Fix nm clock calculation

r363887:
Use the right factor when finding the best frequency and compare the
absolute value of the result.
Submitted by: kibab

r365395:
aw_clk_nm: fix incorrect use of abs()
abs() takes a (signed) int as input.
Instead, it was used with unsigned 64-bit integers.
So, add and use a new helper function to calculate a difference between
two uint64_t-s.

Details

Provenance
avgAuthored on
Parents
rS365941: Fix vi build on Linux/macOS
Branches
Unknown
Tags
Unknown