27 Sep, 2011

12 commits

  • This generalizes the omap2_mcbsp_set_clks_src implementation between generic
    McBSP and OMAP2 specific McBSP code. Currently this function is used to
    select either internal fclk or clks pin as a McBSP CLKS source on OMAP2+.

    Implement generalization by having an optional set_clk_src function pointer
    in platform data that is used to select parent for a given clock. Idea is to
    pass higher level source clock name (later coming from client driver) that
    platform specific code will map to platform specific clock name.

    API cleanup between McBSP and client code comes later.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • These address definitions are OMAP1 specific can be in single source file.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • hardware.h is not needed here and let the definition for struct clk to come
    via linux/clk.h.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Sidetone resource is already registered for a device so there is no need
    for cpu_is_omap34xx() and McBSP port number tests in the driver. We can
    cleanup and make the code generic by dropping remaining CONFIG_ARCH_OMAP3
    conditional compilations and then using sidetone resource and st_data
    variable for runtime tests.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Active sidetone requires that McBSP interface clock doesn't idle and there
    is no mechanism in hwmod to turn autoidling on/off in runtime. McBSP2 and 3
    in OMAP34xx share their interface clock with McBSP sidetone module and
    that interface clock must be active when the sidetone is operating.

    Sidetone has its own autoidle bit which should keep the interface clock
    active but it is broken. Putting the McBSP core to no-idle mode when the
    sidetone is active is no good either since it results to higher power
    consumption when using the threshold based DMA transfers.

    For making the McBSP code more generic, move this sidetone clock management
    with fixme comments to mach-omap2/mcbsp.c and pass pointer to it via
    platform data.

    Signed-off-by: Jarkko Nikula
    Cc: Paul Wamsley
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Rationale here is to remove one global variable and to make possible to have
    variable size McBSP register maps inside SoC.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Remove CONFIG_ARCH_OMAP3 conditional compilation and cpu_is_omap34xx test
    around buffer threshold based transfer and DMA operating mode control. Use
    instead the buffer_size in platform data to determine when these sysfs
    controls are exposed and when to access related McBSP registers. Rationale
    for this is to make code generic and to allow to use it on OMAP4 that also
    supports threshold based transfers.

    Currently buffer_size variable is set only for OMAP3 SoCs but it is easy
    to extend to OMAP4 and any later OMAP version.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • McBSP transmit and receive configuration control registers must be set up
    for OMAP2430 and later. Replace is_omap tests in generic code with a new
    feature flag has_ccr in platform data so that there is no need to change
    code for any upcoming OMAP version.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Currently wakeup control code is compiled only when CONFIG_ARCH_OMAP3 is
    set even it should be available for CONFIG_ARCH_OMAP4 only builds also.

    Fix this by making wakeup control generic so that it is executed whenever
    new feature flag has_wakeup in platform data is set. Currently flag is set
    for McBSP config types 3 and 4.

    Remove also old comments about idle mode settings and HW bug workarounds
    that were not updated during hwmod conversion.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Register access can be made more generic by calculating register address
    offsets runtime from common register definitions and by using reg_size and
    reg_step variables that are passed via platform data. Common register
    definitions are possible since McBSP registers are ordered similarly between
    OMAP versions.

    Remove also references to OMAP2+ specific config_type variable from generic
    McBSP code since other variables and feature flags are better to carry needed
    information from platform code.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • Only OMAP1s are using omap_mcbsp_register_board_cfg after OMAP2+ hwmod
    conversion so it can be moved to mach-omap1/mcbsp.c.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     
  • These variables got unused after McBSP was converted to use resource
    structures.

    Signed-off-by: Jarkko Nikula
    Acked-by: Peter Ujfalusi
    Tested-by: Janusz Krzysztofik
    Signed-off-by: Tony Lindgren

    Jarkko Nikula
     


22 Sep, 2011

1 commit


21 Sep, 2011

1 commit


17 Sep, 2011

