u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] bootstage: Migrate from timer_get_boot_us() to timer_get_us()
@ 2022-09-21 14:06 Stefan Roese
  2022-09-21 14:06 ` [PATCH 01/10] arm: arch_timer: Add timer_early functions Stefan Roese
                   ` (9 more replies)
  0 siblings, 10 replies; 33+ messages in thread
From: Stefan Roese @ 2022-09-21 14:06 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, trini

While working on the bootstage support for Armada XP (orion-timer)
I noticed, that we currently have two API's supporting early timer
functionality. These are:

a) timer_early_get_rate() & timer_early_get_count() which integrates
   into the "normal" timer functions like timer_get() & timer_get_us()
   in the early boot phase, if CONFIG_TIMER_EARLY is enabled
b) timer_get_boot_us(), which was introduced with bootstage IIUTC

IMHO it makes more sense to not introduce a new API for this early
timer functionality but re-use the "normal" API instead. This patchset
migrates the timer_get_boot_us() implementations to the timer_early
functions. This is done by:

- Implementing the timer_early functions in the drivers currently
  supporting timer_get_boot_us()
- Migrating bootcount to using timer_get_us() instead of
  timer_get_boot_us()
- Completely removing timer_get_boot_us()

With some minor tweaks in board_r/f for the dm_timer_init() and
timer_init() call.

I've tested this on Armada XP and sandbox.

Thanks,
Stefan

Stefan Roese (10):
  arm: arch_timer: Add timer_early functions
  arm: imx: syscounter: Add timer_early functions
  arm: armv8: generic_timer: Add timer_early functions
  timer: cadence-ttc: Add timer_early functions
  timer: omap-timer: Add timer_early functions
  timer: rockchip_timer: Add timer_early functions
  board_f/r: Allow selection of CONFIG_TIMER_EARLY w/o CONFIG_TIMER
  board_f/r: Don't call timer_init() when TIMER is enabled
  bootstage: Migrate from timer_get_boot_us() to timer_get_us()
  bootstage/timer: Treewide remove timer_get_boot_us()

 arch/arm/cpu/armv7/arch_timer.c    | 15 ++++++++---
 arch/arm/cpu/armv8/generic_timer.c |  9 ++++---
 arch/arm/mach-imx/syscounter.c     | 12 +++++++--
 arch/sandbox/cpu/cpu.c             | 11 --------
 boot/Kconfig                       |  1 +
 common/board_f.c                   |  4 +--
 common/board_r.c                   |  5 ++--
 common/bootstage.c                 | 26 +++++++++---------
 drivers/timer/Kconfig              |  1 -
 drivers/timer/cadence-ttc.c        |  9 ++++---
 drivers/timer/omap-timer.c         |  9 ++++---
 drivers/timer/orion-timer.c        |  8 ------
 drivers/timer/rockchip_timer.c     | 42 ++++++++++++++++--------------
 drivers/timer/tsc_timer.c          |  5 ----
 include/bootstage.h                | 17 ++++--------
 lib/time.c                         | 20 --------------
 16 files changed, 87 insertions(+), 107 deletions(-)

-- 
2.37.3


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-10-05  6:59 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-21 14:06 [PATCH 00/10] bootstage: Migrate from timer_get_boot_us() to timer_get_us() Stefan Roese
2022-09-21 14:06 ` [PATCH 01/10] arm: arch_timer: Add timer_early functions Stefan Roese
2022-09-25 14:15   ` Simon Glass
2022-09-21 14:06 ` [PATCH 02/10] arm: imx: syscounter: " Stefan Roese
2022-09-25 14:15   ` Simon Glass
2022-09-21 14:06 ` [PATCH 03/10] arm: armv8: generic_timer: " Stefan Roese
2022-09-25 14:15   ` Simon Glass
2022-09-21 14:06 ` [PATCH 04/10] timer: cadence-ttc: " Stefan Roese
2022-09-25 14:15   ` Simon Glass
2022-09-26 14:11     ` Stefan Roese
2022-09-28  1:54       ` Simon Glass
2022-09-30 12:02         ` Michal Simek
2022-09-30 13:45           ` Stefan Roese
2022-10-04 11:49             ` Michal Simek
2022-10-04 14:54               ` Stefan Roese
2022-10-04 16:29               ` Simon Glass
2022-10-05  6:59                 ` Michal Simek
2022-09-21 14:06 ` [PATCH 05/10] timer: omap-timer: " Stefan Roese
2022-09-21 14:06 ` [PATCH 06/10] timer: rockchip_timer: " Stefan Roese
2022-09-24  7:57   ` Kever Yang
2022-09-21 14:06 ` [PATCH 07/10] board_f/r: Allow selection of CONFIG_TIMER_EARLY w/o CONFIG_TIMER Stefan Roese
2022-09-25 14:15   ` Simon Glass
2022-09-26 13:52     ` Stefan Roese
2022-09-28  1:54       ` Simon Glass
2022-09-30  5:36         ` Stefan Roese
2022-09-30 13:28           ` Simon Glass
2022-09-30 13:52             ` Stefan Roese
2022-09-21 14:06 ` [PATCH 08/10] board_f/r: Don't call timer_init() when TIMER is enabled Stefan Roese
2022-09-21 14:06 ` [PATCH 09/10] bootstage: Migrate from timer_get_boot_us() to timer_get_us() Stefan Roese
2022-09-28 10:20   ` Simon Glass
2022-09-30 11:30   ` Michal Simek
2022-09-21 14:06 ` [PATCH 10/10] bootstage/timer: Treewide remove timer_get_boot_us() Stefan Roese
2022-09-25 14:15   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).