[PATCH 1/2] riscv: create a custom CPU implementation for PolarFire SoC
Jamie.Gibbons at microchip.com
Jamie.Gibbons at microchip.com
Mon Dec 8 13:10:28 CET 2025
Hi Leo,
On Thu, 2025-12-04 at 15:45 +0800, Leo Liang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know
> the content is safe
>
> Hi Jamie,
>
> On Wed, Nov 19, 2025 at 12:38:42PM +0000, Jamie Gibbons wrote:
> > [EXTERNAL MAIL]
> >
> > From: Conor Dooley <conor.dooley at microchip.com>
> >
> > PolarFire SoC needs a custom implementation of top_of_ram(), so stop
> > using the generic CPU & create a custom CPU instead.
> >
> > Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
> > ---
> > arch/riscv/Kconfig | 1 +
> > arch/riscv/cpu/mpfs/Kconfig | 16 +++++++++++
> > arch/riscv/cpu/mpfs/Makefile | 6 ++++
> > arch/riscv/cpu/mpfs/cpu.c | 22 +++++++++++++++
> > arch/riscv/cpu/mpfs/dram.c | 38
> > ++++++++++++++++++++++++++
> > arch/riscv/include/asm/arch-mpfs/clk.h | 8 ++++++
> > board/microchip/mpfs_generic/Kconfig | 4 +--
> > 7 files changed, 93 insertions(+), 2 deletions(-)
> > create mode 100644 arch/riscv/cpu/mpfs/Kconfig
> > create mode 100644 arch/riscv/cpu/mpfs/Makefile
> > create mode 100644 arch/riscv/cpu/mpfs/cpu.c
>
> The cpu.c file only contains "cleanup_before_linux" and seems
> identical
> with the one provided in arch/riscv/cpu/generic/cpu.c.
>
> Other than that, LGTM.
>
> If you don't mind, I could fix this on my side that you don't need to
> resend the patchset again.
>
> Reviewed-by: Leo Yu-Chi Liang <ycliang at andestech.com>
Thank you for your response, review and feedback.
Regarding 'mpfs/cpu.c', you're corect that it is currently identical to
the generic implementation. Our intent was to provide a placeholder for
any future Polarfire-specific logic and also assumed it was manditory,
but if duplication is unneccessary, I'm happy for you to adjust as you
see fit.
In other words, if U-Boot prefers to avoid duplication and this file is
not mandatory for build or architextural reasons per CPU implementation,
than please go ahead and use the generic version.
Thanks,
Jamie.
More information about the U-Boot
mailing list