boards: seger: Use STM32_CLOCK macro in all boards
Replacing the hexadecimal values with bit position is less error-prone
and easier to follow.
The change was done by following command (convert only values where one
bit is set):
```
find boards/st/ -type f \( -name "*.dts" -o -name "*.dtsi" \) \
-exec gawk -i inplace '{
if (match(\
$0,\
/(.*)STM32_CLOCK_BUS_([A-Z0-9_]+)[ \t]+0x([0-9A-Fa-f]+)>([;,]?)/,\
m)) {
val = strtonum("0x" m[3])
if (and(val, val-1) == 0) {
bit = int(log(val)/log(2))
print m[1] "STM32_CLOCK(" m[2] ", " bit ")>" m[4]
} else {
print $0
}
} else {
print
}
}' {} \;
```
Signed-off-by:
Tomáš Juřena <jurenatomas@gmail.com>
Loading
Please sign in to comment