1. 08 Apr, 2019 10 commits
  2. 05 Apr, 2019 4 commits
  3. 03 Apr, 2019 6 commits
    • Tony Lindgren's avatar
      bus: ti-sysc: Add quirk handling for external optional functional clock · a54275f4
      Tony Lindgren authored
      We cannot access mcpdm registers at all unless there is an optional pdmclk
      configured. As this is currently only needed for mcpdm, let's check for
      mcpdm in sysc_get_clocks(). If it turns out to be needed for other modules
      too, we can add more flags to the quirks table for this.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      a54275f4
    • Tony Lindgren's avatar
      bus: ti-sysc: Add support for early quirks based on register address · 42b9c5c9
      Tony Lindgren authored
      At least mcpdm needs an optional external clock enabled to function and
      this clock typically comes from the PMIC. We can detect mcpdm based on
      the interconnect target module address and set a quirk flag early.
      
      To do this, let's initialize the clocks a bit later and add a new
      function for sysc_init_early_quirks(). Note that we cannot yet enable
      the early quirks for mcpdm until the optional external clocks are
      handled in the in the following patch.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      42b9c5c9
    • Tony Lindgren's avatar
      bus: ti-sysc: Move rstctrl reset to happen later · b11c1ea1
      Tony Lindgren authored
      We can do the rsstctrl a bit later, but need to deassert rstctrl reset
      before the clocks are enabled if asserted. Let's only init restctrl
      in sysc_init_resets() and do the reset later on just before we enable
      the device clocks.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      b11c1ea1
    • Tony Lindgren's avatar
      bus: ti-sysc: Manage clocks for the interconnect target module in all cases · 93de83a2
      Tony Lindgren authored
      We are currently not managing interconnect target module clocks in the
      for legacy platform data based case. This causes a problem for using the
      platform data based functions when dropping the platform data for the
      interconnect target module configuration.
      
      To avoid a situation where we need to populate the main and optional
      clocks also for the platform data based functions, let's just manage the
      clocks directly in ti-sysc driver. This means that until the interconnect
      target module confugration platform data is dropped our use count for
      clk_enable() will be 2 instead of 1.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      93de83a2
    • Tony Lindgren's avatar
      bus: ti-sysc: Allocate mdata as needed and do platform data based init later · a3e92e7b
      Tony Lindgren authored
      The platform data based init functions typically reset the interconnect
      target module configure the registers. As we may need the interconnect
      target module specific quirks configured based on the revision register,
      we want to move the platform data based init to happen later.
      
      Let's allocate mdata as needed so it's available for sysc_legacy_init()
      that we call with module clocks enabled from sysc_init_module().
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      a3e92e7b
    • Tony Lindgren's avatar
      bus: ti-sysc: Enable all clocks directly during init to read revision · 1a5cd7c2
      Tony Lindgren authored
      The first thing we want to do is just read the module revision register to
      be able to configure the module specific quirks and configure the module
      registers.
      
      As the interconnect target module may not yet be properly configured and
      may need a reset first, we don't want to use pm_runtime_get() at this
      point.
      
      To read the revision register, let's just enable the all the clocks for
      the interconnect target module during init even if the optional clocks
      are not needed. That way we can read the revision register to configure
      the quirks needed for PM runtime.
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      1a5cd7c2
  4. 01 Apr, 2019 5 commits
  5. 26 Mar, 2019 8 commits
    • Tony Lindgren's avatar
      ARM: OMAP2+: Handle reset quirks for dynamically allocated modules · 8b30919a
      Tony Lindgren authored
      For dynamically allocated struct omap_hwmod data, we need to populate
      the device IP specific reset quirks.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      8b30919a
    • Tony Lindgren's avatar
      ARM: OMAP2+: Remove hwmod .rev data and use local SoC checks instead · 70451127
      Tony Lindgren authored
      We can just check for omap2 and 3 for i2c and smartreflex locally.
      The rest of the .rev data is already unused.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      70451127
    • Tony Lindgren's avatar
      ARM: OMAP2+: Allocate struct omap_hwmod based on dts data · b57250fa
      Tony Lindgren authored
      With ti-sysc interconnect target module, we can allocate struct omap_hwmod
      data based on the devicetree data. This allows dropping the static SoC
      specific data eventually so we will only boot with data we actually need.
      
      To allocate struct omap_hwmod dynamically, we need to add a mutex for
      modifying the list, and remove __init for few functions.
      
      Note that we are not initialized oh->_clk or the optional clocks and their
      related quirks. That can be directly handled by the interconnect target
      module driver.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      b57250fa
    • Tony Lindgren's avatar
      ARM: OMAP2+: Define _HWMOD_STATE_DEFAULT and use it · 6d63b12d
      Tony Lindgren authored
      For dynamically allocated struct hwmod entries probing with ti-sysc
      interconnect target module driver, we need to specify the initial default
      state the same way as we do for the platform data cases.
      
      Let's prepare for that by adding _HWMOD_STATE_DEFAULT that we can then
      use to set the initial default state without a need to add similar
      CONFIG_PM handling in multiple places.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      6d63b12d
    • Tony Lindgren's avatar
      ARM: OMAP2+: Prepare class allocation for dynamically allocated modules · 513a4abb
      Tony Lindgren authored
      For dynamically allocated sysconfig data we only need to allocate a new
      class for the cases where the class is shared. For dynamically allocated
      struct omap_hwmod we will always allocate a new class.
      
      Let's add detection for when we need to allocate a new class by comparing
      the class name against the module name. If they match, there's no need
      to allocate a new calls as we don't have case of mixed platform data and
      dts data initialized modules for the same class.
      
      Let's also move the init of class data inside the spinlock.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      513a4abb
    • Tony Lindgren's avatar
      ARM: OMAP2+: Make interconnect target module allocation functions static · 798bd175
      Tony Lindgren authored
      Only omap_hwmod_init_module() gets called, the rest of the interconnect
      target module allocation functions can be static.
      
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      798bd175
    • Tony Lindgren's avatar
      ARM: OMAP2+: Fix potentially uninitialized return value for _setup_reset() · 7f0d0786
      Tony Lindgren authored
      Commit 747834ab ("ARM: OMAP2+: hwmod: revise hardreset behavior") made
      the call to _enable() conditional based on no oh->rst_lines_cnt. This
      caused the return value to be potentially uninitialized. Curiously we see
      no compiler warnings for this, probably as this gets inlined.
      
      We call _setup_reset() from _setup() and only _setup_postsetup() if the
      return value is zero. Currently the return value can be uninitialized for
      cases where oh->rst_lines_cnt is set and HWMOD_INIT_NO_RESET is not set.
      
      Fixes: 747834ab ("ARM: OMAP2+: hwmod: revise hardreset behavior")
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7f0d0786
    • Tony Lindgren's avatar
      ARM: dts: Fix dcan clkctrl clock for am3 · 7d56bedb
      Tony Lindgren authored
      We must not use legacy clock defines for dts clckctrl clocks as the offsets
      will be wrong.
      
      Fixes: 87fc89ce ("ARM: dts: am335x: Move l4 child devices to probe them with ti-sysc")
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      7d56bedb
  6. 17 Mar, 2019 7 commits