clk/qcom: introduce debugcc

debugcc is a tool for debugging the clock controllers on Qualcomm SoCs.
It uses the built-in clock debugging registers to measure clock rates by
muxing clocks to a special debug mux.

This is a port of the userspace tool [1], as it is plain C and only
depends on getopt, only minimal changes are necessary to integrate it
into u-boot. The main addition is a substring search to filter which
clocks are measured as this is quite useful when running on-device.

Import debugcc and plumb it up to the "clk debug" command.

[1]: https://github.com/andersson/debugcc

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
10 files changed