[PATCH v4] arm64: versal: Add SelectMAP boot mode identification

Michal Simek michal.simek at amd.com
Mon Oct 9 12:17:25 CEST 2023



On 10/8/23 16:34, Polak, Leszek wrote:
> The SelectMAP configuration interface provides an 8-bit,
> 16-bit or 32-bit bidirectional data bus interface to the Versal FPGA
> configuration logic that can be used for both configuration and readback.
> 
> A connected microcontoller to the SelectMAP interface can load boot
> image with bitstream, TF-A (ARM Trusted Firmware) and U-Boot.
> 
> This commit adds the missing identification of the SelectMAP mode.
> 
> Signed-off-by: Polak, Leszek <LPolak at arri.de>
> Reviewed-by: Stefan Roese <sr at denx.de>
> Cc: Michal Simek <michal.simek at amd.com>
> Cc: Stefan Roese <sr at denx.de>
> ---
> v2:
> - Drop assignment of 'mode' as selectmap is not be supported
>    by distro boot
> v3:
> - Changed E-Mail/Name to be the same as git setup
> v4:
> - Fixed formatting
> ---
>   arch/arm/mach-versal-net/include/mach/hardware.h | 1 +
>   arch/arm/mach-versal/include/mach/hardware.h     | 1 +
>   board/xilinx/versal-net/board.c                  | 3 +++
>   board/xilinx/versal/board.c                      | 4 ++++
>   4 files changed, 9 insertions(+)
> 
> diff --git a/arch/arm/mach-versal-net/include/mach/hardware.h b/arch/arm/mach-versal-net/include/mach/hardware.h
> index 9bddb8b007..767cdd3686 100644
> --- a/arch/arm/mach-versal-net/include/mach/hardware.h
> +++ b/arch/arm/mach-versal-net/include/mach/hardware.h
> @@ -66,6 +66,7 @@ struct crp_regs {
>   #define EMMC_MODE	0x00000006
>   #define USB_MODE	0x00000007
>   #define OSPI_MODE	0x00000008
> +#define SELECTMAP_MODE	0x0000000A
>   #define SD1_LSHFT_MODE	0x0000000E /* SD1 Level shifter */
>   #define JTAG_MODE	0x00000000
>   #define BOOT_MODE_USE_ALT	0x100
> diff --git a/arch/arm/mach-versal/include/mach/hardware.h b/arch/arm/mach-versal/include/mach/hardware.h
> index 000af974e8..9d1c2f0dcf 100644
> --- a/arch/arm/mach-versal/include/mach/hardware.h
> +++ b/arch/arm/mach-versal/include/mach/hardware.h
> @@ -82,6 +82,7 @@ struct crp_regs {
>   #define EMMC_MODE	0x00000006
>   #define USB_MODE	0x00000007
>   #define OSPI_MODE	0x00000008
> +#define SELECTMAP_MODE	0x0000000A
>   #define SD1_LSHFT_MODE	0x0000000E /* SD1 Level shifter */
>   #define JTAG_MODE	0x00000000
>   #define BOOT_MODE_USE_ALT	0x100
> diff --git a/board/xilinx/versal-net/board.c b/board/xilinx/versal-net/board.c
> index c18be0c26c..990ca1650a 100644
> --- a/board/xilinx/versal-net/board.c
> +++ b/board/xilinx/versal-net/board.c
> @@ -252,6 +252,9 @@ static int boot_targets_setup(void)
>   		mode = "mmc";
>   		bootseq = dev_seq(dev);
>   		break;
> +	case SELECTMAP_MODE:
> +		puts("SELECTMAP_MODE\n");
> +		break;
>   	case SD_MODE:
>   		puts("SD_MODE\n");
>   		if (uclass_get_device_by_name(UCLASS_MMC,
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index e4bdd5d7a3..8c2e614ad8 100644
> --- a/board/xilinx/versal/board.c
> +++ b/board/xilinx/versal/board.c
> @@ -174,6 +174,9 @@ static int boot_targets_setup(void)
>   		mode = "mmc";
>   		bootseq = dev_seq(dev);
>   		break;
> +	case SELECTMAP_MODE:
> +		puts("SELECTMAP_MODE\n");
> +		break;
>   	case SD_MODE:
>   		puts("SD_MODE\n");
>   		if (uclass_get_device_by_name(UCLASS_MMC,
> @@ -312,6 +315,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
>   			return ENVL_SPI_FLASH;
>   		return ENVL_NOWHERE;
>   	case JTAG_MODE:
> +	case SELECTMAP_MODE:
>   	default:
>   		return ENVL_NOWHERE;
>   	}

Applied.
M


More information about the U-Boot mailing list