29 Aug, 2018

1 commit


22 Aug, 2018

1 commit


17 Aug, 2018

1 commit

  • We can have the interconnect target module control registers pretty
    much anywhere within the module range. The current code attempts an
    incomplete optimization of the ioremap size but does it wrong and
    it only works for registers at the beginning of the module.

    Let's just use the largest control register to calculate the ioremap
    size. The ioremapped range is for most part cached anyways so there
    is no need for size optimization. Let's also update the comments
    accordingly.

    Fixes: 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect
    target driver")
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     

10 Jul, 2018

2 commits


02 Jul, 2018

1 commit


18 May, 2018

1 commit

  • We should be checking ddata->clocks[i] instead of clock_names[i]
    for the optional clocks. Currently this just happens to work for
    the typical case of one fck and one optional clock.

    Fixes: 09dfe5810762 ("bus: ti-sysc: Add handling for clkctrl opt clocks")
    Cc: Dan Carpenter
    Reported-by: Dan Carpenter
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     

01 May, 2018

10 commits


07 Mar, 2018

1 commit

  • …inux/kernel/git/tmlind/linux-omap into next/soc

    Pull "Driver changes for ti-sysc for v4.17" from Tony Lindgren:

    This series of changes enables the use device tree based sysconfig
    data for ti-sysc driver. As we already have SmartReflex data configured,
    we use that as the first driver to enable. To do that in a way where
    SmartReflex is not probed twice, we need to prepare the SmartReflex
    driver before flipping dts data on for it in the last patch of the
    series.

    To avoid regressions, we are checking the passed dts data against
    existing platform data since we still have it available. Then after the
    dts files are converted, we can simply drop the related platform data
    at some point in the future.

    * tag 'omap-for-v4.17/ti-sysc-signed' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: OMAP2+: Enable ti-sysc to use device tree data for smartreflex
    PM / AVS: SmartReflex: Prepare to use device tree based probing
    ARM: OMAP2+: Try to parse earlycon from parent too
    ARM: OMAP2+: Add checks for device tree based sysconfig data
    ARM: OMAP2+: Add functions to allocate module data from device tree
    bus: ti-sysc: Handle some devices in omap_device compatible way
    bus: ti-sysc: Add support for platform data callbacks
    bus: ti-sysc: Remove unnecessary debugging statements
    bus: ti-sysc: Improve handling for no-reset-on-init and no-idle-on-init
    bus: ti-sysc: Handle stdout-path for debug console
    bus: ti-sysc: Add suspend and resume handling
    bus: ti-sysc: Add fck clock alias for children with notifier_block
    ARM: OMAP2+: Prepare to pass auxdata for smartreflex

    Arnd Bergmann
     

27 Feb, 2018

7 commits

  • Now that ti-sysc can manage child devices, we must also be backwards
    compatible with the current omap_device code. With omap_device, we
    assume that the child device manages the interconnect target module
    directly.

    The drivers needing special handling are the ones that still set
    pm_runtime_irq_safe(). In the long run we want to update those drivers
    as otherwise they will cause problems with genpd as a permanent PM
    runtime usage count is set on the parent device.

    We can handle omap_device these devices by improving the ti-sysc quirk
    handling to detect the devices needing special handling based on
    register map and revision register if usable. We also need to implement
    dev_pm_domain for these child devices just like omap_device does.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • We want to pass the device tree configuration for interconnect target
    modules from ti-sysc driver to the existing platform hwmod code.

    This allows us to first validate the dts data against the existing
    platform data before we start dropping the platform data in favor of
    device tree data.

    To do this, let's add platform data callbacks for PM runtime functions
    to call for the interconnect target modules if platform data is
    available.

    Note that as ti-sysc driver can rebind, omap_auxdata_lookup and related
    functions can no longer be __init.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • We already show the status for the interconnect target module
    when debugging is enabled, there's no need to be more verbose
    about that. So let's just cut down the noise and remove the
    extra debug statements.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • At least earlycon needs a delayed idle before the 8250 driver probes
    to avoid glitches in the console output. Let's handle the delayed idle
    for devices tagged with ti,no-reset-on-init and ti,no-idle-on-init with
    delayed_work. Others don't need it, and there should be no need to use
    runtime PM autosuspend for the interconnect target driver as it's the
    child device drivers that should configure it.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • If we have stdout-path specified for earlycon, we must prevent
    the debug console from idling until runtime PM kicks in.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • This allows us to idle the module on suspend after the children
    are suspended.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • The functional clock is used by several child device drivers to query
    the rate for the child device internal configuration. The functional
    clock is really for the whole interconnect target module, and not just
    for the child device, and can also be shared across multiple children.
    At least the timers, i2c and mmc driver query the fck for rate.

    So let's just create a clock alias for the child fck if it does not
    yet exits. We can do this with the BUS_NOTIFY_ADD_DEVICE before the
    child is probed.

    Note that we need to now also remove the legacy mode check for getting
    the dts clocks in ti-sysc driver.

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     

16 Feb, 2018

1 commit


23 Jan, 2018

1 commit


21 Dec, 2017

4 commits


14 Oct, 2017

2 commits

  • Looks like we're missing remove() that's needed if a driver instance
    rebound. Otherwise we will get "Unbalanced pm_runtime_enable!".

    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • The new bus driver causes a harmless compile-time warning when
    CONFIG_PM is disabled:

    drivers/bus/ti-sysc.c:440:12: error: 'sysc_runtime_resume' defined but not used [-Werror=unused-function]
    static int sysc_runtime_resume(struct device *dev)
    ^~~~~~~~~~~~~~~~~~~
    drivers/bus/ti-sysc.c:421:12: error: 'sysc_runtime_suspend' defined but not used [-Werror=unused-function]
    static int sysc_runtime_suspend(struct device *dev)
    ^~~~~~~~~~~~~~~~~~~~

    This marks the two unused functions as __maybe_unused to shut up
    that warning.

    Fixes: 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver")
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Tony Lindgren

    Arnd Bergmann
     

11 Oct, 2017

1 commit

  • We can handle the sysc interconnect target module in a generic way
    for many TI SoCs. Initially let's just enable runtime PM with
    autosuspend, and probe the children. This can already be used for
    idling interconnect target modules that don't have any device driver
    available for the child devices.

    For now, the "ti,hwmods" custom binding is still required. That will
    be eventually deprecated in later patches. And more features will be
    added, such as parsing for sysc capabilities so we can continue
    removing the legacy platform data.

    Cc: Benoît Cousson
    Cc: Greg Kroah-Hartman
    Cc: Laurent Pinchart
    Cc: Nishanth Menon
    Cc: Matthijs van Duin
    Cc: Paul Walmsley
    Cc: Peter Ujfalusi
    Cc: Sakari Ailus
    Cc: Tero Kristo
    Cc: Tomi Valkeinen
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Tony Lindgren

    Tony Lindgren