diff mbox series

board: venice: add spl_board_loader_name

Message ID 20220308184539.14959-1-tharvey@gateworks.com
State Accepted
Commit 255658127b2a26ee8d18d97cc16f1bc694e46bbd
Delegated to: Stefano Babic
Headers show
Series board: venice: add spl_board_loader_name | expand

Commit Message

Tim Harvey March 8, 2022, 6:45 p.m. UTC
Implement spl_board_loader_name to provide more meaningful device names
vs MMC1 and MMC2.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 board/gateworks/venice/spl.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Comments

Peng Fan March 9, 2022, 1:09 a.m. UTC | #1
> Subject: [PATCH] board: venice: add spl_board_loader_name
> 
> Implement spl_board_loader_name to provide more meaningful device
> names vs MMC1 and MMC2.
> 
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>

Nice. Reviewed-by: Peng Fan <peng.fan@nxp.com>

> ---
>  board/gateworks/venice/spl.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
> index 8b301570577c..b56e1b607d58 100644
> --- a/board/gateworks/venice/spl.c
> +++ b/board/gateworks/venice/spl.c
> @@ -301,3 +301,17 @@ int spl_board_boot_device(enum boot_device
> boot_dev_spl)
>  		return BOOT_DEVICE_NONE;
>  	}
>  }
> +
> +const char *spl_board_loader_name(u32 boot_device) {
> +	switch (boot_device) {
> +	/* SDHC2 */
> +	case BOOT_DEVICE_MMC1:
> +		return "eMMC";
> +	/* SDHC3 */
> +	case BOOT_DEVICE_MMC2:
> +		return "SD card";
> +	default:
> +		return NULL;
> +	}
> +}
> --
> 2.17.1
Stefano Babic April 12, 2022, 9:40 p.m. UTC | #2
> Implement spl_board_loader_name to provide more meaningful device names
> vs MMC1 and MMC2.
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/board/gateworks/venice/spl.c b/board/gateworks/venice/spl.c
index 8b301570577c..b56e1b607d58 100644
--- a/board/gateworks/venice/spl.c
+++ b/board/gateworks/venice/spl.c
@@ -301,3 +301,17 @@  int spl_board_boot_device(enum boot_device boot_dev_spl)
 		return BOOT_DEVICE_NONE;
 	}
 }
+
+const char *spl_board_loader_name(u32 boot_device)
+{
+	switch (boot_device) {
+	/* SDHC2 */
+	case BOOT_DEVICE_MMC1:
+		return "eMMC";
+	/* SDHC3 */
+	case BOOT_DEVICE_MMC2:
+		return "SD card";
+	default:
+		return NULL;
+	}
+}