Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On 08/10/19 15:05, Adam Ford wrote: > On Tue, Oct 8, 2019 at 6:51 AM Peter Robinson wrote: >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load u-boot.img from MMC: 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - 08:03:23 +) 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 3 2019-09-26_17:31:27.63095 MMC Device 1 not found 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### >>> >>> Thanks for reporting this issue. >>> >>> Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >>> and Baruch on Cc. >> >> Works after reverting the following commit. > > For reference reverting this on 2019.10 fixed my issues with the > udoo_neo board. > >> 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit >> commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a >> Author: Adam Ford >> Date: Thu May 23 14:11:30 2019 -0500 >> >> spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 >> >> Currently, when the spl_boot_device checks the boot device, it >> will only return MMC1 when it's either sd or eMMC regardless >> of whether or not it's MMC1 or MMC2. This is a problem when >> booting from MMC2 if MMC isn't being manually configured like in >> the DM_SPL case with SPL_OF_CONTROL. >> >> This patch will check the register and return either MMC1 or >> MMC2. >> >> Signed-off-by: Adam Ford >> I tend to revert the pathc and let the "standard" case working. A board maintainer coould add a board_boot_order() function to still overwrite the behavior of spl_boot_device(). >>> >>> I will revert this and the rest of the series that goes with it. >> >> The series is merged since a very long time - do you propose to revert >> all of them ? > > I just got into my office. I'm looking into it now. I should have > something shortly. for sure, I'll revert the offending patch, but I > want to look into options on how to best approach keeping my board > booting without adding a bunch of extra layers. > I know time is of the essence if we want to get it into the final > release for 2019.10 That ship sailed yesterday! >>> >>> Sorry. >>> :-( >> >> It happens >> >>> Either way, I'll have a revert patch series sent today. >> >> Probably better off getting it fixed properly now, if that involved >> reverting it sure, if it involves patches on top fixing the situation >> and moving things forward do that. > > Apologizes to everyone. I pushed the patch [1] to revert this change. > Thank you to everyone for allowing me the courtesy of undoing it. > I also want to thank Stefano for bringing to my attention that we can > override the standard settings by adding board_boot_order() [2] > which actually let me default back to the serial down-loader in the > event that something goes wrong. > > Thanks Adam - I have already merged your two patches into my -next branch (it will become u-boot-imx, -master after Travis will finish). Best regards, Stefano > adam > > [1] - https://patchwork.ozlabs.org/patch/1173314/ > [2] - https://patchwork.ozlabs.org/patch/1173316/ > >> >>> adam > > adam >> >> commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 >> Author: Adam Ford >> Date: Thu May 23 14:11:32 2019 -0500 >> >> ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init >> >> Since the board uses SPL_OF_CONTROL now, we don't need to >> explicitly initialize the MMC driver, but we still need to >> pinmux the corresponding pins. This patch removes the >> initialization code and leave just the muxing behind. >> >> Signed-off-by: Adam Ford >> >> commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef >> Author: Adam Ford >> Date: Thu May 23 14:11:31 2019 -0500 >> >> ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL >> >> With the spl code correctly returning either MMC1 or MMC2, >> this board can not boot either from internal eMMC (MMC1) or >> the uSD card on the baseboard (MMC2) using the device tree. >> >> Signed-off-by: Adam Ford >> >> commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a >> Author: Adam Ford >> Date: Thu May 23 14:11:30 2019 -0500 >> >> spl: imx6: Let spl_boot_device return USDHC1 or USDHC2
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Tue, Oct 8, 2019 at 6:51 AM Peter Robinson wrote: > > > > > > >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > > > > >> u-boot.img from MMC: > > > > > >> > > > > > >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep > > > > > >> 24 2019 - > > > > > >> 08:03:23 +) > > > > > >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > > > > >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > > > > >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > > > > > >> error: -19 > > > > > >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > > > > > >> devices > > > > > >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the > > > > > >> board ### > > > > > > > > > > > > Thanks for reporting this issue. > > > > > > > > > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding > > > > > > Jon > > > > > > and Baruch on Cc. > > > > > > > > > > Works after reverting the following commit. > > > > > >>> > > > > > >>> For reference reverting this on 2019.10 fixed my issues with the > > > > > >>> udoo_neo board. > > > > > >>> > > > > > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > > > > Author: Adam Ford > > > > > Date: Thu May 23 14:11:30 2019 -0500 > > > > > > > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > > > > > > > Currently, when the spl_boot_device checks the boot device, > > > > > it > > > > > will only return MMC1 when it's either sd or eMMC regardless > > > > > of whether or not it's MMC1 or MMC2. This is a problem when > > > > > booting from MMC2 if MMC isn't being manually configured > > > > > like in > > > > > the DM_SPL case with SPL_OF_CONTROL. > > > > > > > > > > This patch will check the register and return either MMC1 or > > > > > MMC2. > > > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > > > >> > > > > > >> I tend to revert the pathc and let the "standard" case working. A > > > > > >> board > > > > > >> maintainer coould add a board_boot_order() function to still > > > > > >> overwrite > > > > > >> the behavior of spl_boot_device(). > > > > > > > > > > > > I will revert this and the rest of the series that goes with it. > > > > > > > > > > The series is merged since a very long time - do you propose to revert > > > > > all of them ? > > > > > > > > I just got into my office. I'm looking into it now. I should have > > > > something shortly. for sure, I'll revert the offending patch, but I > > > > want to look into options on how to best approach keeping my board > > > > booting without adding a bunch of extra layers. > > > > I know time is of the essence if we want to get it into the final > > > > release for 2019.10 > > > > > > That ship sailed yesterday! > > > > Sorry. > > :-( > > It happens > > > Either way, I'll have a revert patch series sent today. > > Probably better off getting it fixed properly now, if that involved > reverting it sure, if it involves patches on top fixing the situation > and moving things forward do that. Apologizes to everyone. I pushed the patch [1] to revert this change. Thank you to everyone for allowing me the courtesy of undoing it. I also want to thank Stefano for bringing to my attention that we can override the standard settings by adding board_boot_order() [2] which actually let me default back to the serial down-loader in the event that something goes wrong. adam [1] - https://patchwork.ozlabs.org/patch/1173314/ [2] - https://patchwork.ozlabs.org/patch/1173316/ > > > adam > > > > > > > > > > > adam > > > > > > > > > > commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 > > > > > Author: Adam Ford > > > > > Date: Thu May 23 14:11:32 2019 -0500 > > > > > > > > > > ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init > > > > > > > > > > Since the board uses SPL_OF_CONTROL now, we don't need to > > > > > explicitly initialize the MMC driver, but we still need to > > > > > pinmux the corresponding pins. This patch removes the > > > > > initialization code and leave just the muxing behind. > > > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > > > commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef > > > > > Author: Adam Ford > > > > > Date: Thu May 23 14:11:31 2019 -0500 > > > > > > > > > > ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL > > > > > > > > > > With the spl code correctly returning either MMC1 or MMC2, > > > > > this board can not boot either from internal eMMC (MMC1) or > > > > > the uSD card on the baseboard (MMC2) using the device tree. > > > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
> > > > >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > > > >> u-boot.img from MMC: > > > > >> > > > > >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep > > > > >> 24 2019 - > > > > >> 08:03:23 +) > > > > >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > > > >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > > > >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > > > > >> error: -19 > > > > >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > > > > >> devices > > > > >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board > > > > >> ### > > > > > > > > > > Thanks for reporting this issue. > > > > > > > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding > > > > > Jon > > > > > and Baruch on Cc. > > > > > > > > Works after reverting the following commit. > > > > >>> > > > > >>> For reference reverting this on 2019.10 fixed my issues with the > > > > >>> udoo_neo board. > > > > >>> > > > > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > > > Author: Adam Ford > > > > Date: Thu May 23 14:11:30 2019 -0500 > > > > > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > > > > > Currently, when the spl_boot_device checks the boot device, it > > > > will only return MMC1 when it's either sd or eMMC regardless > > > > of whether or not it's MMC1 or MMC2. This is a problem when > > > > booting from MMC2 if MMC isn't being manually configured like > > > > in > > > > the DM_SPL case with SPL_OF_CONTROL. > > > > > > > > This patch will check the register and return either MMC1 or > > > > MMC2. > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > >> > > > > >> I tend to revert the pathc and let the "standard" case working. A > > > > >> board > > > > >> maintainer coould add a board_boot_order() function to still > > > > >> overwrite > > > > >> the behavior of spl_boot_device(). > > > > > > > > > > I will revert this and the rest of the series that goes with it. > > > > > > > > The series is merged since a very long time - do you propose to revert > > > > all of them ? > > > > > > I just got into my office. I'm looking into it now. I should have > > > something shortly. for sure, I'll revert the offending patch, but I > > > want to look into options on how to best approach keeping my board > > > booting without adding a bunch of extra layers. > > > I know time is of the essence if we want to get it into the final > > > release for 2019.10 > > > > That ship sailed yesterday! > > Sorry. > :-( It happens > Either way, I'll have a revert patch series sent today. Probably better off getting it fixed properly now, if that involved reverting it sure, if it involves patches on top fixing the situation and moving things forward do that. > adam > > > > > > > > adam > > > > > > > > commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 > > > > Author: Adam Ford > > > > Date: Thu May 23 14:11:32 2019 -0500 > > > > > > > > ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init > > > > > > > > Since the board uses SPL_OF_CONTROL now, we don't need to > > > > explicitly initialize the MMC driver, but we still need to > > > > pinmux the corresponding pins. This patch removes the > > > > initialization code and leave just the muxing behind. > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef > > > > Author: Adam Ford > > > > Date: Thu May 23 14:11:31 2019 -0500 > > > > > > > > ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL > > > > > > > > With the spl code correctly returning either MMC1 or MMC2, > > > > this board can not boot either from internal eMMC (MMC1) or > > > > the uSD card on the baseboard (MMC2) using the device tree. > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > > > Author: Adam Ford > > > > Date: Thu May 23 14:11:30 2019 -0500 > > > > > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > > > > > Currently, when the spl_boot_device checks the boot device, it > > > > will only return MMC1 when it's either sd or eMMC regardless > > > > of whether or not it's MMC1 or MMC2. This is a problem when > > > > booting from MMC2 if MMC isn't being manually configured like in > > > > the DM_SPL case with SPL_OF_CONTROL. > > > > > > > > This patch will check the register and return either MMC1 or MMC2. > > > > > > > > Signed-off-by: Adam Ford > > > > > > > > Two of them affects just imx6q_logic, the only one with more > > > > side-effects is the one we discuss here. Of
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Tue, Oct 8, 2019 at 6:45 AM Peter Robinson wrote: > > On Tue, Oct 8, 2019 at 12:43 PM Adam Ford wrote: > > > > On Tue, Oct 8, 2019 at 6:04 AM Stefano Babic wrote: > > > > > > On 08/10/19 12:42, Adam Ford wrote: > > > > On Tue, Oct 8, 2019 at 5:19 AM Stefano Babic wrote: > > > >> > > > >> Hi everybody, > > > >> > > > >> thanks for deep analyses (I just jump at the end): > > > >> > > > >> On 08/10/19 12:03, Peter Robinson wrote: > > > On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > > > Hi Vagrant, > > > > > > > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > > > wrote: > > > >> > > > >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > > >> u-boot.img from MMC: > > > >> > > > >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 > > > >> 2019 - > > > >> 08:03:23 +) > > > >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > > >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > > >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > > > >> error: -19 > > > >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > > > >> devices > > > >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board > > > >> ### > > > > > > > > Thanks for reporting this issue. > > > > > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > > > and Baruch on Cc. > > > > > > Works after reverting the following commit. > > > >>> > > > >>> For reference reverting this on 2019.10 fixed my issues with the > > > >>> udoo_neo board. > > > >>> > > > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > > Author: Adam Ford > > > Date: Thu May 23 14:11:30 2019 -0500 > > > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > > > Currently, when the spl_boot_device checks the boot device, it > > > will only return MMC1 when it's either sd or eMMC regardless > > > of whether or not it's MMC1 or MMC2. This is a problem when > > > booting from MMC2 if MMC isn't being manually configured like in > > > the DM_SPL case with SPL_OF_CONTROL. > > > > > > This patch will check the register and return either MMC1 or > > > MMC2. > > > > > > Signed-off-by: Adam Ford > > > > > > >> > > > >> I tend to revert the pathc and let the "standard" case working. A board > > > >> maintainer coould add a board_boot_order() function to still overwrite > > > >> the behavior of spl_boot_device(). > > > > > > > > I will revert this and the rest of the series that goes with it. > > > > > > The series is merged since a very long time - do you propose to revert > > > all of them ? > > > > I just got into my office. I'm looking into it now. I should have > > something shortly. for sure, I'll revert the offending patch, but I > > want to look into options on how to best approach keeping my board > > booting without adding a bunch of extra layers. > > I know time is of the essence if we want to get it into the final > > release for 2019.10 > > That ship sailed yesterday! Sorry. :-( Either way, I'll have a revert patch series sent today. adam > > > > > adam > > > > > > commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 > > > Author: Adam Ford > > > Date: Thu May 23 14:11:32 2019 -0500 > > > > > > ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init > > > > > > Since the board uses SPL_OF_CONTROL now, we don't need to > > > explicitly initialize the MMC driver, but we still need to > > > pinmux the corresponding pins. This patch removes the > > > initialization code and leave just the muxing behind. > > > > > > Signed-off-by: Adam Ford > > > > > > commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef > > > Author: Adam Ford > > > Date: Thu May 23 14:11:31 2019 -0500 > > > > > > ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL > > > > > > With the spl code correctly returning either MMC1 or MMC2, > > > this board can not boot either from internal eMMC (MMC1) or > > > the uSD card on the baseboard (MMC2) using the device tree. > > > > > > Signed-off-by: Adam Ford > > > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > > Author: Adam Ford > > > Date: Thu May 23 14:11:30 2019 -0500 > > > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > > > Currently, when the spl_boot_device checks the boot device, it > > > will only return MMC1 when it's either sd or eMMC regardless > > > of whether or not it's MMC1 or MMC2. This is a problem when > > > booting from MMC2 if MMC isn't being manually configured like in > > > the DM_SPL case with SPL_OF_CONTROL. > > > > > > This patch will check the register and return either
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Tue, Oct 8, 2019 at 12:43 PM Adam Ford wrote: > > On Tue, Oct 8, 2019 at 6:04 AM Stefano Babic wrote: > > > > On 08/10/19 12:42, Adam Ford wrote: > > > On Tue, Oct 8, 2019 at 5:19 AM Stefano Babic wrote: > > >> > > >> Hi everybody, > > >> > > >> thanks for deep analyses (I just jump at the end): > > >> > > >> On 08/10/19 12:03, Peter Robinson wrote: > > On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > > Hi Vagrant, > > > > > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > > wrote: > > >> > > >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > >> u-boot.img from MMC: > > >> > > >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 > > >> 2019 - > > >> 08:03:23 +) > > >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: > > >> -19 > > >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > > > > > Thanks for reporting this issue. > > > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > > and Baruch on Cc. > > > > Works after reverting the following commit. > > >>> > > >>> For reference reverting this on 2019.10 fixed my issues with the > > >>> udoo_neo board. > > >>> > > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > Author: Adam Ford > > Date: Thu May 23 14:11:30 2019 -0500 > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > Currently, when the spl_boot_device checks the boot device, it > > will only return MMC1 when it's either sd or eMMC regardless > > of whether or not it's MMC1 or MMC2. This is a problem when > > booting from MMC2 if MMC isn't being manually configured like in > > the DM_SPL case with SPL_OF_CONTROL. > > > > This patch will check the register and return either MMC1 or MMC2. > > > > Signed-off-by: Adam Ford > > > > >> > > >> I tend to revert the pathc and let the "standard" case working. A board > > >> maintainer coould add a board_boot_order() function to still overwrite > > >> the behavior of spl_boot_device(). > > > > > > I will revert this and the rest of the series that goes with it. > > > > The series is merged since a very long time - do you propose to revert > > all of them ? > > I just got into my office. I'm looking into it now. I should have > something shortly. for sure, I'll revert the offending patch, but I > want to look into options on how to best approach keeping my board > booting without adding a bunch of extra layers. > I know time is of the essence if we want to get it into the final > release for 2019.10 That ship sailed yesterday! > > adam > > > > commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 > > Author: Adam Ford > > Date: Thu May 23 14:11:32 2019 -0500 > > > > ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init > > > > Since the board uses SPL_OF_CONTROL now, we don't need to > > explicitly initialize the MMC driver, but we still need to > > pinmux the corresponding pins. This patch removes the > > initialization code and leave just the muxing behind. > > > > Signed-off-by: Adam Ford > > > > commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef > > Author: Adam Ford > > Date: Thu May 23 14:11:31 2019 -0500 > > > > ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL > > > > With the spl code correctly returning either MMC1 or MMC2, > > this board can not boot either from internal eMMC (MMC1) or > > the uSD card on the baseboard (MMC2) using the device tree. > > > > Signed-off-by: Adam Ford > > > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > > Author: Adam Ford > > Date: Thu May 23 14:11:30 2019 -0500 > > > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > > > Currently, when the spl_boot_device checks the boot device, it > > will only return MMC1 when it's either sd or eMMC regardless > > of whether or not it's MMC1 or MMC2. This is a problem when > > booting from MMC2 if MMC isn't being manually configured like in > > the DM_SPL case with SPL_OF_CONTROL. > > > > This patch will check the register and return either MMC1 or MMC2. > > > > Signed-off-by: Adam Ford > > > > Two of them affects just imx6q_logic, the only one with more > > side-effects is the one we discuss here. Of course, I can revert all > > three of them if you prefer to go on this way (I am happy with follow up > > pathces,too, after reverting just 14d319b1856). > > > > Regards, > > Stefano > > > > -- > >
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Tue, Oct 8, 2019 at 6:04 AM Stefano Babic wrote: > > On 08/10/19 12:42, Adam Ford wrote: > > On Tue, Oct 8, 2019 at 5:19 AM Stefano Babic wrote: > >> > >> Hi everybody, > >> > >> thanks for deep analyses (I just jump at the end): > >> > >> On 08/10/19 12:03, Peter Robinson wrote: > On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > Hi Vagrant, > > > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > wrote: > >> > >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > >> u-boot.img from MMC: > >> > >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 > >> - > >> 08:03:23 +) > >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: > >> -19 > >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > > > Thanks for reporting this issue. > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > and Baruch on Cc. > > Works after reverting the following commit. > >>> > >>> For reference reverting this on 2019.10 fixed my issues with the udoo_neo > >>> board. > >>> > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > Author: Adam Ford > Date: Thu May 23 14:11:30 2019 -0500 > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > Currently, when the spl_boot_device checks the boot device, it > will only return MMC1 when it's either sd or eMMC regardless > of whether or not it's MMC1 or MMC2. This is a problem when > booting from MMC2 if MMC isn't being manually configured like in > the DM_SPL case with SPL_OF_CONTROL. > > This patch will check the register and return either MMC1 or MMC2. > > Signed-off-by: Adam Ford > > >> > >> I tend to revert the pathc and let the "standard" case working. A board > >> maintainer coould add a board_boot_order() function to still overwrite > >> the behavior of spl_boot_device(). > > > > I will revert this and the rest of the series that goes with it. > > The series is merged since a very long time - do you propose to revert > all of them ? I just got into my office. I'm looking into it now. I should have something shortly. for sure, I'll revert the offending patch, but I want to look into options on how to best approach keeping my board booting without adding a bunch of extra layers. I know time is of the essence if we want to get it into the final release for 2019.10 adam > > commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 > Author: Adam Ford > Date: Thu May 23 14:11:32 2019 -0500 > > ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init > > Since the board uses SPL_OF_CONTROL now, we don't need to > explicitly initialize the MMC driver, but we still need to > pinmux the corresponding pins. This patch removes the > initialization code and leave just the muxing behind. > > Signed-off-by: Adam Ford > > commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef > Author: Adam Ford > Date: Thu May 23 14:11:31 2019 -0500 > > ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL > > With the spl code correctly returning either MMC1 or MMC2, > this board can not boot either from internal eMMC (MMC1) or > the uSD card on the baseboard (MMC2) using the device tree. > > Signed-off-by: Adam Ford > > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > Author: Adam Ford > Date: Thu May 23 14:11:30 2019 -0500 > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > Currently, when the spl_boot_device checks the boot device, it > will only return MMC1 when it's either sd or eMMC regardless > of whether or not it's MMC1 or MMC2. This is a problem when > booting from MMC2 if MMC isn't being manually configured like in > the DM_SPL case with SPL_OF_CONTROL. > > This patch will check the register and return either MMC1 or MMC2. > > Signed-off-by: Adam Ford > > Two of them affects just imx6q_logic, the only one with more > side-effects is the one we discuss here. Of course, I can revert all > three of them if you prefer to go on this way (I am happy with follow up > pathces,too, after reverting just 14d319b1856). > > Regards, > Stefano > > -- > = > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de > =
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On 08/10/19 12:42, Adam Ford wrote: > On Tue, Oct 8, 2019 at 5:19 AM Stefano Babic wrote: >> >> Hi everybody, >> >> thanks for deep analyses (I just jump at the end): >> >> On 08/10/19 12:03, Peter Robinson wrote: On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > Hi Vagrant, > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > wrote: >> >> I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> u-boot.img from MMC: >> >> 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - >> 08:03:23 +) >> 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 >> 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices >> 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > Thanks for reporting this issue. > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > and Baruch on Cc. Works after reverting the following commit. >>> >>> For reference reverting this on 2019.10 fixed my issues with the udoo_neo >>> board. >>> 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a Author: Adam Ford Date: Thu May 23 14:11:30 2019 -0500 spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 Currently, when the spl_boot_device checks the boot device, it will only return MMC1 when it's either sd or eMMC regardless of whether or not it's MMC1 or MMC2. This is a problem when booting from MMC2 if MMC isn't being manually configured like in the DM_SPL case with SPL_OF_CONTROL. This patch will check the register and return either MMC1 or MMC2. Signed-off-by: Adam Ford >> >> I tend to revert the pathc and let the "standard" case working. A board >> maintainer coould add a board_boot_order() function to still overwrite >> the behavior of spl_boot_device(). > > I will revert this and the rest of the series that goes with it. The series is merged since a very long time - do you propose to revert all of them ? commit 8f4691e31a18254d225524a4b018b8cbcddc70b1 Author: Adam Ford Date: Thu May 23 14:11:32 2019 -0500 ARM: imx6q_logic: With SPL_OF_CONTROL enabled, remove MMC init Since the board uses SPL_OF_CONTROL now, we don't need to explicitly initialize the MMC driver, but we still need to pinmux the corresponding pins. This patch removes the initialization code and leave just the muxing behind. Signed-off-by: Adam Ford commit 0749bbb5c75d2b35eaf6acd438750cf08df314ef Author: Adam Ford Date: Thu May 23 14:11:31 2019 -0500 ARM: imx6q_logic: Enable SPL_DM with SPL_OF_CONTROL With the spl code correctly returning either MMC1 or MMC2, this board can not boot either from internal eMMC (MMC1) or the uSD card on the baseboard (MMC2) using the device tree. Signed-off-by: Adam Ford commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a Author: Adam Ford Date: Thu May 23 14:11:30 2019 -0500 spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 Currently, when the spl_boot_device checks the boot device, it will only return MMC1 when it's either sd or eMMC regardless of whether or not it's MMC1 or MMC2. This is a problem when booting from MMC2 if MMC isn't being manually configured like in the DM_SPL case with SPL_OF_CONTROL. This patch will check the register and return either MMC1 or MMC2. Signed-off-by: Adam Ford Two of them affects just imx6q_logic, the only one with more side-effects is the one we discuss here. Of course, I can revert all three of them if you prefer to go on this way (I am happy with follow up pathces,too, after reverting just 14d319b1856). Regards, Stefano -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Tue, Oct 8, 2019 at 5:19 AM Stefano Babic wrote: > > Hi everybody, > > thanks for deep analyses (I just jump at the end): > > On 08/10/19 12:03, Peter Robinson wrote: > >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > >>> Hi Vagrant, > >>> > >>> On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > >>> wrote: > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > u-boot.img from MMC: > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > 08:03:23 +) > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > >>> > >>> Thanks for reporting this issue. > >>> > >>> Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > >>> and Baruch on Cc. > >> > >> Works after reverting the following commit. > > > > For reference reverting this on 2019.10 fixed my issues with the udoo_neo > > board. > > > >> 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > >> commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > >> Author: Adam Ford > >> Date: Thu May 23 14:11:30 2019 -0500 > >> > >> spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > >> > >> Currently, when the spl_boot_device checks the boot device, it > >> will only return MMC1 when it's either sd or eMMC regardless > >> of whether or not it's MMC1 or MMC2. This is a problem when > >> booting from MMC2 if MMC isn't being manually configured like in > >> the DM_SPL case with SPL_OF_CONTROL. > >> > >> This patch will check the register and return either MMC1 or MMC2. > >> > >> Signed-off-by: Adam Ford > >> > > I tend to revert the pathc and let the "standard" case working. A board > maintainer coould add a board_boot_order() function to still overwrite > the behavior of spl_boot_device(). I will revert this and the rest of the series that goes with it. I just need some time to wake up and test it. I'll have something in a couple hours. adam > > Regards, > Stefano > > > -- > = > DENX Software Engineering GmbH, Managing Director: Wolfgang Denk > HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany > Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de > = > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi everybody, thanks for deep analyses (I just jump at the end): On 08/10/19 12:03, Peter Robinson wrote: >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >>> Hi Vagrant, >>> >>> On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >>> wrote: I just tested mx6cuboxi with 2019.10-rc4, and it fails to load u-boot.img from MMC: 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - 08:03:23 +) 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 3 2019-09-26_17:31:27.63095 MMC Device 1 not found 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### >>> >>> Thanks for reporting this issue. >>> >>> Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >>> and Baruch on Cc. >> >> Works after reverting the following commit. > > For reference reverting this on 2019.10 fixed my issues with the udoo_neo > board. > >> 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit >> commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a >> Author: Adam Ford >> Date: Thu May 23 14:11:30 2019 -0500 >> >> spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 >> >> Currently, when the spl_boot_device checks the boot device, it >> will only return MMC1 when it's either sd or eMMC regardless >> of whether or not it's MMC1 or MMC2. This is a problem when >> booting from MMC2 if MMC isn't being manually configured like in >> the DM_SPL case with SPL_OF_CONTROL. >> >> This patch will check the register and return either MMC1 or MMC2. >> >> Signed-off-by: Adam Ford >> I tend to revert the pathc and let the "standard" case working. A board maintainer coould add a board_boot_order() function to still overwrite the behavior of spl_boot_device(). Regards, Stefano -- = DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de = ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > Hi Vagrant, > > > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > wrote: > > > > > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > > u-boot.img from MMC: > > > > > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > > > 08:03:23 +) > > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > > > Thanks for reporting this issue. > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > and Baruch on Cc. > > Works after reverting the following commit. For reference reverting this on 2019.10 fixed my issues with the udoo_neo board. > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > Author: Adam Ford > Date: Thu May 23 14:11:30 2019 -0500 > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > Currently, when the spl_boot_device checks the boot device, it > will only return MMC1 when it's either sd or eMMC regardless > of whether or not it's MMC1 or MMC2. This is a problem when > booting from MMC2 if MMC isn't being manually configured like in > the DM_SPL case with SPL_OF_CONTROL. > > This patch will check the register and return either MMC1 or MMC2. > > Signed-off-by: Adam Ford > > arch/arm/mach-imx/spl.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > ___ > U-Boot mailing list > U-Boot@lists.denx.de > https://lists.denx.de/listinfo/u-boot ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 10:55 AM Baruch Siach wrote: > > Hi Adam, > > On Sun, Oct 06 2019, Adam Ford wrote: > > On Sun, Oct 6, 2019 at 7:48 AM Baruch Siach wrote: > >> On Sun, Oct 06 2019, Adam Ford wrote: > >> > On Sun, Oct 6, 2019 at 7:30 AM Adam Ford wrote: > >> >> > >> >> On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: > >> >> > > >> >> > Hi Adam, > >> >> > > >> >> > On Sun, Oct 06 2019, Adam Ford wrote: > >> >> > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach > >> >> > > wrote: > >> >> > >> (Adding MMC and i.MX maintainers to Cc) > >> >> > >> > >> >> > >> On Fri, Sep 27 2019, Adam Ford wrote: > >> >> > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray > >> >> > >> > wrote: > >> >> > >> >> > >> >> > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > >> >> > >> >> > Hi Vagrant, > >> >> > >> >> > > >> >> > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> >> > >> >> > debian.org> wrote: > >> >> > >> >> > > > >> >> > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to > >> >> > >> >> > > load > >> >> > >> >> > > u-boot.img from MMC: > >> >> > >> >> > > > >> >> > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 > >> >> > >> >> > > (Sep 24 2019 - > >> >> > >> >> > > 08:03:23 +) > >> >> > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > >> >> > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > >> >> > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device > >> >> > >> >> > > 1. error: -19 > >> >> > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all > >> >> > >> >> > > boot devices > >> >> > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the > >> >> > >> >> > > board ### > >> >> > >> >> > > >> >> > >> >> > Thanks for reporting this issue. > >> >> > >> >> > > >> >> > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am > >> >> > >> >> > adding Jon > >> >> > >> >> > and Baruch on Cc. > >> >> > >> >> > >> >> > >> >> Works after reverting the following commit. > >> >> > >> >> > >> >> > >> > I am going to argue that making the board comply with DM_MMC is > >> >> > >> > why I > >> >> > >> > needed to make the patch, because when booting from MMC2, the > >> >> > >> > function > >> >> > >> > was returning MMC1 which was clearly not the boot source. > >> >> > >> > > >> >> > >> > If the boards that fail accept MMC2 as a response when booting > >> >> > >> > from > >> >> > >> > MMC2, that seems like a bug on the indvidual boards. Instead > >> >> > >> > they > >> >> > >> > should setup their boot sequence to configure MMC2 when MMC2 is > >> >> > >> > the > >> >> > >> > boot source. Instead, it seems like some boards are configuring > >> >> > >> > MMC1 > >> >> > >> > with MMC2 info which only prolongs the conversion to DM_MMC. > >> >> > >> > > >> >> > >> > If we revert the patch, then boards like imx6_logic who rely > >> >> > >> > solely on > >> >> > >> > device tree and DM_MMC for booting will have to manually > >> >> > >> > override the > >> >> > >> > MMC driver in order to boot from MMC2, and that seems like a step > >> >> > >> > backwards. I would argue that this board should migrate to > >> >> > >> > DM_MMC and > >> >> > >> > use the device tree to boot, and the problem should go away. > >> >> > >> > >> >> > >> I started working on migration to DM_MMC as you suggested. > >> >> > >> Unfortunately > >> >> > >> I can't see how this solves the problem for Cubox-i/Hummingboard, > >> >> > >> nor in > >> >> > >> the general case. > >> >> > >> > >> >> > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for > >> >> > >> boot, and > >> >> > >> both are always enabled. This matches perfectly to > >> >> > >> BOOT_DEVICE_MMC{1,2}, > >> >> > >> and their corresponding DT representation. > >> >> > >> > >> >> > >> However, the 'index' parameter in uclass_get_device() that is set > >> >> > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with > >> >> > >> the > >> >> > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC > >> >> > >> device > >> >> > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, > >> >> > >> usdhc1 > >> >> > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is > >> >> > >> an > >> >> > >> optional eMMC. When booting from SD card, uclass_get_device(), > >> >> > >> returns > >> >> > >> -ENODEV when eMMC is not available, or the eMMC device when it is > >> >> > >> available. In both cases, boot fails. > >> >> > > >> >> > I think you missed this part. See more below. > >> >> > > >> >> > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > >> >> > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > >> >> > >> > >> >> > > > >> >> > > My patch only extended it to support MMC1 or MMC2. I don't have > >> >> > > hardware to test MMC3 or MMC4, nor where they defined in the boot > >> >> > > table. > >> >> > > The
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Adam, On Sun, Oct 06 2019, Adam Ford wrote: > On Sun, Oct 6, 2019 at 7:48 AM Baruch Siach wrote: >> On Sun, Oct 06 2019, Adam Ford wrote: >> > On Sun, Oct 6, 2019 at 7:30 AM Adam Ford wrote: >> >> >> >> On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: >> >> > >> >> > Hi Adam, >> >> > >> >> > On Sun, Oct 06 2019, Adam Ford wrote: >> >> > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: >> >> > >> (Adding MMC and i.MX maintainers to Cc) >> >> > >> >> >> > >> On Fri, Sep 27 2019, Adam Ford wrote: >> >> > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray >> >> > >> > wrote: >> >> > >> >> >> >> > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >> >> > >> >> > Hi Vagrant, >> >> > >> >> > >> >> > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > >> > >> >> > debian.org> wrote: >> >> > >> >> > > >> >> > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> >> > >> >> > > u-boot.img from MMC: >> >> > >> >> > > >> >> > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 >> >> > >> >> > > (Sep 24 2019 - >> >> > >> >> > > 08:03:23 +) >> >> > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> >> > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> >> > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. >> >> > >> >> > > error: -19 >> >> > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot >> >> > >> >> > > devices >> >> > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the >> >> > >> >> > > board ### >> >> > >> >> > >> >> > >> >> > Thanks for reporting this issue. >> >> > >> >> > >> >> > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding >> >> > >> >> > Jon >> >> > >> >> > and Baruch on Cc. >> >> > >> >> >> >> > >> >> Works after reverting the following commit. >> >> > >> >> >> >> > >> > I am going to argue that making the board comply with DM_MMC is >> >> > >> > why I >> >> > >> > needed to make the patch, because when booting from MMC2, the >> >> > >> > function >> >> > >> > was returning MMC1 which was clearly not the boot source. >> >> > >> > >> >> > >> > If the boards that fail accept MMC2 as a response when booting from >> >> > >> > MMC2, that seems like a bug on the indvidual boards. Instead they >> >> > >> > should setup their boot sequence to configure MMC2 when MMC2 is the >> >> > >> > boot source. Instead, it seems like some boards are configuring >> >> > >> > MMC1 >> >> > >> > with MMC2 info which only prolongs the conversion to DM_MMC. >> >> > >> > >> >> > >> > If we revert the patch, then boards like imx6_logic who rely >> >> > >> > solely on >> >> > >> > device tree and DM_MMC for booting will have to manually override >> >> > >> > the >> >> > >> > MMC driver in order to boot from MMC2, and that seems like a step >> >> > >> > backwards. I would argue that this board should migrate to DM_MMC >> >> > >> > and >> >> > >> > use the device tree to boot, and the problem should go away. >> >> > >> >> >> > >> I started working on migration to DM_MMC as you suggested. >> >> > >> Unfortunately >> >> > >> I can't see how this solves the problem for Cubox-i/Hummingboard, >> >> > >> nor in >> >> > >> the general case. >> >> > >> >> >> > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, >> >> > >> and >> >> > >> both are always enabled. This matches perfectly to >> >> > >> BOOT_DEVICE_MMC{1,2}, >> >> > >> and their corresponding DT representation. >> >> > >> >> >> > >> However, the 'index' parameter in uclass_get_device() that is set >> >> > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with >> >> > >> the >> >> > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC >> >> > >> device >> >> > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, >> >> > >> usdhc1 >> >> > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an >> >> > >> optional eMMC. When booting from SD card, uclass_get_device(), >> >> > >> returns >> >> > >> -ENODEV when eMMC is not available, or the eMMC device when it is >> >> > >> available. In both cases, boot fails. >> >> > >> >> > I think you missed this part. See more below. >> >> > >> >> > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 >> >> > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? >> >> > >> >> >> > > >> >> > > My patch only extended it to support MMC1 or MMC2. I don't have >> >> > > hardware to test MMC3 or MMC4, nor where they defined in the boot >> >> > > table. >> >> > > The intention what to eliminate all functions from board files which >> >> > > did a something like: >> >> > > >> >> > > static int mmc_init_spl(bd_t *bis) >> >> > > { >> >> > > struct src *psrc = (struct src *)SRC_BASE_ADDR; >> >> > > unsigned reg = readl(>sbmr1) >> 11; >> >> > > >> >> > > /* >> >> > > * Upon reading BOOT_CFG register the
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 7:48 AM Baruch Siach wrote: > > Hi Adam, > > On Sun, Oct 06 2019, Adam Ford wrote: > > On Sun, Oct 6, 2019 at 7:30 AM Adam Ford wrote: > >> > >> On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: > >> > > >> > Hi Adam, > >> > > >> > On Sun, Oct 06 2019, Adam Ford wrote: > >> > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: > >> > >> (Adding MMC and i.MX maintainers to Cc) > >> > >> > >> > >> On Fri, Sep 27 2019, Adam Ford wrote: > >> > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray > >> > >> > wrote: > >> > >> >> > >> > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > >> > >> >> > Hi Vagrant, > >> > >> >> > > >> > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> > >> >> > debian.org> wrote: > >> > >> >> > > > >> > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > >> > >> >> > > u-boot.img from MMC: > >> > >> >> > > > >> > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep > >> > >> >> > > 24 2019 - > >> > >> >> > > 08:03:23 +) > >> > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > >> > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > >> > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > >> > >> >> > > error: -19 > >> > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > >> > >> >> > > devices > >> > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the > >> > >> >> > > board ### > >> > >> >> > > >> > >> >> > Thanks for reporting this issue. > >> > >> >> > > >> > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding > >> > >> >> > Jon > >> > >> >> > and Baruch on Cc. > >> > >> >> > >> > >> >> Works after reverting the following commit. > >> > >> >> > >> > >> > I am going to argue that making the board comply with DM_MMC is why > >> > >> > I > >> > >> > needed to make the patch, because when booting from MMC2, the > >> > >> > function > >> > >> > was returning MMC1 which was clearly not the boot source. > >> > >> > > >> > >> > If the boards that fail accept MMC2 as a response when booting from > >> > >> > MMC2, that seems like a bug on the indvidual boards. Instead they > >> > >> > should setup their boot sequence to configure MMC2 when MMC2 is the > >> > >> > boot source. Instead, it seems like some boards are configuring > >> > >> > MMC1 > >> > >> > with MMC2 info which only prolongs the conversion to DM_MMC. > >> > >> > > >> > >> > If we revert the patch, then boards like imx6_logic who rely solely > >> > >> > on > >> > >> > device tree and DM_MMC for booting will have to manually override > >> > >> > the > >> > >> > MMC driver in order to boot from MMC2, and that seems like a step > >> > >> > backwards. I would argue that this board should migrate to DM_MMC > >> > >> > and > >> > >> > use the device tree to boot, and the problem should go away. > >> > >> > >> > >> I started working on migration to DM_MMC as you suggested. > >> > >> Unfortunately > >> > >> I can't see how this solves the problem for Cubox-i/Hummingboard, nor > >> > >> in > >> > >> the general case. > >> > >> > >> > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, > >> > >> and > >> > >> both are always enabled. This matches perfectly to > >> > >> BOOT_DEVICE_MMC{1,2}, > >> > >> and their corresponding DT representation. > >> > >> > >> > >> However, the 'index' parameter in uclass_get_device() that is set > >> > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the > >> > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC > >> > >> device > >> > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, > >> > >> usdhc1 > >> > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an > >> > >> optional eMMC. When booting from SD card, uclass_get_device(), returns > >> > >> -ENODEV when eMMC is not available, or the eMMC device when it is > >> > >> available. In both cases, boot fails. > >> > > >> > I think you missed this part. See more below. > >> > > >> > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > >> > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > >> > >> > >> > > > >> > > My patch only extended it to support MMC1 or MMC2. I don't have > >> > > hardware to test MMC3 or MMC4, nor where they defined in the boot > >> > > table. > >> > > The intention what to eliminate all functions from board files which > >> > > did a something like: > >> > > > >> > > static int mmc_init_spl(bd_t *bis) > >> > > { > >> > > struct src *psrc = (struct src *)SRC_BASE_ADDR; > >> > > unsigned reg = readl(>sbmr1) >> 11; > >> > > > >> > > /* > >> > > * Upon reading BOOT_CFG register the following map is done: > >> > > * Bit 11 and 12 of BOOT_CFG register can determine the current > >> > > * mmc port > >> > > * 0x1 SD2 > >> > >
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Adam, On Sun, Oct 06 2019, Adam Ford wrote: > On Sun, Oct 6, 2019 at 7:30 AM Adam Ford wrote: >> >> On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: >> > >> > Hi Adam, >> > >> > On Sun, Oct 06 2019, Adam Ford wrote: >> > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: >> > >> (Adding MMC and i.MX maintainers to Cc) >> > >> >> > >> On Fri, Sep 27 2019, Adam Ford wrote: >> > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray >> > >> > wrote: >> > >> >> >> > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >> > >> >> > Hi Vagrant, >> > >> >> > >> > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > >> >> > debian.org> wrote: >> > >> >> > > >> > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> > >> >> > > u-boot.img from MMC: >> > >> >> > > >> > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep >> > >> >> > > 24 2019 - >> > >> >> > > 08:03:23 +) >> > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. >> > >> >> > > error: -19 >> > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot >> > >> >> > > devices >> > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board >> > >> >> > > ### >> > >> >> > >> > >> >> > Thanks for reporting this issue. >> > >> >> > >> > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >> > >> >> > and Baruch on Cc. >> > >> >> >> > >> >> Works after reverting the following commit. >> > >> >> >> > >> > I am going to argue that making the board comply with DM_MMC is why I >> > >> > needed to make the patch, because when booting from MMC2, the function >> > >> > was returning MMC1 which was clearly not the boot source. >> > >> > >> > >> > If the boards that fail accept MMC2 as a response when booting from >> > >> > MMC2, that seems like a bug on the indvidual boards. Instead they >> > >> > should setup their boot sequence to configure MMC2 when MMC2 is the >> > >> > boot source. Instead, it seems like some boards are configuring MMC1 >> > >> > with MMC2 info which only prolongs the conversion to DM_MMC. >> > >> > >> > >> > If we revert the patch, then boards like imx6_logic who rely solely on >> > >> > device tree and DM_MMC for booting will have to manually override the >> > >> > MMC driver in order to boot from MMC2, and that seems like a step >> > >> > backwards. I would argue that this board should migrate to DM_MMC and >> > >> > use the device tree to boot, and the problem should go away. >> > >> >> > >> I started working on migration to DM_MMC as you suggested. Unfortunately >> > >> I can't see how this solves the problem for Cubox-i/Hummingboard, nor in >> > >> the general case. >> > >> >> > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and >> > >> both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, >> > >> and their corresponding DT representation. >> > >> >> > >> However, the 'index' parameter in uclass_get_device() that is set >> > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the >> > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC device >> > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 >> > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an >> > >> optional eMMC. When booting from SD card, uclass_get_device(), returns >> > >> -ENODEV when eMMC is not available, or the eMMC device when it is >> > >> available. In both cases, boot fails. >> > >> > I think you missed this part. See more below. >> > >> > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 >> > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? >> > >> >> > > >> > > My patch only extended it to support MMC1 or MMC2. I don't have >> > > hardware to test MMC3 or MMC4, nor where they defined in the boot >> > > table. >> > > The intention what to eliminate all functions from board files which >> > > did a something like: >> > > >> > > static int mmc_init_spl(bd_t *bis) >> > > { >> > > struct src *psrc = (struct src *)SRC_BASE_ADDR; >> > > unsigned reg = readl(>sbmr1) >> 11; >> > > >> > > /* >> > > * Upon reading BOOT_CFG register the following map is done: >> > > * Bit 11 and 12 of BOOT_CFG register can determine the current >> > > * mmc port >> > > * 0x1 SD2 >> > > * 0x2 SD3 >> > > */ >> > > switch (reg & 0x3) { >> > > ... >> > > } >> > > } >> > > >> > >> How is all that intended to work? >> > > >> > > Basically the above function determines which BOOT_CFG regiser is used >> > > and returns sets MMC1 values to the returned value. In my case MMC1 >> > > was going to be configured with the clock and pin mux of mmc1 or 2. >> > > In
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 7:30 AM Adam Ford wrote: > > On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: > > > > Hi Adam, > > > > On Sun, Oct 06 2019, Adam Ford wrote: > > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: > > >> (Adding MMC and i.MX maintainers to Cc) > > >> > > >> On Fri, Sep 27 2019, Adam Ford wrote: > > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: > > >> >> > > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > >> >> > Hi Vagrant, > > >> >> > > > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > >> >> > debian.org> wrote: > > >> >> > > > > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > >> >> > > u-boot.img from MMC: > > >> >> > > > > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 > > >> >> > > 2019 - > > >> >> > > 08:03:23 +) > > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > > >> >> > > error: -19 > > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > > >> >> > > devices > > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board > > >> >> > > ### > > >> >> > > > >> >> > Thanks for reporting this issue. > > >> >> > > > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > >> >> > and Baruch on Cc. > > >> >> > > >> >> Works after reverting the following commit. > > >> >> > > >> > I am going to argue that making the board comply with DM_MMC is why I > > >> > needed to make the patch, because when booting from MMC2, the function > > >> > was returning MMC1 which was clearly not the boot source. > > >> > > > >> > If the boards that fail accept MMC2 as a response when booting from > > >> > MMC2, that seems like a bug on the indvidual boards. Instead they > > >> > should setup their boot sequence to configure MMC2 when MMC2 is the > > >> > boot source. Instead, it seems like some boards are configuring MMC1 > > >> > with MMC2 info which only prolongs the conversion to DM_MMC. > > >> > > > >> > If we revert the patch, then boards like imx6_logic who rely solely on > > >> > device tree and DM_MMC for booting will have to manually override the > > >> > MMC driver in order to boot from MMC2, and that seems like a step > > >> > backwards. I would argue that this board should migrate to DM_MMC and > > >> > use the device tree to boot, and the problem should go away. > > >> > > >> I started working on migration to DM_MMC as you suggested. Unfortunately > > >> I can't see how this solves the problem for Cubox-i/Hummingboard, nor in > > >> the general case. > > >> > > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and > > >> both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, > > >> and their corresponding DT representation. > > >> > > >> However, the 'index' parameter in uclass_get_device() that is set > > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the > > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC device > > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 > > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an > > >> optional eMMC. When booting from SD card, uclass_get_device(), returns > > >> -ENODEV when eMMC is not available, or the eMMC device when it is > > >> available. In both cases, boot fails. > > > > I think you missed this part. See more below. > > > > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > > >> > > > > > > My patch only extended it to support MMC1 or MMC2. I don't have > > > hardware to test MMC3 or MMC4, nor where they defined in the boot > > > table. > > > The intention what to eliminate all functions from board files which > > > did a something like: > > > > > > static int mmc_init_spl(bd_t *bis) > > > { > > > struct src *psrc = (struct src *)SRC_BASE_ADDR; > > > unsigned reg = readl(>sbmr1) >> 11; > > > > > > /* > > > * Upon reading BOOT_CFG register the following map is done: > > > * Bit 11 and 12 of BOOT_CFG register can determine the current > > > * mmc port > > > * 0x1 SD2 > > > * 0x2 SD3 > > > */ > > > switch (reg & 0x3) { > > > ... > > > } > > > } > > > > > >> How is all that intended to work? > > > > > > Basically the above function determines which BOOT_CFG regiser is used > > > and returns sets MMC1 values to the returned value. In my case MMC1 > > > was going to be configured with the clock and pin mux of mmc1 or 2. > > > In your case, mmc1 gets configured with the information for mmc2 or 3. > > > > But there is another side effect to this change. The code in spl_mmc.c > > uses
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 7:22 AM Baruch Siach wrote: > > Hi Adam, > > On Sun, Oct 06 2019, Adam Ford wrote: > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: > >> (Adding MMC and i.MX maintainers to Cc) > >> > >> On Fri, Sep 27 2019, Adam Ford wrote: > >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: > >> >> > >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > >> >> > Hi Vagrant, > >> >> > > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> >> > debian.org> wrote: > >> >> > > > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > >> >> > > u-boot.img from MMC: > >> >> > > > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 > >> >> > > 2019 - > >> >> > > 08:03:23 +) > >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. > >> >> > > error: -19 > >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot > >> >> > > devices > >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > >> >> > > >> >> > Thanks for reporting this issue. > >> >> > > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > >> >> > and Baruch on Cc. > >> >> > >> >> Works after reverting the following commit. > >> >> > >> > I am going to argue that making the board comply with DM_MMC is why I > >> > needed to make the patch, because when booting from MMC2, the function > >> > was returning MMC1 which was clearly not the boot source. > >> > > >> > If the boards that fail accept MMC2 as a response when booting from > >> > MMC2, that seems like a bug on the indvidual boards. Instead they > >> > should setup their boot sequence to configure MMC2 when MMC2 is the > >> > boot source. Instead, it seems like some boards are configuring MMC1 > >> > with MMC2 info which only prolongs the conversion to DM_MMC. > >> > > >> > If we revert the patch, then boards like imx6_logic who rely solely on > >> > device tree and DM_MMC for booting will have to manually override the > >> > MMC driver in order to boot from MMC2, and that seems like a step > >> > backwards. I would argue that this board should migrate to DM_MMC and > >> > use the device tree to boot, and the problem should go away. > >> > >> I started working on migration to DM_MMC as you suggested. Unfortunately > >> I can't see how this solves the problem for Cubox-i/Hummingboard, nor in > >> the general case. > >> > >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and > >> both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, > >> and their corresponding DT representation. > >> > >> However, the 'index' parameter in uclass_get_device() that is set > >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the > >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC device > >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 > >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an > >> optional eMMC. When booting from SD card, uclass_get_device(), returns > >> -ENODEV when eMMC is not available, or the eMMC device when it is > >> available. In both cases, boot fails. > > I think you missed this part. See more below. > > >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > >> > > > > My patch only extended it to support MMC1 or MMC2. I don't have > > hardware to test MMC3 or MMC4, nor where they defined in the boot > > table. > > The intention what to eliminate all functions from board files which > > did a something like: > > > > static int mmc_init_spl(bd_t *bis) > > { > > struct src *psrc = (struct src *)SRC_BASE_ADDR; > > unsigned reg = readl(>sbmr1) >> 11; > > > > /* > > * Upon reading BOOT_CFG register the following map is done: > > * Bit 11 and 12 of BOOT_CFG register can determine the current > > * mmc port > > * 0x1 SD2 > > * 0x2 SD3 > > */ > > switch (reg & 0x3) { > > ... > > } > > } > > > >> How is all that intended to work? > > > > Basically the above function determines which BOOT_CFG regiser is used > > and returns sets MMC1 values to the returned value. In my case MMC1 > > was going to be configured with the clock and pin mux of mmc1 or 2. > > In your case, mmc1 gets configured with the information for mmc2 or 3. > > But there is another side effect to this change. The code in spl_mmc.c > uses BOOT_DEVICE_MMC* macros to determine the boot device as I mentioned > above. These macros have nothing to do with usdhcX sequence > numbering. When usdhc1 is missing, BOOT_DEVICE_MMC1 refers to usdhc2 > which happens to be the first probed device, and BOOT_DEVICE_MMC2 > becomes usdhc3. This code
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Adam, On Sun, Oct 06 2019, Adam Ford wrote: > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: >> (Adding MMC and i.MX maintainers to Cc) >> >> On Fri, Sep 27 2019, Adam Ford wrote: >> > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: >> >> >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >> >> > Hi Vagrant, >> >> > >> >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > >> > debian.org> wrote: >> >> > > >> >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> >> > > u-boot.img from MMC: >> >> > > >> >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 >> >> > > 2019 - >> >> > > 08:03:23 +) >> >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: >> >> > > -19 >> >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices >> >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### >> >> > >> >> > Thanks for reporting this issue. >> >> > >> >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >> >> > and Baruch on Cc. >> >> >> >> Works after reverting the following commit. >> >> >> > I am going to argue that making the board comply with DM_MMC is why I >> > needed to make the patch, because when booting from MMC2, the function >> > was returning MMC1 which was clearly not the boot source. >> > >> > If the boards that fail accept MMC2 as a response when booting from >> > MMC2, that seems like a bug on the indvidual boards. Instead they >> > should setup their boot sequence to configure MMC2 when MMC2 is the >> > boot source. Instead, it seems like some boards are configuring MMC1 >> > with MMC2 info which only prolongs the conversion to DM_MMC. >> > >> > If we revert the patch, then boards like imx6_logic who rely solely on >> > device tree and DM_MMC for booting will have to manually override the >> > MMC driver in order to boot from MMC2, and that seems like a step >> > backwards. I would argue that this board should migrate to DM_MMC and >> > use the device tree to boot, and the problem should go away. >> >> I started working on migration to DM_MMC as you suggested. Unfortunately >> I can't see how this solves the problem for Cubox-i/Hummingboard, nor in >> the general case. >> >> The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and >> both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, >> and their corresponding DT representation. >> >> However, the 'index' parameter in uclass_get_device() that is set >> according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the >> usdhcX sequence number. It simply returns the Nth probed SD/eMMC device >> (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 >> is never used for boot, usdhc2 is always an SD card, and usdhc3 is an >> optional eMMC. When booting from SD card, uclass_get_device(), returns >> -ENODEV when eMMC is not available, or the eMMC device when it is >> available. In both cases, boot fails. I think you missed this part. See more below. >> In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 >> boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? >> > > My patch only extended it to support MMC1 or MMC2. I don't have > hardware to test MMC3 or MMC4, nor where they defined in the boot > table. > The intention what to eliminate all functions from board files which > did a something like: > > static int mmc_init_spl(bd_t *bis) > { > struct src *psrc = (struct src *)SRC_BASE_ADDR; > unsigned reg = readl(>sbmr1) >> 11; > > /* > * Upon reading BOOT_CFG register the following map is done: > * Bit 11 and 12 of BOOT_CFG register can determine the current > * mmc port > * 0x1 SD2 > * 0x2 SD3 > */ > switch (reg & 0x3) { > ... > } > } > >> How is all that intended to work? > > Basically the above function determines which BOOT_CFG regiser is used > and returns sets MMC1 values to the returned value. In my case MMC1 > was going to be configured with the clock and pin mux of mmc1 or 2. > In your case, mmc1 gets configured with the information for mmc2 or 3. But there is another side effect to this change. The code in spl_mmc.c uses BOOT_DEVICE_MMC* macros to determine the boot device as I mentioned above. These macros have nothing to do with usdhcX sequence numbering. When usdhc1 is missing, BOOT_DEVICE_MMC1 refers to usdhc2 which happens to be the first probed device, and BOOT_DEVICE_MMC2 becomes usdhc3. This code is broken since commit 14d319b185. spl_boot_device() can not blindly return BOOT_DEVICE_MMC{1,2} without knowing which devices are actually available. There must be some other way to achieve what you want without breaking boot when usdhc1 is missing. > Since it appears that
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 6:30 AM Adam Ford wrote: > > On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: > > > > Hi Adam, > > > > (Adding MMC and i.MX maintainers to Cc) > > > > On Fri, Sep 27 2019, Adam Ford wrote: > > > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: > > >> > > >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > >> > Hi Vagrant, > > >> > > > >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > >> > debian.org> wrote: > > >> > > > > >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > >> > > u-boot.img from MMC: > > >> > > > > >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 > > >> > > 2019 - > > >> > > 08:03:23 +) > > >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: > > >> > > -19 > > >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > >> > > > >> > Thanks for reporting this issue. > > >> > > > >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > >> > and Baruch on Cc. > > >> > > >> Works after reverting the following commit. > > >> > > > I am going to argue that making the board comply with DM_MMC is why I > > > needed to make the patch, because when booting from MMC2, the function > > > was returning MMC1 which was clearly not the boot source. > > > > > > If the boards that fail accept MMC2 as a response when booting from > > > MMC2, that seems like a bug on the indvidual boards. Instead they > > > should setup their boot sequence to configure MMC2 when MMC2 is the > > > boot source. Instead, it seems like some boards are configuring MMC1 > > > with MMC2 info which only prolongs the conversion to DM_MMC. > > > > > > If we revert the patch, then boards like imx6_logic who rely solely on > > > device tree and DM_MMC for booting will have to manually override the > > > MMC driver in order to boot from MMC2, and that seems like a step > > > backwards. I would argue that this board should migrate to DM_MMC and > > > use the device tree to boot, and the problem should go away. > > > > I started working on migration to DM_MMC as you suggested. Unfortunately > > I can't see how this solves the problem for Cubox-i/Hummingboard, nor in > > the general case. > > > > The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and > > both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, > > and their corresponding DT representation. > > > > However, the 'index' parameter in uclass_get_device() that is set > > according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the > > usdhcX sequence number. It simply returns the Nth probed SD/eMMC device > > (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 > > is never used for boot, usdhc2 is always an SD card, and usdhc3 is an > > optional eMMC. When booting from SD card, uclass_get_device(), returns > > -ENODEV when eMMC is not available, or the eMMC device when it is > > available. In both cases, boot fails. > > > > In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > > boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > > > > My patch only extended it to support MMC1 or MMC2. I don't have > hardware to test MMC3 or MMC4, nor where they defined in the boot > table. > The intention what to eliminate all functions from board files which > did a something like: > > static int mmc_init_spl(bd_t *bis) > { > struct src *psrc = (struct src *)SRC_BASE_ADDR; > unsigned reg = readl(>sbmr1) >> 11; > > /* > * Upon reading BOOT_CFG register the following map is done: > * Bit 11 and 12 of BOOT_CFG register can determine the current > * mmc port > * 0x1 SD2 > * 0x2 SD3 > */ > switch (reg & 0x3) { > ... > } > } > > > How is all that intended to work? > > Basically the above function determines which BOOT_CFG regiser is used > and returns sets MMC1 values to the returned value. In my case MMC1 > was going to be configured with the clock and pin mux of mmc1 or 2. > In your case, mmc1 gets configured with the information for mmc2 or 3. > Since it appears that arch/arm/mach-imx/spl.c is supposed to be able > to return the correct boot source, my goal was to make that function > actually return that which could eliminate the above function on all > boards. Unfortunately, I don't have hardware with MMC3 or MMC4, so I > couldn't test it and therefore didn't write it into the code. It was > my hope that someone with MMC3 or MMC4 would be able to easily expand > it in the hope to better facilitate support for DM_MMC and device tree > in SPL. > > > > > Aren't other i.MX boards impacted by this commit? > > Yes and no. If they
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Sun, Oct 6, 2019 at 5:23 AM Baruch Siach wrote: > > Hi Adam, > > (Adding MMC and i.MX maintainers to Cc) > > On Fri, Sep 27 2019, Adam Ford wrote: > > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: > >> > >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > >> > Hi Vagrant, > >> > > >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> > debian.org> wrote: > >> > > > >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > >> > > u-boot.img from MMC: > >> > > > >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 > >> > > - > >> > > 08:03:23 +) > >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: > >> > > -19 > >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > >> > > >> > Thanks for reporting this issue. > >> > > >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > >> > and Baruch on Cc. > >> > >> Works after reverting the following commit. > >> > > I am going to argue that making the board comply with DM_MMC is why I > > needed to make the patch, because when booting from MMC2, the function > > was returning MMC1 which was clearly not the boot source. > > > > If the boards that fail accept MMC2 as a response when booting from > > MMC2, that seems like a bug on the indvidual boards. Instead they > > should setup their boot sequence to configure MMC2 when MMC2 is the > > boot source. Instead, it seems like some boards are configuring MMC1 > > with MMC2 info which only prolongs the conversion to DM_MMC. > > > > If we revert the patch, then boards like imx6_logic who rely solely on > > device tree and DM_MMC for booting will have to manually override the > > MMC driver in order to boot from MMC2, and that seems like a step > > backwards. I would argue that this board should migrate to DM_MMC and > > use the device tree to boot, and the problem should go away. > > I started working on migration to DM_MMC as you suggested. Unfortunately > I can't see how this solves the problem for Cubox-i/Hummingboard, nor in > the general case. > > The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and > both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, > and their corresponding DT representation. > > However, the 'index' parameter in uclass_get_device() that is set > according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the > usdhcX sequence number. It simply returns the Nth probed SD/eMMC device > (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 > is never used for boot, usdhc2 is always an SD card, and usdhc3 is an > optional eMMC. When booting from SD card, uclass_get_device(), returns > -ENODEV when eMMC is not available, or the eMMC device when it is > available. In both cases, boot fails. > > In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 > boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? > My patch only extended it to support MMC1 or MMC2. I don't have hardware to test MMC3 or MMC4, nor where they defined in the boot table. The intention what to eliminate all functions from board files which did a something like: static int mmc_init_spl(bd_t *bis) { struct src *psrc = (struct src *)SRC_BASE_ADDR; unsigned reg = readl(>sbmr1) >> 11; /* * Upon reading BOOT_CFG register the following map is done: * Bit 11 and 12 of BOOT_CFG register can determine the current * mmc port * 0x1 SD2 * 0x2 SD3 */ switch (reg & 0x3) { ... } } > How is all that intended to work? Basically the above function determines which BOOT_CFG regiser is used and returns sets MMC1 values to the returned value. In my case MMC1 was going to be configured with the clock and pin mux of mmc1 or 2. In your case, mmc1 gets configured with the information for mmc2 or 3. Since it appears that arch/arm/mach-imx/spl.c is supposed to be able to return the correct boot source, my goal was to make that function actually return that which could eliminate the above function on all boards. Unfortunately, I don't have hardware with MMC3 or MMC4, so I couldn't test it and therefore didn't write it into the code. It was my hope that someone with MMC3 or MMC4 would be able to easily expand it in the hope to better facilitate support for DM_MMC and device tree in SPL. > > Aren't other i.MX boards impacted by this commit? Yes and no. If they only support MMC1 or MMC2 and have DM_MMC with device tree support, the theory is that mmc_init_spl(bd_t *bis) function can be completely eliminated. People with MMC3 and MMC4 as boot sources are quite possibly impacted, but like I said before, I was trying to lay the
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
> > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > u-boot.img from MMC: > > > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > > 08:03:23 +) > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > Thanks for reporting this issue. > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > and Baruch on Cc. For reference I have also seen the same with the udoo-neo and I have had reports from a Fedora user of a similar problem on the Wandboard. Peter ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Adam, (Adding MMC and i.MX maintainers to Cc) On Fri, Sep 27 2019, Adam Ford wrote: > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: >> >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >> > Hi Vagrant, >> > >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> > wrote: >> > > >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> > > u-boot.img from MMC: >> > > >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - >> > > 08:03:23 +) >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### >> > >> > Thanks for reporting this issue. >> > >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >> > and Baruch on Cc. >> >> Works after reverting the following commit. >> > I am going to argue that making the board comply with DM_MMC is why I > needed to make the patch, because when booting from MMC2, the function > was returning MMC1 which was clearly not the boot source. > > If the boards that fail accept MMC2 as a response when booting from > MMC2, that seems like a bug on the indvidual boards. Instead they > should setup their boot sequence to configure MMC2 when MMC2 is the > boot source. Instead, it seems like some boards are configuring MMC1 > with MMC2 info which only prolongs the conversion to DM_MMC. > > If we revert the patch, then boards like imx6_logic who rely solely on > device tree and DM_MMC for booting will have to manually override the > MMC driver in order to boot from MMC2, and that seems like a step > backwards. I would argue that this board should migrate to DM_MMC and > use the device tree to boot, and the problem should go away. I started working on migration to DM_MMC as you suggested. Unfortunately I can't see how this solves the problem for Cubox-i/Hummingboard, nor in the general case. The imx6_logic board happens to use only usdhc1 and usdhc2 for boot, and both are always enabled. This matches perfectly to BOOT_DEVICE_MMC{1,2}, and their corresponding DT representation. However, the 'index' parameter in uclass_get_device() that is set according to BOOT_DEVICE_MMC{1,2} selection has nothing to do with the usdhcX sequence number. It simply returns the Nth probed SD/eMMC device (see uclass_find_device()). In the case of Cubox-i/Hummingboard, usdhc1 is never used for boot, usdhc2 is always an SD card, and usdhc3 is an optional eMMC. When booting from SD card, uclass_get_device(), returns -ENODEV when eMMC is not available, or the eMMC device when it is available. In both cases, boot fails. In addition, your patch returns BOOT_DEVICE_MMC2 only for usdhc2 boot. All others return BOOT_DEVICE_MMC1. What about usdhc{3,4}? How is all that intended to work? Aren't other i.MX boards impacted by this commit? Thanks, baruch >> 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit >> commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a >> Author: Adam Ford >> Date: Thu May 23 14:11:30 2019 -0500 >> >> spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 >> >> Currently, when the spl_boot_device checks the boot device, it >> will only return MMC1 when it's either sd or eMMC regardless >> of whether or not it's MMC1 or MMC2. This is a problem when >> booting from MMC2 if MMC isn't being manually configured like in >> the DM_SPL case with SPL_OF_CONTROL. >> >> This patch will check the register and return either MMC1 or MMC2. >> >> Signed-off-by: Adam Ford >> >> arch/arm/mach-imx/spl.c | 8 +--- >> 1 file changed, 5 insertions(+), 3 deletions(-) -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}ooO--U--Ooo{= - bar...@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Baruch, On Sun, Sep 29, 2019 at 2:58 AM Baruch Siach wrote: > I'll try to migrate Cubox-i/Hummingboard to DM and OF_CONTORL as you > suggest. > > Is there a way to make a DT based U-Boot i.MX6 image work on both > Quad/Dual and DualLite/Solo? > > The kernel provide separate DTs for Quad/Dual and DualLite/Solo. What is > the right course in U-Boot? Run time DT detection? Yes, please look at board/wandboard/spl.c in board_fit_config_name_match() function for a reference. ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Adam, Thanks Vagrant and Jonathan for the report and investigation. On Fri, Sep 27 2019, Adam Ford wrote: > On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: >> On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: >> > Hi Vagrant, >> > >> > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian >> > wrote: >> > > >> > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load >> > > u-boot.img from MMC: >> > > >> > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - >> > > 08:03:23 +) >> > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 >> > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found >> > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 >> > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices >> > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### >> > >> > Thanks for reporting this issue. >> > >> > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon >> > and Baruch on Cc. >> >> Works after reverting the following commit. >> > I am going to argue that making the board comply with DM_MMC is why I > needed to make the patch, because when booting from MMC2, the function > was returning MMC1 which was clearly not the boot source. > > If the boards that fail accept MMC2 as a response when booting from > MMC2, that seems like a bug on the indvidual boards. Instead they > should setup their boot sequence to configure MMC2 when MMC2 is the > boot source. Instead, it seems like some boards are configuring MMC1 > with MMC2 info which only prolongs the conversion to DM_MMC. > > If we revert the patch, then boards like imx6_logic who rely solely on > device tree and DM_MMC for booting will have to manually override the > MMC driver in order to boot from MMC2, and that seems like a step > backwards. I would argue that this board should migrate to DM_MMC and > use the device tree to boot, and the problem should go away. I'll try to migrate Cubox-i/Hummingboard to DM and OF_CONTORL as you suggest. Is there a way to make a DT based U-Boot i.MX6 image work on both Quad/Dual and DualLite/Solo? The kernel provide separate DTs for Quad/Dual and DualLite/Solo. What is the right course in U-Boot? Run time DT detection? Thanks, baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}ooO--U--Ooo{= - bar...@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Fri, Sep 27, 2019 at 4:38 AM Jonathan Gray wrote: > > On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > > Hi Vagrant, > > > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian > > wrote: > > > > > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > > u-boot.img from MMC: > > > > > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > > > 08:03:23 +) > > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > > > Thanks for reporting this issue. > > > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > > and Baruch on Cc. > > Works after reverting the following commit. > I am going to argue that making the board comply with DM_MMC is why I needed to make the patch, because when booting from MMC2, the function was returning MMC1 which was clearly not the boot source. If the boards that fail accept MMC2 as a response when booting from MMC2, that seems like a bug on the indvidual boards. Instead they should setup their boot sequence to configure MMC2 when MMC2 is the boot source. Instead, it seems like some boards are configuring MMC1 with MMC2 info which only prolongs the conversion to DM_MMC. If we revert the patch, then boards like imx6_logic who rely solely on device tree and DM_MMC for booting will have to manually override the MMC driver in order to boot from MMC2, and that seems like a step backwards. I would argue that this board should migrate to DM_MMC and use the device tree to boot, and the problem should go away. adam > 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit > commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a > Author: Adam Ford > Date: Thu May 23 14:11:30 2019 -0500 > > spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 > > Currently, when the spl_boot_device checks the boot device, it > will only return MMC1 when it's either sd or eMMC regardless > of whether or not it's MMC1 or MMC2. This is a problem when > booting from MMC2 if MMC isn't being manually configured like in > the DM_SPL case with SPL_OF_CONTROL. > > This patch will check the register and return either MMC1 or MMC2. > > Signed-off-by: Adam Ford > > arch/arm/mach-imx/spl.c | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
On Thu, Sep 26, 2019 at 05:07:21PM -0300, Fabio Estevam wrote: > Hi Vagrant, > > On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian wrote: > > > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > > u-boot.img from MMC: > > > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > > 08:03:23 +) > > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### > > Thanks for reporting this issue. > > Unfortunately, I don't have access to my Cuboxi, so I am adding Jon > and Baruch on Cc. Works after reverting the following commit. 14d319b1856b86e593e01abd0a1e3c2d63b52a8a is the first bad commit commit 14d319b1856b86e593e01abd0a1e3c2d63b52a8a Author: Adam Ford Date: Thu May 23 14:11:30 2019 -0500 spl: imx6: Let spl_boot_device return USDHC1 or USDHC2 Currently, when the spl_boot_device checks the boot device, it will only return MMC1 when it's either sd or eMMC regardless of whether or not it's MMC1 or MMC2. This is a problem when booting from MMC2 if MMC isn't being manually configured like in the DM_SPL case with SPL_OF_CONTROL. This patch will check the register and return either MMC1 or MMC2. Signed-off-by: Adam Ford arch/arm/mach-imx/spl.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] mx6cuboxi fails to load u-boot.img
Hi Vagrant, On Thu, Sep 26, 2019 at 4:16 PM Vagrant Cascadian wrote: > > I just tested mx6cuboxi with 2019.10-rc4, and it fails to load > u-boot.img from MMC: > > 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - > 08:03:23 +) > 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 > 3 2019-09-26_17:31:27.63095 MMC Device 1 not found > 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 > 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices > 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### Thanks for reporting this issue. Unfortunately, I don't have access to my Cuboxi, so I am adding Jon and Baruch on Cc. > > Works fine with 2019.07. > > < xypron> vagrantc: CONFIG_DM_MMC, CONFIG_DM_USB is not used. The board > still uses the pre-driver-model drivers. So a candidate to be kicked out > of U-Boot. Yes, this conversion need to be done. Thanks ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] mx6cuboxi fails to load u-boot.img
I just tested mx6cuboxi with 2019.10-rc4, and it fails to load u-boot.img from MMC: 1 2019-09-26_17:31:27.63089 U-Boot SPL 2019.10-rc4+dfsg-1 (Sep 24 2019 - 08:03:23 +) 2 2019-09-26_17:31:27.63092 Trying to boot from MMC2 3 2019-09-26_17:31:27.63095 MMC Device 1 not found 4 2019-09-26_17:31:27.63097 spl: could not find mmc device 1. error: -19 5 2019-09-26_17:31:27.63099 SPL: failed to boot from all boot devices 6 2019-09-26_17:31:27.63101 ### ERROR ### Please RESET the board ### Works fine with 2019.07. < xypron> vagrantc: CONFIG_DM_MMC, CONFIG_DM_USB is not used. The board still uses the pre-driver-model drivers. So a candidate to be kicked out of U-Boot. Happy to test patches; I have several mx6cuboxi supported models available. live well, vagrant signature.asc Description: PGP signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot