[PATCH-V3 3/3] ARM: OMAP3+: clock33xx: Add AM33XX clock tree data

Cousson, Benoit b-cousson at ti.com
Wed Apr 25 08:33:21 EDT 2012


On 4/25/2012 2:26 PM, Hiremath, Vaibhav wrote:
> On Wed, Apr 25, 2012 at 17:08:43, Cousson, Benoit wrote:
>> On 4/25/2012 12:20 PM, Hiremath, Vaibhav wrote:
>>> On Wed, Apr 25, 2012 at 14:10:49, Cousson, Benoit wrote:
>>
>> ...
>>
> <snip>
>>
>>> How would I know the rate of this clock in driver? Say for example, I want
>>> to configure my internal divider based on input rate?
>>> OR
>>> I want to change the rate of dss_clk itself?
>>> OR
>>> Looking at debugfs, would I get the rate of dss_clk?
>>
>> No because that clock will not exist anymore, but you will have the real
>> clock rate from the "dss_dss_clk".
>>
>
> Thanks Benoit, I think I understand your perspective on Module Vs leaf node
> and now able to digest as well.
> Probably Last Q, which I think clarify all my doubts,
>
> Assume we have complete hwmod instance and built a device using
> omap_device_build() api, and also the driver is completely using runtime pm
> api's,
> How can driver get the clk handle (required to get the rate)?
> Is there any api already available for this?

The omap_device fmwk will auto-magically create a "fck" clkdev entry for 
the main_clk.

The API is thus the standard: clk_get(dev, "fck"), to get the clock 
handle and then you can use the other clock API.

The idea is to enforce the usage of clock alias local to the device and 
not trying anymore to get the real clock name. It thus allows driver to 
work on various variant / revision without having to modify the driver.

The fmwk will also create clock alias for any opt_clock present in the 
hwmod.

Regards,
Benoit





More information about the linux-arm-kernel mailing list