clk: add a clk debug command

Add a command and associated op to allow clock drivers to implement
their own debug commands. Some clock controller hardware implements
debug features like support for measuring clock output rates. This
allows using a common entrypoint to driver-specific clock debugging
functionality.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 2d7d8fe..807c326 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -682,6 +682,17 @@
 		ops->dump_clks(dev);
 }
 
+void clk_debug_clks(struct udevice *dev, int argc, char *const argv[])
+{
+	const struct clk_ops *ops;
+
+	ops = clk_dev_ops(dev);
+	if (ops && ops->debug_clks)
+		ops->debug_clks(dev, argc, argv);
+	else
+		printf("No debug op for %s\n", dev->name);
+}
+
 int clk_enable_bulk(struct clk_bulk *bulk)
 {
 	int i, ret;