[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CA+xJJ1-MU_g8tXsvX63ongAZu+1OynnG_PRv4VoZdKHng1qjWg@mail.gmail.com>
Date: Tue, 25 Jun 2013 16:52:37 +0200
From: Mats Liljegren <liljegren.mats2@...il.com>
To: linux-kernel@...r.kernel.org
Subject: Question: How to find clock source with no consumer device node?
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists