15 Sep, 2011

2 commits

  • At Tony's request, remove the omap_chip bitmasks from the clockdomain
    and clockdomain dependency definitions. Instead, initialize
    clockdomains based on one or more lists that are applicable to a
    particular SoC family, variant, and silicon revision.

    Tony Lindgren found a bug in a previous version of this
    patch - thanks Tony.

    Signed-off-by: Paul Walmsley
    Cc: Tony Lindgren

    Paul Walmsley
     
  • In preparation for OMAP_CHIP() removal, split clkdm_init() into four
    functions. This allows some of them to be called multiple times: for
    example, clkdm_register_clkdms() can be called once to register
    clockdomains that are common to a group of SoCs, and once to register
    clockdomains that are specific to a single SoC.

    The appropriate order to call these functions - which is enforced
    by the code - is:

    1. clkdm_register_platform_funcs()
    2. clkdm_register_clkdms() (can be called multiple times)
    3. clkdm_register_autodeps() (optional; deprecated)
    4. clkdm_complete_init()

    Convert the OMAP2, 3, and 4 clockdomain init code to use these new
    functions.

    While here, improve documentation, and increase CodingStyle
    conformance by shortening some local variable names.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     

10 Jul, 2011

3 commits

  • Since the clkdm state programming is now done from within the hwmod
    framework (which uses a per-hwmod lock) instead of the being done
    from the clock framework (which used a global lock), there is now a
    need to have per-clkdm locking to prevent races between different
    hwmods/modules belonging to the same clock domain concurrently
    programming the clkdm state.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Benoit Cousson
    Cc: Paul Walmsley
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • Add a new function, clkdm_in_hwsup(), that returns true if a clockdomain
    is configured for hardware-supervised idle. It does not actually read the
    hardware; rather, it checks an internal flag in the struct clockdomain, which
    is changed when the clockdomain is switched in and out of hardware-supervised
    idle. This should be safe, since all changes to the idle mode should
    pass through the clockdomain code.

    Based on a set of patches by Rajendra Nayak which do
    the same thing by checking the hardware bits. This approach should be
    faster and more compact.

    Signed-off-by: Paul Walmsley
    Cc: Rajendra Nayak
    Cc: Todd Poynor
    Cc: Benoît Cousson

    Paul Walmsley
     
  • Duplicate the existing API for clockdomain enable from clock to enable
    a clock domain from hwmod framework.
    This will be needed when the hwmod framework will move from the current
    clock centric approach to the module based approach.

    These APIs are returning 0 for the moment for OMAP2 and OMAP3 until
    their hwmods are updated with the clksm attribute.

    Signed-off-by: Benoit Cousson
    Cc: Kevin Hilman
    Cc: Paul Walmsley
    Cc: Rajendra Nayak
    Signed-off-by: Paul Walmsley

    Benoit Cousson
     

31 Mar, 2011

1 commit


11 Mar, 2011

1 commit

  • …dm_add_can_lose_context_fns_2.6.39', 'remotes/origin/omap_device_a_2.6.39', 'remotes/origin/mmc_a_2.6.39', 'remotes/origin/hwmod_b_2.6.39', 'remotes/origin/dmtimer_a_2.6.39', 'remotes/origin/pwrdm_clkdm_a_2.6.39', 'remotes/origin/clkdm_statdep_omap4_2.6.39', 'remotes/origin/clk_a_2.6.39', 'remotes/origin/clk_autoidle_a_2.6.39', 'remotes/origin/clk_autoidle_b_2.6.39', 'remotes/origin/clk_b_2.6.39', 'remotes/origin/clk_clkdm_a_2.6.39', 'remotes/origin/misc_a_2.6.39', 'remotes/origin/for_2.6.39/omap3_hwmod_data' and 'remotes/origin/wdtimer_a_2.6.39' into tmp-integration-2.6.39-20110310-024

    Paul Walmsley
     

10 Mar, 2011

1 commit

  • Add a new clockdomain flag, CLKDM_NO_AUTODEPS, which, when marked on a
    clockdomain, will prevent "autodeps" from being associated with the
    clockdomain. ("Autodeps" are sleep dependencies and wakeup
    dependencies from/to processor modules that are automatically added to
    a clockdomain when it is in hardware-supervised idle mode. They are
    deprecated -- a relic from the old CDP trees -- but are still in use
    for OMAP3.)

    Also, prevent the hwmod code from adding or removing initiator
    dependencies for clockdomains with this flag set.

    This patch should allow others to test which clockdomains actually
    still need autodeps.

    Thanks to Kevin Hilman for noting that the original
    version should also modify the hwmod code.

    Signed-off-by: Paul Walmsley
    Cc: Kevin Hilman

    Paul Walmsley
     

26 Feb, 2011

