spl: mmc: Resolve emmc not load image after switched hw partition
PATCH 1/1 spl: mmc: Resolve emmc not load image after switched hw partition
When selecting MMCSD_MODE_EMMCBOOT as boot_mode, emmc do not load U-boot proper image after switched hardware partition.
--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)
common/spl/spl_mmc.c +3 -0
@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err =mmc_load_image_raw_sector (spl_image, bootdev, mmc,0 ); +if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );
Signature · 1 line
2.34.1
Hi,
Is this patch considered as accepted?
Quoted 37 lines
-----Original Message-----
From: KuanLim.Lee <[email protected]>
Sent: Tuesday, October 3, 2023 12:17 PM
To: [email protected]
Cc: Cheehong Ang <[email protected]>; WeiLiang Lim <[email protected]>; KuanLim.Lee <[email protected]>
Subject: [PATCH] spl: mmc: Resolve emmc not load image after switched hw partitionWhen selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do not load U-boot proper image after switched hardware partition.Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl_mmc.c index renamed from common/spl/spl_mmc.c +0
-0
20f687e138..dc8a45222b100644common/spl/spl_mmc.c +3
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err =mmc_load_image_raw_sector (spl_image, bootdev, mmc,0 ); +if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :
debug("spl: mmc boot mode: raw\n");
--
2.34.1
Hi maintainers,
Could anyone of you help to review the patch?
Quoted 37 lines
-----Original Message-----
From: KuanLim.Lee <[email protected]>
Sent: Tuesday, October 3, 2023 12:17 PM
To: [email protected]
Cc: Cheehong Ang <[email protected]>; WeiLiang Lim <[email protected]>; KuanLim.Lee <[email protected]>
Subject: [PATCH] spl: mmc: Resolve emmc not load image after switched hw partitionWhen selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do not load U-boot proper image after switched hardware partition.Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl_mmc.c index renamed from common/spl/spl_mmc.c +0
-0
20f687e138..dc8a45222b100644common/spl/spl_mmc.c +3
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err =mmc_load_image_raw_sector (spl_image, bootdev, mmc,0 ); +if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :
debug("spl: mmc boot mode: raw\n");
--
2.34.1
Hi,
Quoted 2 lines · On Tue, 17 Oct 2023 04:53:40 +0000 KuanLim.Lee wrote:
Could anyone of you help to review the patch?
Maybe you should expand the audience to include the people listed by ./scripts/get_maintainer.pl common/spl/spl_mmc.c
Lothar Waßmann
Quoted 15 lines · Kuan Lim Lee
When selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do not load U-boot proper image after switched hardware partition.Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl_mmc.c +0
-0
common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image, · line 455
Quoted 9 lines
common/spl/spl_mmc.c +3
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err =mmc_load_image_raw_sector (spl_image, bootdev, mmc,0 ); +if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );
So why doesn't the mmc_load_image_raw_sector below (line 475 or so) work?
--Sean
Quoted 22 lines · Sean Anderson
Quoted 1 line · Kuan Lim Lee
When selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do notload
Quoted 14 lines
U-boot proper image after switched hardware partition.
Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl_mmc.c index renamed from common/spl/spl_mmc.c +0
-0
20f687e138..dc8a45222b100644common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image, · line 450
Quoted 4 lines
common/spl/spl_mmc.c +1
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err = mmc_load_image_raw_sector(spl_image, bootdev, mmc,0);
Quoted 7 lines
common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image, · line 455
Quoted 5 lines
common/spl/spl_mmc.c +2
-0+if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );So why doesn't the
mmc_load_image_raw_sectorbelow (line 475 or so) work?
boot_mode that I choose is MMCSD_MODE_EMMCBOOT. This is a switch case method. If the case finished execution, program will jump to 'return error;' in line 492. Since there are no load image function, in boot_mode: MMCSD_MODE_EMMCBOOT, it will just switch the hwpartition and quit the process & fail to boot.
case MMCSD_MODE_EMMCBOOT:
*** here is the case I add mmc_load_image_raw_sector()
/* Fall through */
case MMCSD_MODE_RAW:
*** here is the case which execute mmc_load_image_raw_sector() in line 470.
Quoted 2 lines
--Sean
Please correct me if I am wrong.
--KuanLim
Hi Anderson,
Thanks for your feedback.
Please ignore this patch.
Best Regards,
KuanLim
Quoted 48 lines · Kuan Lim Lee
Quoted 12 lines · Sean Anderson
Quoted 1 line · Kuan Lim Lee
When selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do notload
Quoted 9 lines
U-boot proper image after switched hardware partition.
Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)Quoted 5 lines
common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info
Quoted 5 lines
common/spl/spl_mmc.c index renamed from common/spl/spl_mmc.c +0
-0
20f687e138..dc8a45222b100644common/spl/spl_mmc.c +0
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info
*spl_image,Quoted 5 lines
common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image,
Quoted 4 lines
common/spl/spl_mmc.c +1
-0#endif return err; } + err = mmc_load_image_raw_sector(spl_image, bootdev, mmc,0);
Quoted 7 lines
common/spl/spl_mmc.c int spl_mmc_load(struct spl_image_info *spl_image, · line 455
Quoted 5 lines
common/spl/spl_mmc.c +2
-0+if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );So why doesn't the
mmc_load_image_raw_sectorbelow (line 475 or so)work?
boot_modethat I choose isMMCSD_MODE_EMMCBOOT. This is a switch case method.
If the case finished execution, program will jump to 'return error;' in line 492. Since there are no load image function, inboot_mode:MMCSD_MODE_EMMCBOOT, it will just switch the hwpartition and quit the process & fail to boot.case
MMCSD_MODE_EMMCBOOT:
*** here is the case I addmmc_load_image_raw_sector()
/* Fall through */
caseMMCSD_MODE_RAW:
*** here is the case which executemmc_load_image_raw_sector()in line 470.Quoted 2 lines
--Sean
Please correct me if I am wrong.
--KuanLim
Quoted 6 lines · Kuan Lim Lee
When selecting
MMCSD_MODE_EMMCBOOTasboot_mode, emmc do not load U-boot proper image after switched hardware partition.Signed-off-by Kuan Lim Lee <[email protected]>Reviewed-by Chee Hong Ang <[email protected]>Reviewed-by Wei Liang Lim <[email protected]>
Best Regards,
Jaehoon Chung
Quoted 18 lines
--- common/spl/spl_mmc.c | 3 +++ 1 file changed, 3 insertions(+)common/spl/spl_mmc.c +3
-0@@ -447,6 +447,9 @@ int spl_mmc_load(struct spl_image_info *spl_image,#endif return err; } + err =mmc_load_image_raw_sector (spl_image, bootdev, mmc,0 ); +if (!err) +return err;/* Fall through */ case MMCSD_MODE_RAW :debug ("spl: mmc boot mode: raw\n" );