1 commit

  • During the idle/suspend path, we expect the console lock to be held so
    that no console output is done during/after the UARTs are idled.

    However, when using the no_console_suspend argument on the
    command-line, the console driver does not take the console lock. This
    allows the possibility of console activity after UARTs have been
    disabled.

    To fix, update the current is_suspending() to also check the
    console_suspend_enabled flag.

    Reported-by: Abhilash Koyamangalath
    Tested-by: Abhilash Koyamangalath
    Signed-off-by: Kevin Hilman

    Kevin Hilman
     

16 Sep, 2011

9 commits


15 Sep, 2011

11 commits

  • Now that all of the users of the OMAP_CHIP bitfield code have been converted
    to use lists, the OMAP_CHIP code, data, and declarations can be removed.

    Signed-off-by: Paul Walmsley

    Paul Walmsley
     
  • At Tony's request, remove the OMAP_CHIP* flags from the hwmod data, and
    replace it instead with chip family, variant, and ES level-specific lists
    of hwmods to register.

    Thanks to Gražvydas Ignotas for finding a bug in the
    AM3517/3505 support, and for other review comments.

    Signed-off-by: Paul Walmsley
    Cc: Gražvydas Ignotas

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

    Gražvydas Ignotas found and reported a bug in a
    related patch that also applied to this patch - thanks Gražvydas.

    Signed-off-by: Paul Walmsley
    Cc: Gražvydas Ignotas

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

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

    1. pwrdm_register_platform_funcs()
    2. pwrdm_register_pwrdms() (can be called multiple times)
    3. pwrdm_complete_init()

    Convert the OMAP2, 3, and 4 powerdomain 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
     
  • 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
     
  • The OMAP_REVBITS_* macros are just used as otherwise meaningless
    aliases for the numbers zero through five, so remove these macros.

    Signed-off-by: Paul Walmsley
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     
  • omap3_cpuinfo() contains essentially duplicated code from
    omap3_check_revision(), just for the purpose of determining the chip ES level.
    Set the cpu_rev char array pointer in omap3_check_revision() instead,
    and drop the now-useless code from omap3_cpuinfo().

    Signed-off-by: Paul Walmsley
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     
  • Emit a warning to the console in omap3_check_revision() if that code
    cannot determine what type of SoC the system is currently running on.

    Remove some extra whitespace, remove some duplicate code, and
    add an appropriate comment to a fallthrough case.

    Signed-off-by: Paul Walmsley
    Cc: Hemant Pedanekar
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     
  • Use explicit revision codes for OMAP/AM 3505/3517 ES levels, as the rest
    of the OMAP2+ SoCs do in mach-omap2/cpu.c.

    Signed-off-by: Paul Walmsley
    Cc: Sanjeev Premi
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     
  • omap3_cpuinfo() is filled with useless strcpy() calls; remove them.

    Signed-off-by: Paul Walmsley
    Cc: Sanjeev Premi
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     

14 Sep, 2011

1 commit

  • The OMAP3505/AM3505 appears to be based on the same silicon as the
    OMAP3517/AM3517, with some features disabled via eFuse bits. Follow
    the same practice as OMAP3430 and identify these devices internally as
    part of the OMAP3517/AM3517 family.

    The OMAP3503/3515/3525/3530 chips appear to be based on the same silicon
    as the OMAP3430, with some features disabled via eFuse bits. Identify
    these devices internally as part of the OMAP3430 family.

    Remove the old OMAP35XX_CLASS, which actually covered two very different
    chip families. The OMAP3503/3515/3525/3530 chips will now be covered by
    OMAP343X_CLASS, since the silicon appears to be identical. For the
    OMAP3517/AM3517 family, create a new class, OMAP3517_CLASS.

    Thanks to Tony Lindgren for some help with the second
    revision of this patch.

    Signed-off-by: Paul Walmsley
    Cc: Sanjeev Premi
    Cc: Tony Lindgren
    Tested-by: Igor Grinberg
    Tested-by: Abhilash Koyamangalath

    Paul Walmsley
     

13 Sep, 2011

2 commits