1. 28 May, 2020 2 commits
  2. 25 May, 2020 7 commits
  3. 20 May, 2020 4 commits
  4. 19 May, 2020 13 commits
    • Tony Lindgren's avatar
      bus: ti-sysc: Timers no longer need legacy quirk handling · 1a542811
      Tony Lindgren authored
      As timers no longer need legacy quirk handling, let's move them to
      the CONFIG_DEBUG section to make it easier to see which drivers still
      need more work.
      
      Let's also add detection for few more older timer revisions while at
      it as that makes CONFIG_DEBUG output easier to read with proper names.
      
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      1a542811
    • Tony Lindgren's avatar
      ARM: OMAP2+: Drop old timer code for dmtimer and 32k counter · 2ee04b88
      Tony Lindgren authored
      With dmtimer and 32k counter being initialized based on devicetree data,
      we can just drop the old timer code.
      
      This still leaves the omap5 and dra7 realtime_counter_init() that
      depend on the smc calls and control module platform code for the dra7
      quirk init.
      
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      2ee04b88
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for omap2 · 64dbc3d5
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Let's also update the dts file to use #include while at it.
      
      Cc: devicetree@vger.kernel.org
      Cc: Aaro Koskinen <aaro.koskinen@iki.fi>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      64dbc3d5
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for ti81xx · 83bd18b4
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Note that for ti81xx, also timer1 is of type 2 unlike on am335x
      where timer1 is type1 while the rest of the timers are type 2.
      
      Cc: devicetree@vger.kernel.org
      Cc: Brian Hutchinson <b.hutchman@gmail.com>
      Cc: Graeme Smecher <gsmecher@threespeedlogic.com>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      83bd18b4
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for omap3 · e428e250
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Let's also update the dts file to use #include while at it.
      
      Cc: devicetree@vger.kernel.org
      Cc: Adam Ford <aford173@gmail.com>
      Cc: Andreas Kemnade <andreas@kemnade.info>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: "H. Nikolaus Schaller" <hns@goldelico.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      e428e250
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for omap5 and dra7 · 036a3d42
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Note that similar to omap_init_time_of(), we now need to call
      omap_clk_init() also from omap5_realtime_timer_init().
      
      Cc: devicetree@vger.kernel.org
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      036a3d42
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for omap4 · 14b1925a
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Cc: devicetree@vger.kernel.org
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      14b1925a
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for am437x · 545a9558
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Cc: devicetree@vger.kernel.org
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      545a9558
    • Tony Lindgren's avatar
      ARM: dts: Configure system timers for am335x · e20ef23d
      Tony Lindgren authored
      We can now init system timers using the dmtimer and 32k counter
      based on only devicetree data and drivers/clocksource timers.
      Let's configure the clocksource and clockevent, and drop the old
      unused platform data.
      
      As we're just dropping platform data, and the early platform data
      init is based on the custom ti,hwmods property, we want to drop
      both the platform data and ti,hwmods property in a single patch.
      
      Since the dmtimer can use both 32k clock and system clock as the
      source, let's also configure the SoC specific default values. The
      board specific dts files can reconfigure these with assigned-clocks
      and assigned-clock-parents as needed.
      
      Cc: devicetree@vger.kernel.org
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      e20ef23d
    • Tony Lindgren's avatar
      ARM: OMAP2+: Add omap_init_time_of() · e69b4e1a
      Tony Lindgren authored
      This allows us to move the SoCs to probe system timers one SoC
      at at time. As arch/arm/mach-omap2/timer.c will be eventually gone,
      let's just add omap_init_time_of() to board-generic.c directly.
      
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      e69b4e1a
    • Tony Lindgren's avatar
      bus: ti-sysc: Ignore timer12 on secure omap3 · 4bba9bf0
      Tony Lindgren authored
      Some early omap3 boards use timer12 for system timer, but for secure
      SoCs like on n900 it's not accessible. Likely we will be configuring
      unavailable devices for other SoCs too based on runtime SoC detection,
      so let's use a switch to start with.
      
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      4bba9bf0
    • Tony Lindgren's avatar
      clk: ti: dm816: enable sysclk6_ck on init · 16aed29d
      Tony Lindgren authored
      We need sysclk6_ck enabled early as it is needed by l4_ls and system
      timers early on boot. This removes the dependency of system timers to
      the interconnect related code that can be then probed later on when
      suitable at module_init time.
      
      Cc: linux-clk@vger.kernel.org
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Michael Turquette <mturquette@baylibre.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Stephen Boyd <sboyd@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      16aed29d
    • Tony Lindgren's avatar
      clocksource/drivers/timer-ti-dm: Fix warning for set but not used · 6d15120b
      Tony Lindgren authored
      We can get a warning for dmtimer_clocksource_init() with 'pa' set but
      not used. This was used in the earlier revisions of the code but no
      longer needed, so let's remove the unused pa and of_translate_address().
      Let's also do it for dmtimer_clockevent_init() that has a similar issue.
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200519155157.12804-1-tony@atomide.com
      6d15120b
  5. 18 May, 2020 2 commits
    • Tony Lindgren's avatar
      clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support · aba1ad05
      Tony Lindgren authored
      We can move the TI dmtimer clockevent and clocksource to live under
      drivers/clocksource if we rely only on the clock framework, and handle
      the module configuration directly in the clocksource driver based on the
      device tree data.
      
      This removes the early dependency with system timers to the interconnect
      related code, and we can probe pretty much everything else later on at
      the module_init level.
      
      Let's first add a new driver for timer-ti-dm-systimer based on existing
      arch/arm/mach-omap2/timer.c. Then let's start moving SoCs to probe with
      device tree data while still keeping the old timer.c. And eventually we
      can just drop the old timer.c.
      
      Let's take the opportunity to switch to use readl/writel as pointed out
      by Daniel Lezcano <daniel.lezcano@linaro.org>. This allows further
      clean-up of the timer-ti-dm code the a lot of the shared helpers can
      just become static to the non-syster related code.
      
      Note the boards can optionally configure different timer source clocks
      if needed with assigned-clocks and assigned-clock-parents.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200507172330.18679-3-tony@atomide.com
      aba1ad05
    • Tony Lindgren's avatar
      clocksource/drivers/timer-ti-32k: Add support for initializing directly · d15483bb
      Tony Lindgren authored
      Let's allow probing the 32k counter directly based on devicetree data to
      prepare for dropping the related legacy platform code. Let's only do this
      if the parent node is compatible with ti-sysc to make sure we have the
      related devicetree data available.
      
      Let's also show the 32k counter information before registering the
      clocksource, now we see it after the clocksource information which is a
      bit confusing.
      
      Cc: linux-kernel@vger.kernel.org
      Cc: linux-omap@vger.kernel.org
      Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
      Cc: Grygorii Strashko <grygorii.strashko@ti.com>
      Cc: Keerthy <j-keerthy@ti.com>
      Cc: Lokesh Vutla <lokeshvutla@ti.com>
      Cc: Rob Herring <robh@kernel.org>
      Cc: Tero Kristo <t-kristo@ti.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
      Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200507172330.18679-2-tony@atomide.com
      d15483bb
  6. 17 May, 2020 1 commit
  7. 15 May, 2020 11 commits