5 commits

  • Define the following architecture specific funtions for omap2/3/4
    .clkdm_clk_enable
    .clkdm_clk_disable

    Convert the platform-independent framework to call these functions.
    Also rename the api's by removing the omap2_ preamble.
    Hence call omap2_clkdm_k_enable as clkdm_clk_enable and
    omap2_clkdm_clk_disable as clkdm_clk_disable.a

    Remove unused functions (_enable/_disable_hwsup) and unsed
    headers from clockdomain.c file.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • Define the following architecture specific funtions for omap2/3/4
    .clkdm_allow_idle
    .clkdm_deny_idle

    Convert the platform-independent framework to call these functions.
    Also rename the api's by removing the omap2_ preamble.
    Hence call omap2_clkdm_allow_idle as clkdm_allow_idle and
    omap2_clkdm_deny_idle as clkdm_deny_idle.

    Make the _clkdm_add_autodeps and _clkdm_del_autodeps as non-static
    so they can be accessed from OMAP2/3 platform specific code.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • Define the following architecture specific funtions for omap2/3/4
    .clkdm_sleep
    .clkdm_wakeup

    Convert the platform-independent framework to call these functions.
    Also rename the api's by removing the omap2_ preamble.
    Hence call omap2_clkdm_wakeup as clkdm_wakeup and
    omap2_clkdm_sleep as clkdm_sleep.

    Signed-off-by: Rajendra Nayak
    [paul@pwsan.com: fixed omap3_clkdm_clear_all_sleepdeps() and
    omap2_clkdm_clear_all_wkdeps() to test against the correct
    loop termination condition; thanks to Kevin Hilman for finding and
    helping fix]
    Cc: Kevin Hilman
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • Define the following architecture specific funtions for omap2/3
    .clkdm_add_wkdep
    .clkdm_del_wkdep
    .clkdm_read_wkdep
    .clkdm_clear_all_wkdeps
    .clkdm_add_sleepdep
    .clkdm_del_sleepdep
    .clkdm_read_sleepdep
    .clkdm_clear_all_sleepdeps

    Convert the platform-independent framework to call these functions.
    With this also move the clkdm lookups for all wkdep_srcs and
    sleepdep_srcs at clkdm_init.

    Signed-off-by: Rajendra Nayak
    [paul@pwsan.com: fixed loop termination conditions in omap*_clkdm_clear_all_*();
    thanks to Kevin Hilman for finding and helping fix those bugs; also
    avoid re-resolving clockdomains during init; abstracted out clkdm_dep walk]
    Cc: Kevin Hilman
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     
  • Put infrastructure in place, so arch specific func pointers
    can be hooked up to the platform-independent part of the
    framework.
    This is in preparation of splitting the clockdomain framework into
    platform-independent part (for all omaps) and platform-specific
    parts.

    Signed-off-by: Rajendra Nayak
    Signed-off-by: Paul Walmsley

    Rajendra Nayak
     

08 Jan, 2011

1 commit

  • struct clockdomain member clktrctrl_mask is available for only for OMAP2
    and OMAP3 architectures. Technially it is also used only for these archs
    but this breaks the build with custom OMAP4 configuration.

    CC arch/arm/mach-omap2/clockdomain.o
    arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup':
    arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup':
    arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep':
    arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup':
    arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable':
    arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable':
    arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask'
    make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1
    make: *** [arch/arm/mach-omap2] Error 2

    Fix the build break by dropping the #ifdef as suggested by Paul Walmsley

    Signed-off-by: Santosh Shilimkar
    Acked-by: Paul Walmsley
    Signed-off-by: Kevin Hilman

    Santosh Shilimkar
     

22 Dec, 2010

2 commits

  • The OMAP powerdomain code and data is all OMAP2+-specific. This seems
    unlikely to change any time soon. Move plat-omap/include/plat/powerdomain.h
    to mach-omap2/powerdomain.h. The primary point of doing this is to remove
    the temptation for unrelated upper-layer code to access powerdomain code
    and data directly.

    As part of this process, remove the references to powerdomain data
    from the GPIO "driver" and the OMAP PM no-op layer, both in plat-omap.
    Change the DSPBridge code to point to the new location for the
    powerdomain headers. The DSPBridge code should not be including the
    powerdomain headers; these should be removed.

    Signed-off-by: Paul Walmsley
    Cc: Kevin Hilman
    Cc: Omar Ramirez Luna
    Cc: Felipe Contreras
    Cc: Greg Kroah-Hartman

    Paul Walmsley
     
  • The OMAP clockdomain code and data is all OMAP2+-specific. This seems
    unlikely to change any time soon. Move plat-omap/include/plat/clockdomain.h
    to mach-omap2/clockdomain.h. The primary point of doing this is to remove
    the temptation for unrelated upper-layer code to access clockdomain code
    and data directly.

    DSPBridge also uses the clockdomain headers for some reason, so,
    modify it also. The DSPBridge code should not be including the
    clockdomain headers; these should be removed.

    Signed-off-by: Paul Walmsley
    Cc: Kevin Hilman
    Cc: Omar Ramirez Luna
    Cc: Felipe Contreras
    Cc: Greg Kroah-Hartman
    Tested-by: Rajendra Nayak
    Tested-by: Santosh Shilimkar

    Paul Walmsley