2 * (C) Copyright 2002-2006
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * SPDX-License-Identifier: GPL-2.0+
9 char *strmhz (char *buf, unsigned long hz)
14 n = DIV_ROUND_CLOSEST(hz, 1000) / 1000L;
15 l = sprintf (buf, "%ld", n);
18 m = DIV_ROUND_CLOSEST(hz, 1000L);
20 sprintf (buf + l, ".%03ld", m);