diff mbox series

[U-Boot,06/15] imx: spl: add MMC BOOT Device for i.MX8M

Message ID 20181109092408.28322-6-peng.fan@nxp.com
State Superseded
Delegated to: Stefano Babic
Headers show
Series [U-Boot,01/15] Introduce CONFIG_FIT_EXTERNAL_OFFSET | expand

Commit Message

Peng Fan Nov. 9, 2018, 9:16 a.m. UTC
Add MMC BOOT Device for i.MX8M

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm/mach-imx/spl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Troy Kisky Nov. 9, 2018, 6:14 p.m. UTC | #1
On 11/9/2018 1:16 AM, Peng Fan wrote:
> Add MMC BOOT Device for i.MX8M
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm/mach-imx/spl.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
> index e82eaa5682..d4852eef92 100644
> --- a/arch/arm/mach-imx/spl.c
> +++ b/arch/arm/mach-imx/spl.c
> @@ -126,6 +126,7 @@ u32 spl_boot_device(void)
>  	enum boot_device boot_device_spl = get_boot_device();
>  
>  	switch (boot_device_spl) {
> +#if defined(CONFIG_MX7)


This looks weird. Can imx6 no longer boot from SD1_BOOT/MMC1_BOOT ?

>  	case SD1_BOOT:
>  	case MMC1_BOOT:
>  	case SD2_BOOT:
> @@ -133,6 +134,14 @@ u32 spl_boot_device(void)
>  	case SD3_BOOT:
>  	case MMC3_BOOT:
>  		return BOOT_DEVICE_MMC1;
> +#elif defined(CONFIG_IMX8M)
> +	case SD1_BOOT:
> +	case MMC1_BOOT:
> +		return BOOT_DEVICE_MMC1;
> +	case SD2_BOOT:
> +	case MMC2_BOOT:
> +		return BOOT_DEVICE_MMC2;
> +#endif
>  	case NAND_BOOT:
>  		return BOOT_DEVICE_NAND;
>  	case SPI_NOR_BOOT:
>
Troy Kisky Nov. 9, 2018, 6:18 p.m. UTC | #2
On 11/9/2018 10:14 AM, Troy Kisky wrote:
> On 11/9/2018 1:16 AM, Peng Fan wrote:
>> Add MMC BOOT Device for i.MX8M
>>
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>  arch/arm/mach-imx/spl.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
>> index e82eaa5682..d4852eef92 100644
>> --- a/arch/arm/mach-imx/spl.c
>> +++ b/arch/arm/mach-imx/spl.c
>> @@ -126,6 +126,7 @@ u32 spl_boot_device(void)
>>  	enum boot_device boot_device_spl = get_boot_device();
>>  
>>  	switch (boot_device_spl) {
>> +#if defined(CONFIG_MX7)
> 
> 
> This looks weird. Can imx6 no longer boot from SD1_BOOT/MMC1_BOOT ?

Sorry, only MX7 and MX8 are in this block of code.

The endif confused me.

|#endif /* CONFIG_MX6 || CONFIG_MX7 || CONFIG_MX8M */
diff mbox series

Patch

diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index e82eaa5682..d4852eef92 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -126,6 +126,7 @@  u32 spl_boot_device(void)
 	enum boot_device boot_device_spl = get_boot_device();
 
 	switch (boot_device_spl) {
+#if defined(CONFIG_MX7)
 	case SD1_BOOT:
 	case MMC1_BOOT:
 	case SD2_BOOT:
@@ -133,6 +134,14 @@  u32 spl_boot_device(void)
 	case SD3_BOOT:
 	case MMC3_BOOT:
 		return BOOT_DEVICE_MMC1;
+#elif defined(CONFIG_IMX8M)
+	case SD1_BOOT:
+	case MMC1_BOOT:
+		return BOOT_DEVICE_MMC1;
+	case SD2_BOOT:
+	case MMC2_BOOT:
+		return BOOT_DEVICE_MMC2;
+#endif
 	case NAND_BOOT:
 		return BOOT_DEVICE_NAND;
 	case SPI_NOR_BOOT: