[PATCH] m68k: coldfire: Add RNG support for MCF54418

Jean-Michel Hautbois jeanmichel.hautbois at yoseli.org
Thu Nov 6 10:16:17 PST 2025


Hi Frank,

Le jeudi 6 novembre 2025, 17:05:15 heure normale d’Europe centrale Frank Li a 
écrit :
> On Thu, Nov 06, 2025 at 08:10:08AM +0100, Jean-Michel Hautbois wrote:
> > Add platform device support for the MCF54418 RNGB hardware with clock
> > enabled at platform initialization.
> > 
> > The imx-rngc driver now uses devm_clk_get_optional() to support both
> > Coldfire (always-on clock) and i.MX platforms (managed clock).
> > 
> > Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois at yoseli.org>
> > ---
> > 
> >  arch/m68k/coldfire/device.c       | 28 ++++++++++++++++++++++++++++
> >  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, 48 insertions(+), 3 deletions(-)
> > 
> > diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c
> > index
> > b6958ec2a220cf91a78a14fc7fa18749451412f7..9d8f844e319a98f0afb79cceb544c2d
> > 3029482a4 100644 --- a/arch/m68k/coldfire/device.c
> > +++ b/arch/m68k/coldfire/device.c
> > @@ -622,6 +622,31 @@ static struct platform_device mcf_flexcan0 = {
> > 
> >  };
> >  #endif /* MCFFLEXCAN_SIZE */
> > 
> > +#ifdef MCF_RNG_BASE
> > +/*
> > + * Random Number Generator (RNG) - only on MCF54418
> > + */
> > +static struct resource mcf_rng_resource[] = {
> 
> const?

Why not, but I wanted to be consistent with all the other structures in this 
file.

JM

> Frank
> 
> > +	{
> > +		.start = MCF_RNG_BASE,
> > +		.end   = MCF_RNG_BASE + MCF_RNG_SIZE - 1,
> > +		.flags = IORESOURCE_MEM,
> > +	},
> > +	{
> > +		.start = MCF_IRQ_RNG,
> > +		.end   = MCF_IRQ_RNG,
> > +		.flags = IORESOURCE_IRQ,
> > +	},
> > +};
> 
> ...







More information about the linux-arm-kernel mailing list