[U-Boot] [PATCH v4 3/3] arm: meson: implement calls to secure monitor
Alexander Graf
agraf at suse.de
Sun Apr 17 11:48:34 CEST 2016
> Am 17.04.2016 um 09:48 schrieb Beniamino Galvani <b.galvani at gmail.com>:
>
> Implement calls to the secure monitor to reset the board and read the
> MAC address from e-fuse.
>
> Signed-off-by: Beniamino Galvani <b.galvani at gmail.com>
> ---
> arch/arm/include/asm/arch-meson/sm.h | 13 +++++++
> arch/arm/mach-meson/Makefile | 2 +-
> arch/arm/mach-meson/board.c | 3 +-
> arch/arm/mach-meson/sm.c | 71 ++++++++++++++++++++++++++++++++++
> board/hardkernel/odroid-c2/odroid-c2.c | 16 ++++++++
> 5 files changed, 103 insertions(+), 2 deletions(-)
> create mode 100644 arch/arm/include/asm/arch-meson/sm.h
> create mode 100644 arch/arm/mach-meson/sm.c
>
> diff --git a/arch/arm/include/asm/arch-meson/sm.h b/arch/arm/include/asm/arch-meson/sm.h
> new file mode 100644
> index 0000000..87134c6
> --- /dev/null
> +++ b/arch/arm/include/asm/arch-meson/sm.h
> @@ -0,0 +1,13 @@
> +/*
> + * (C) Copyright 2016 - Beniamino Galvani <b.galvani at gmail.com>
> + *
> + * SPDX-License-Identifier: GPL-2.0+
> + */
> +
> +#ifndef __MESON_SM_H__
> +#define __MESON_SM_H__
> +
> +void meson_sm_reboot(void);
> +ssize_t meson_sm_read_efuse(uintptr_t offset, void *buffer, size_t size);
> +
> +#endif /* __MESON_SM_H__ */
> diff --git a/arch/arm/mach-meson/Makefile b/arch/arm/mach-meson/Makefile
> index 44e3d63..bf49b8b 100644
> --- a/arch/arm/mach-meson/Makefile
> +++ b/arch/arm/mach-meson/Makefile
> @@ -4,4 +4,4 @@
> # SPDX-License-Identifier: GPL-2.0+
> #
>
> -obj-y += board.o
> +obj-y += board.o sm.o
> diff --git a/arch/arm/mach-meson/board.c b/arch/arm/mach-meson/board.c
> index 05f4c79..6272f2f 100644
> --- a/arch/arm/mach-meson/board.c
> +++ b/arch/arm/mach-meson/board.c
> @@ -8,6 +8,7 @@
> #include <libfdt.h>
> #include <linux/err.h>
> #include <asm/arch/gxbb.h>
> +#include <asm/arch/sm.h>
> #include <asm/armv8/mmu.h>
> #include <asm/unaligned.h>
>
> @@ -42,7 +43,7 @@ void dram_init_banksize(void)
>
> void reset_cpu(ulong addr)
> {
> - /* Not implemented yet */
> + meson_sm_reboot();
Shouldn't reboot be available as psci call? We could then have a generic reset function for systems with working psci in atf.
Alex
More information about the U-Boot
mailing list