Question: How to find clock source with no consumer device node?
From: Mats Liljegren
Date: Tue Jun 25 2013 - 10:52:43 EST
I want to make a load module which is used for performance
measurements. It hooks into a timer available with the target board in
question.
Now, there is no device tree information about this timer hardware
that my load module could use. However, there is device tree
information about the clock source that my timer needs. But I can't
figure out how get the clock based on this.
I do not want to force the user of this load module to patch and
regenerate their device tree blob, and then restart their computer, to
get the right information in. I have tried this path and sure enough,
it works for me. But it will not be so easy for someone else who just
want to run this load module.
I tried to use "clk_get_sys()", but apparently you can't point at the
clock producer, you must point at the clock consumer, which would be
my timer. But this device node does not exist.
I would really like to just say "clk_of_get("/soc/clocks/myclock")"
where "/soc/clocks/myclock" is the device tree path to the clock
device I want to use.
Any help or hints are appreciated.
/Mats
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/