[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/4] clock: Define and use new clock_display_freq()
From: |
Richard Henderson |
Subject: |
Re: [PATCH 4/4] clock: Define and use new clock_display_freq() |
Date: |
Tue, 8 Dec 2020 17:50:51 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 12/8/20 12:15 PM, Peter Maydell wrote:
> It's common to want to print a human-readable indication of a clock's
> frequency. Provide a utility function in the clock API to return a
> string which is a displayable representation of the frequency,
> and use it in qdev-monitor.c.
>
> Before:
>
> (qemu) info qtree
> [...]
> dev: xilinx,zynq_slcr, id ""
> clock-in "ps_clk" freq_hz=3.333333e+07
> mmio 00000000f8000000/0000000000001000
>
> After:
>
> dev: xilinx,zynq_slcr, id ""
> clock-in "ps_clk" freq_hz=33.3 MHz
> mmio 00000000f8000000/0000000000001000
>
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> This is based on Philippe's patch
> "qdev-monitor: Display frequencies scaled to SI unit"
> but I have abstracted out the "prettified string" into the clock API.
> ---
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
[PATCH 4/4] clock: Define and use new clock_display_freq(), Peter Maydell, 2020/12/08
[PATCH 2/4] target/mips: Don't use clock_get_ns() in clock period calculation, Peter Maydell, 2020/12/08
[PATCH 3/4] clock: Remove clock_get_ns(), Peter Maydell, 2020/12/08
Re: [PATCH 0/4] clock: Get rid of clock_get_ns(), Philippe Mathieu-Daudé, 2020/12/11