
Dear sposelenov@emcraft.com,
In message 200811011409.mA1E9mZC008413@wooster.emcraft.com you wrote:
This is a patch to modify the mx31ads target to use lldiv(). Otherwise, it fails to build by EABI toolchain.
...
/* "time" is measured in 1 / CONFIG_SYS_HZ seconds, "tick" is internal timer period */ #ifdef CONFIG_MX31_TIMER_HIGH_PRECISION /* ~0.4% error - measured with stop-watch on 100s boot-delay */ -#define TICK_TO_TIME(t) ((t) * CONFIG_SYS_HZ / CONFIG_MX31_CLK32) -#define TIME_TO_TICK(t) ((unsigned long long)(t) * CONFIG_MX31_CLK32 / CONFIG_SYS_HZ) -#define US_TO_TICK(t) (((unsigned long long)(t) * CONFIG_MX31_CLK32 + \
999999) / 1000000)
+#define TICK_TO_TIME(t) lldiv((t) * CONFIG_SYS_HZ, CONFIG_MX31_CLK32) +#define TIME_TO_TICK(t) lldiv((unsigned long long)(t) * CONFIG_MX31_CLK32, CONFIG_SYS_HZ) +#define US_TO_TICK(t) lldiv(((unsigned long long)(t) * CONFIG_MX31_CLK32 + \
999999), 1000000)
Lines too long.
(Yes, the original lines were too long already, too. But this is a chace to fix this, so please let's do it now.).
Best regards,
Wolfgang Denk