[V4,5/5] board: bsh: Switch to nand spl load instead of romapi

Message ID 20220515093534.1737172-6-michael@amarulasolutions.com
State New
Headers show
Series
  • MXS nand fixes in SPL
Related show

Commit Message

Michael Trimarchi May 15, 2022, 9:35 a.m. UTC
romapi is not eble to skip bad block so we need to workaround
using the spl

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 board/bsh/imx8mn_smm_s2/spl.c | 3 +++
 1 file changed, 3 insertions(+)
---
V3->V4:
	- none
V2->V3:
	- Add to series and fix if condition
V1->V2:
	- none
---

Comments

Michael Trimarchi May 18, 2022, 10:17 a.m. UTC | #1
Hi Fabio and Stefano

do not consider this patch because I found other problems on manage
flash.bin properly in imx8 family. All the other patches
are needed

Michael

On Sun, May 15, 2022 at 11:35 AM Michael Trimarchi
<michael@amarulasolutions.com> wrote:
>
> romapi is not eble to skip bad block so we need to workaround
> using the spl
>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  board/bsh/imx8mn_smm_s2/spl.c | 3 +++
>  1 file changed, 3 insertions(+)
> ---
> V3->V4:
>         - none
> V2->V3:
>         - Add to series and fix if condition
> V1->V2:
>         - none
> ---
> diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c
> index 0f61acc630..097b60c055 100644
> --- a/board/bsh/imx8mn_smm_s2/spl.c
> +++ b/board/bsh/imx8mn_smm_s2/spl.c
> @@ -18,6 +18,9 @@
>
>  int spl_board_boot_device(enum boot_device boot_dev_spl)
>  {
> +       if (IS_ENABLED(CONFIG_NAND_MXS) && get_boot_device() != USB_BOOT)
> +               return BOOT_DEVICE_NAND;
> +
>         return BOOT_DEVICE_BOOTROM;
>  }
>
> --
> 2.25.1
>
Stefano Babic May 18, 2022, 11:53 a.m. UTC | #2
On 18.05.22 12:17, Michael Nazzareno Trimarchi wrote:
> Hi Fabio and Stefano
> 
> do not consider this patch because I found other problems on manage
> flash.bin properly in imx8 family. All the other patches
> are needed
> 


OK, fine, got it !

Stefano
> Michael
> 
> On Sun, May 15, 2022 at 11:35 AM Michael Trimarchi
> <michael@amarulasolutions.com> wrote:
>>
>> romapi is not eble to skip bad block so we need to workaround
>> using the spl
>>
>> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>> ---
>>   board/bsh/imx8mn_smm_s2/spl.c | 3 +++
>>   1 file changed, 3 insertions(+)
>> ---
>> V3->V4:
>>          - none
>> V2->V3:
>>          - Add to series and fix if condition
>> V1->V2:
>>          - none
>> ---
>> diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c
>> index 0f61acc630..097b60c055 100644
>> --- a/board/bsh/imx8mn_smm_s2/spl.c
>> +++ b/board/bsh/imx8mn_smm_s2/spl.c
>> @@ -18,6 +18,9 @@
>>
>>   int spl_board_boot_device(enum boot_device boot_dev_spl)
>>   {
>> +       if (IS_ENABLED(CONFIG_NAND_MXS) && get_boot_device() != USB_BOOT)
>> +               return BOOT_DEVICE_NAND;
>> +
>>          return BOOT_DEVICE_BOOTROM;
>>   }
>>
>> --
>> 2.25.1
>>
> 
>

Patch

diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c
index 0f61acc630..097b60c055 100644
--- a/board/bsh/imx8mn_smm_s2/spl.c
+++ b/board/bsh/imx8mn_smm_s2/spl.c
@@ -18,6 +18,9 @@ 
 
 int spl_board_boot_device(enum boot_device boot_dev_spl)
 {
+	if (IS_ENABLED(CONFIG_NAND_MXS) && get_boot_device() != USB_BOOT)
+		return BOOT_DEVICE_NAND;
+
 	return BOOT_DEVICE_BOOTROM;
 }