public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH 00/13] disentangling cyclic API from schedule()
@ 2024-10-03 21:27 Rasmus Villemoes
  2024-10-03 21:27 ` [PATCH 01/13] doc: cyclic: remove reference to WATCHDOG_RESET Rasmus Villemoes
                   ` (14 more replies)
  0 siblings, 15 replies; 44+ messages in thread
From: Rasmus Villemoes @ 2024-10-03 21:27 UTC (permalink / raw)
  To: u-boot; +Cc: Stefan Roese, Tom Rini, Rasmus Villemoes

These patches are part of a longer-term plan to properly deal with the
HW_WATCHDOG vs WATCHDOG dichotomy, and getting rid of the legacy
HW_WATCHDOG concept completely. As part of that, clean up which
headers include other headers.

While schedule(), the artist formerly known as WATCHDOG_RESET(), is
obviously called all over the tree, very few TUs make use of the
cyclic API (cyclic_register etc.). And there's really no reason at all
for global_data.h to include cyclic.h - except that some places
implicitly rely on getting their declaration of schedule() through
that include.

So this introduces a separate mostly trivial header that just serves
to declare schedule(). Then we can get rid of things that include
cyclic.h just to get that declaration.

A next, mostly mechanical step, could be to change almost all includes
of watchdog.h (which most TUs that used to have a WATCHDOG_RESET()
invocation has) to u-boot/schedule.h, because again, most of those TUs
are not really concerned with implementing init_func_watchdog_init or
need to call it. But that is for later.

CI seems happy: https://github.com/u-boot/u-boot/pull/673

Rasmus Villemoes (13):
  doc: cyclic: remove reference to WATCHDOG_RESET
  cyclic: introduce u-boot/schedule.h
  led: include cyclic.h in led_sw_blink.c
  m68k: asm/ptrace.h: include linux/types.h
  fs/cramfs: use schedule instead of cyclic_run as callback
  test: dm: wdt: replace cyclic_run() by schedule()
  cyclic: make cyclic_run static
  watchdog.h: change include of cyclic.h to u-boot/schedule.h
  lib/sha*: include u-boot/schedule.h instead of cyclic.h
  i2c: rzg2l: include u-boot/schedule.h
  ddr: altera: include u-boot/schedule.h
  boot: cedit: include u-boot/schedule.h
  global_data.h: remove unnecesary include of cyclic.h

 arch/m68k/include/asm/ptrace.h    |  2 ++
 boot/cedit.c                      |  1 +
 common/cyclic.c                   |  3 ++-
 doc/develop/cyclic.rst            | 10 +++++-----
 drivers/ddr/altera/sdram_n5x.c    |  1 +
 drivers/ddr/altera/sdram_soc64.c  |  1 +
 drivers/i2c/rz_riic.c             |  1 +
 drivers/led/led_sw_blink.c        |  1 +
 fs/cramfs/uncompress.c            |  4 ++--
 include/asm-generic/global_data.h |  1 -
 include/cyclic.h                  | 24 +-----------------------
 include/u-boot/schedule.h         | 24 ++++++++++++++++++++++++
 include/watchdog.h                |  2 +-
 lib/sha1.c                        |  2 +-
 lib/sha256.c                      |  2 +-
 lib/sha512.c                      |  2 +-
 test/dm/wdt.c                     | 10 +++++-----
 17 files changed, 50 insertions(+), 41 deletions(-)
 create mode 100644 include/u-boot/schedule.h

-- 
2.46.2


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

end of thread, other threads:[~2024-10-23 10:53 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-03 21:27 [PATCH 00/13] disentangling cyclic API from schedule() Rasmus Villemoes
2024-10-03 21:27 ` [PATCH 01/13] doc: cyclic: remove reference to WATCHDOG_RESET Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:10   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 02/13] cyclic: introduce u-boot/schedule.h Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-09 11:08     ` Rasmus Villemoes
2024-10-09 21:13       ` Simon Glass
2024-10-22 11:11   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 03/13] led: include cyclic.h in led_sw_blink.c Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:11   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 04/13] m68k: asm/ptrace.h: include linux/types.h Rasmus Villemoes
2024-10-04 17:14   ` Tom Rini
2024-10-22 11:11   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 05/13] fs/cramfs: use schedule instead of cyclic_run as callback Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:11   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 06/13] test: dm: wdt: replace cyclic_run() by schedule() Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:12   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 07/13] cyclic: make cyclic_run static Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:12   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 08/13] watchdog.h: change include of cyclic.h to u-boot/schedule.h Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:12   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 09/13] lib/sha*: include u-boot/schedule.h instead of cyclic.h Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:13   ` Stefan Roese
2024-10-03 21:27 ` [PATCH 10/13] i2c: rzg2l: include u-boot/schedule.h Rasmus Villemoes
2024-10-09  1:55   ` Simon Glass
2024-10-22 11:13   ` Stefan Roese
2024-10-03 21:28 ` [PATCH 11/13] ddr: altera: " Rasmus Villemoes
2024-10-09  1:52   ` Simon Glass
2024-10-22 11:13   ` Stefan Roese
2024-10-03 21:28 ` [PATCH 12/13] boot: cedit: " Rasmus Villemoes
2024-10-09  1:51   ` Simon Glass
2024-10-22 11:13   ` Stefan Roese
2024-10-03 21:28 ` [PATCH 13/13] global_data.h: remove unnecesary include of cyclic.h Rasmus Villemoes
2024-10-04 17:15   ` Tom Rini
2024-10-22 11:14   ` Stefan Roese
2024-10-04 11:20 ` [PATCH 00/13] disentangling cyclic API from schedule() Stefan Roese
2024-10-23 10:53 ` Stefan Roese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox