Add simple-bus compatibility and ranges properties to cm1, cm2 and prm
nodes. This is done in preparation of adding the support for clkctrl
nodes.
SPLIT: timer1 fck setup
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add simple-bus compatibility and ranges properties to cm1, cm2 and prm
nodes. This is done in preparation of adding the support for clkctrl
nodes.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add simple-bus compatibility and ranges properties to cm_core_aon, cm_core
and prm nodes. This is done in preparation of adding the support for
clkctrl nodes.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timers1/2. This is needed so that
the clock rate claculations continue to function properly once dm816x
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timers1/2. This is needed so that
the clock rate claculations continue to function properly once dm814x
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once dra7
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timers1/2. This is needed so that
the clock rate calculations continue to function properly once am33xx
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timers1/2. This is needed so that
the clock rate calculations continue to function properly once am33xx
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once omap4
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Add the functional clock definition for timer1. This is needed so that
the clock rate calculations continue to function properly once omap5
transitions away from hwmod data and towards the clkctrl clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Make these const as they are only getting passed to the functions
cm_register and cm_unregister having the arguments as const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Make the pointer cm_ll_data of type cm_ll_data as const as it does not
modify the fields of the structure it points too.
After this change, make the argument of cm_register function as const as
it is used to initialise cm_ll_data or used inside an if condition.
Make the pointer argument of cm_unregister function as const as it is only
used inside an if condition.
Add const to the function prototypes too.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
"default_sata_clkdm" does not exist, instead replace this with the
correct clockdomain name which is just "default_clkdm".
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Add support for the address translation logic for am33xx. Needed for
mapping hwmods towards their corresponding clkctrl providers and clocks.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
There are cases where clkctrl clock offsets do not match the corresponding
clockdomain, and this case the existing mapping functionality will fail.
Fix this by adding the whole address range for a clkctrl provider and
matching the actual clkctrl registers against these ranges.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Needed to map clkctrl clocks against hwmods. This patch also removes
the obsolete clkdm_xlate_address function which is no longer needed
for anything.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Add a new CM API for fetching the physical address of a hwmod clkctrl
register. This is needed to map omap hwmods against clkctrl clocks, the
existing support for clkdm address translation was not sufficient to
handle the mutant cases where the clockdomain offset is completely
off from the clkctrl ones.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Re-route all opt-clocks to use the new clkctrl clocks also, instead of
depending on the old dt clocks. Also, add aliases for certain clkctrl
clocks that hwmod core depends upon. The alias list can be stripped
down once hwmod database no longer needs these.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Add data for am43xx clkctrl clocks, and register it within the clkctrl
driver.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Most of the clock aliases are no longer needed, only leave the ones
required by OMAP timer handling in place.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Most of the clock aliases are no longer needed, only leave the
timer_32k_ck one in place which is required by OMAP timer code.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
In case the clkctrl node contains assigned-clock-* entries, registering
the provider can fail with -EPROBE_DEFER. In this case, add the
provider to the retry_init clock list so it will be cleaned up later.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
User data should be void type, as the core framework doesn't need to
know what is passed through.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
In certain cases it is possible that the timekeeping has been suspended
already when attempting to disable/enable a clkctrl clock. This will
happen at least on am43xx platform when attempting to enable / disable
the clockevent source itself, burping out a warning from timekeeping core.
The sequence of events leading to this:
-> timekeeping_suspend()
-> clockevents_suspend()
-> omap_clkevt_idle()
-> omap_hwmod_idle()
-> _omap4_clkctrl_clk_disable()
-> _omap4_is_timeout()
Avoid the issue by checking if the timekeeping is suspended and using
the fallback udelay approach for checking timeouts.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
hwmod core still depends on certain clocks being found by name, so we
need to add support for adding clkctrl clock aliases. This patch can
be reverted when no longer needed by hwmod core code.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Clkctrl clocks now support clockdomain init also. This will be needed
so that hwmod core can drop the support for clockdomain handling.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Current node name does not convey any information, as it is always "clk".
Instead, print out the full node path, which will tell us better where
something went wrong.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>