imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] m68k: coldfire: Add RNG support and const qualifiers for MCF54418
@ 2025-11-07 10:29 Jean-Michel Hautbois
  2025-11-07 10:29 ` [PATCH v2 1/2] m68k: coldfire: Mark platform device resource arrays as const Jean-Michel Hautbois
  2025-11-07 10:29 ` [PATCH v2 2/2] m68k: coldfire: Add RNG support for MCF54418 Jean-Michel Hautbois
  0 siblings, 2 replies; 10+ messages in thread
From: Jean-Michel Hautbois @ 2025-11-07 10:29 UTC (permalink / raw)
  To: Greg Ungerer, Geert Uytterhoeven, Olivia Mackall, Herbert Xu,
	Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam
  Cc: linux-m68k, linux-kernel, linux-crypto, imx, linux-arm-kernel,
	Jean-Michel Hautbois, Frank Li

This series adds support for the MCF54418 hardware random number generator
(RNGB) and improves type safety for platform device resources.

The MCF54418 contains an RNGB hardware block compatible with the imx-rngc
driver. This series enables its use by:
- Adding platform device registration for the RNG hardware
- Enabling the clock at platform initialization
- Making the imx-rngc driver compatible with Coldfire's always-on clock
model using devm_clk_get_optional()

Additionally, following Frank Li's suggestion, all static resource array
in arch/m68k/coldfire/device.c are marked const, moving them to read-only
memory and aligning with kernel API expectations.

Testing on DLC Next board shows:
- Hardware RNG throughput: 26 MB/s
- FIPS 140-2 quality: 0.2% failure rate (rng-tools)
- Boot time improvement: CRNG initialization 7 seconds faster

Changes since v1:
- Split const qualifier changes into a separate patch as suggested by
Frank Li
- Mark all resource arrays (including RNG) as const in device.c
- No functional changes to RNG implementation

Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
---
Jean-Michel Hautbois (2):
      m68k: coldfire: Mark platform device resource arrays as const
      m68k: coldfire: Add RNG support for MCF54418

 arch/m68k/coldfire/device.c       | 52 ++++++++++++++++++++++++++++++---------
 arch/m68k/coldfire/m5441x.c       |  2 +-
 arch/m68k/include/asm/m5441xsim.h |  9 +++++++
 drivers/char/hw_random/Kconfig    |  3 ++-
 drivers/char/hw_random/imx-rngc.c |  9 ++++++-
 5 files changed, 60 insertions(+), 15 deletions(-)
---
base-commit: 5e5629c7ce42cfa1da9c6aaaa6d7aff0d396c46e
change-id: 20251107-b4-m5441x-add-rng-support-0fdb8d40210a

Best regards,
-- 
Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>


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

end of thread, other threads:[~2025-11-10  9:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 10:29 [PATCH v2 0/2] m68k: coldfire: Add RNG support and const qualifiers for MCF54418 Jean-Michel Hautbois
2025-11-07 10:29 ` [PATCH v2 1/2] m68k: coldfire: Mark platform device resource arrays as const Jean-Michel Hautbois
2025-11-07 16:02   ` Frank Li
2025-11-08  8:43     ` Jean-Michel Hautbois
2025-11-07 10:29 ` [PATCH v2 2/2] m68k: coldfire: Add RNG support for MCF54418 Jean-Michel Hautbois
2025-11-07 16:07   ` Frank Li
2025-11-08  8:44     ` Jean-Michel Hautbois
2025-11-10  8:15   ` Geert Uytterhoeven
2025-11-10  8:34     ` Jean-Michel Hautbois
2025-11-10  9:31       ` Geert Uytterhoeven

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).