diff mbox series

[03/11] rockchip: Include SF on distrocmd devices

Message ID 20191221075440.6944-4-jagan@amarulasolutions.com (mailing list archive)
State New, archived
Headers show
Series rk3399: SPI boot support (fixes, updates) | expand

Commit Message

Jagan Teki Dec. 21, 2019, 7:54 a.m. UTC
Include the SPI flash device on distro boot targets.

Included at the beginning of the target devices list
since the rockchip platform has a boot order start
from SPI Flash.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
 include/configs/rockchip-common.h | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Kever Yang Dec. 30, 2019, 3:07 a.m. UTC | #1
On 2019/12/21 下午3:54, Jagan Teki wrote:
> Include the SPI flash device on distro boot targets.
>
> Included at the beginning of the target devices list
> since the rockchip platform has a boot order start
> from SPI Flash.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   include/configs/rockchip-common.h | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
> index 68e1105a4b..4e6d6e98d9 100644
> --- a/include/configs/rockchip-common.h
> +++ b/include/configs/rockchip-common.h
> @@ -11,6 +11,12 @@
>   
>   #ifndef CONFIG_SPL_BUILD
>   
> +#if CONFIG_IS_ENABLED(CMD_SF)
> +# define BOOT_TARGET_SF(func) func(SF, sf, 0)
> +#else
> +# define BOOT_TARGET_SF(func)
> +#endif
> +
>   /* First try to boot from SD (index 0), then eMMC (index 1) */
>   #if CONFIG_IS_ENABLED(CMD_MMC)
>   	#define BOOT_TARGET_MMC(func) \
> @@ -39,6 +45,7 @@
>   #endif
>   
>   #define BOOT_TARGET_DEVICES(func) \
> +	BOOT_TARGET_SF(func) \
>   	BOOT_TARGET_MMC(func) \
>   	BOOT_TARGET_USB(func) \
>   	BOOT_TARGET_PXE(func) \
Kever Yang Jan. 7, 2020, 8:44 a.m. UTC | #2
On 2019/12/21 下午3:54, Jagan Teki wrote:
> Include the SPI flash device on distro boot targets.
>
> Included at the beginning of the target devices list
> since the rockchip platform has a boot order start
> from SPI Flash.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>

Thanks,
- Kever
> ---
>   include/configs/rockchip-common.h | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
> index 68e1105a4b..4e6d6e98d9 100644
> --- a/include/configs/rockchip-common.h
> +++ b/include/configs/rockchip-common.h
> @@ -11,6 +11,12 @@
>   
>   #ifndef CONFIG_SPL_BUILD
>   
> +#if CONFIG_IS_ENABLED(CMD_SF)
> +# define BOOT_TARGET_SF(func) func(SF, sf, 0)
> +#else
> +# define BOOT_TARGET_SF(func)
> +#endif
> +
>   /* First try to boot from SD (index 0), then eMMC (index 1) */
>   #if CONFIG_IS_ENABLED(CMD_MMC)
>   	#define BOOT_TARGET_MMC(func) \
> @@ -39,6 +45,7 @@
>   #endif
>   
>   #define BOOT_TARGET_DEVICES(func) \
> +	BOOT_TARGET_SF(func) \
>   	BOOT_TARGET_MMC(func) \
>   	BOOT_TARGET_USB(func) \
>   	BOOT_TARGET_PXE(func) \
diff mbox series

Patch

diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 68e1105a4b..4e6d6e98d9 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -11,6 +11,12 @@ 
 
 #ifndef CONFIG_SPL_BUILD
 
+#if CONFIG_IS_ENABLED(CMD_SF)
+# define BOOT_TARGET_SF(func) func(SF, sf, 0)
+#else
+# define BOOT_TARGET_SF(func)
+#endif
+
 /* First try to boot from SD (index 0), then eMMC (index 1) */
 #if CONFIG_IS_ENABLED(CMD_MMC)
 	#define BOOT_TARGET_MMC(func) \
@@ -39,6 +45,7 @@ 
 #endif
 
 #define BOOT_TARGET_DEVICES(func) \
+	BOOT_TARGET_SF(func) \
 	BOOT_TARGET_MMC(func) \
 	BOOT_TARGET_USB(func) \
 	BOOT_TARGET_PXE(func) \