Message ID | 1470794218-12048-1-git-send-email-jacob2.chen@rock-chips.com |
---|---|
State | Superseded |
Delegated to: | Simon Glass |
Headers | show |
On 9 August 2016 at 19:56, Jacob Chen <jacob2.chen@rock-chips.com> wrote: > Add eMMC dt node and define fallback boot devices. > > Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> > --- > > arch/arm/dts/rk3288-firefly.dts | 5 +++++ > board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ > 2 files changed, 13 insertions(+) Acked-by: Simon Glass <sjg@chromium.org>
Hi, On 12 August 2016 at 11:20, Simon Glass <sjg@chromium.org> wrote: > On 9 August 2016 at 19:56, Jacob Chen <jacob2.chen@rock-chips.com> wrote: >> Add eMMC dt node and define fallback boot devices. >> >> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> >> --- >> >> arch/arm/dts/rk3288-firefly.dts | 5 +++++ >> board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ >> 2 files changed, 13 insertions(+) > > Acked-by: Simon Glass <sjg@chromium.org> Unfortunately I cannot apply this. It appears to actually force booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to boot from MMC2'. I think it should continue to boot from whatever media it started with. So if it booted SPL from SD then it should load U-Boot from SD. Regards, Simon
Hi, I just copied thos code from the other boards. On the other boards, I didn't meet this situation.It will load u-boot from sd if it didn't detect u-boot in eMMC. I'll check why it's different in firefly. 2016-08-28 0:06 GMT+08:00, Simon Glass <sjg@chromium.org>: > Hi, > > On 12 August 2016 at 11:20, Simon Glass <sjg@chromium.org> wrote: >> On 9 August 2016 at 19:56, Jacob Chen <jacob2.chen@rock-chips.com> wrote: >>> Add eMMC dt node and define fallback boot devices. >>> >>> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> >>> --- >>> >>> arch/arm/dts/rk3288-firefly.dts | 5 +++++ >>> board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ >>> 2 files changed, 13 insertions(+) >> >> Acked-by: Simon Glass <sjg@chromium.org> > > Unfortunately I cannot apply this. It appears to actually force > booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to > boot from MMC2'. > > I think it should continue to boot from whatever media it started > with. So if it booted SPL from SD then it should load U-Boot from SD. > > Regards, > Simon > _______________________________________________ > U-Boot mailing list > U-Boot@lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot >
Hi, You probably did not short the clock of eMMC. If we don't press maskrom buttons(short the clock of eMMC), SPL will detect eMMC and try to load image from eMMC. if the eMMC is blank, it hangs. So if we specifies board_boot_order and want to boot from SD in FireFly, we have to short the clock of eMMC. The current code(spl_boot_device) will force to boot from SD rather than boot from whatever media it started with,.So we have to specifies board_boot_order if we want to boot from eMMC. Of course, It might be inconvenie to short the clock of eMMC in FireFly. Do you have any better idea? 2016-08-30 0:17 GMT+08:00 陈豪 <jacobchen110@gmail.com>: > Hi, > > I just copied thos code from the other boards. > > On the other boards, I didn't meet this situation.It will load u-boot > from sd if it didn't detect u-boot in eMMC. > > I'll check why it's different in firefly. > > 2016-08-28 0:06 GMT+08:00, Simon Glass <sjg@chromium.org>: >> Hi, >> >> On 12 August 2016 at 11:20, Simon Glass <sjg@chromium.org> wrote: >>> On 9 August 2016 at 19:56, Jacob Chen <jacob2.chen@rock-chips.com> wrote: >>>> Add eMMC dt node and define fallback boot devices. >>>> >>>> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> >>>> --- >>>> >>>> arch/arm/dts/rk3288-firefly.dts | 5 +++++ >>>> board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ >>>> 2 files changed, 13 insertions(+) >>> >>> Acked-by: Simon Glass <sjg@chromium.org> >> >> Unfortunately I cannot apply this. It appears to actually force >> booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to >> boot from MMC2'. >> >> I think it should continue to boot from whatever media it started >> with. So if it booted SPL from SD then it should load U-Boot from SD. >> >> Regards, >> Simon >> _______________________________________________ >> U-Boot mailing list >> U-Boot@lists.denx.de >> http://lists.denx.de/mailman/listinfo/u-boot >>
Hi, On 29 August 2016 at 21:02, 陈豪 <jacobchen110@gmail.com> wrote: > Hi, > > You probably did not short the clock of eMMC. > If we don't press maskrom buttons(short the clock of eMMC), SPL will > detect eMMC and try to load image from eMMC. if the eMMC is blank, it > hangs. > So if we specifies board_boot_order and want to boot from SD in > FireFly, we have to short the clock of eMMC. > > The current code(spl_boot_device) will force to boot from SD rather > than boot from whatever media it started > with,.So we have to specifies board_boot_order if we want to boot from eMMC. > > Of course, It might be inconvenie to short the clock of eMMC in > FireFly. Do you have any better idea? > (Please don't top post) I think that if it boots from SD then it should continue to boot from SD: SPL -> U-Boot -> Linux If it boots from eMMC then it should continue to boot from eMMC. How can we do this? Presumably there is a way to find out how we booted? - Simon > 2016-08-30 0:17 GMT+08:00 陈豪 <jacobchen110@gmail.com>: >> Hi, >> >> I just copied thos code from the other boards. >> >> On the other boards, I didn't meet this situation.It will load u-boot >> from sd if it didn't detect u-boot in eMMC. >> >> I'll check why it's different in firefly. >> >> 2016-08-28 0:06 GMT+08:00, Simon Glass <sjg@chromium.org>: >>> Hi, >>> >>> On 12 August 2016 at 11:20, Simon Glass <sjg@chromium.org> wrote: >>>> On 9 August 2016 at 19:56, Jacob Chen <jacob2.chen@rock-chips.com> wrote: >>>>> Add eMMC dt node and define fallback boot devices. >>>>> >>>>> Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> >>>>> --- >>>>> >>>>> arch/arm/dts/rk3288-firefly.dts | 5 +++++ >>>>> board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ >>>>> 2 files changed, 13 insertions(+) >>>> >>>> Acked-by: Simon Glass <sjg@chromium.org> >>> >>> Unfortunately I cannot apply this. It appears to actually force >>> booting from eMMC. So if the eMMC is blank, it hangs at 'Trying to >>> boot from MMC2'. >>> >>> I think it should continue to boot from whatever media it started >>> with. So if it booted SPL from SD then it should load U-Boot from SD. >>> >>> Regards, >>> Simon >>> _______________________________________________ >>> U-Boot mailing list >>> U-Boot@lists.denx.de >>> http://lists.denx.de/mailman/listinfo/u-boot >>>
diff --git a/arch/arm/dts/rk3288-firefly.dts b/arch/arm/dts/rk3288-firefly.dts index 3176d50..27f348e 100644 --- a/arch/arm/dts/rk3288-firefly.dts +++ b/arch/arm/dts/rk3288-firefly.dts @@ -67,6 +67,11 @@ u-boot,dm-pre-reloc; }; +&emmc { + u-boot,dm-pre-reloc; +}; + + &gpio3 { u-boot,dm-pre-reloc; }; diff --git a/board/firefly/firefly-rk3288/firefly-rk3288.c b/board/firefly/firefly-rk3288/firefly-rk3288.c index 5119e95..3e89389 100644 --- a/board/firefly/firefly-rk3288/firefly-rk3288.c +++ b/board/firefly/firefly-rk3288/firefly-rk3288.c @@ -5,3 +5,11 @@ */ #include <common.h> +#include <spl.h> + +void board_boot_order(u32 *spl_boot_list) +{ + /* eMMC prior to sdcard. */ + spl_boot_list[0] = BOOT_DEVICE_MMC2; + spl_boot_list[1] = BOOT_DEVICE_MMC1; +}
Add eMMC dt node and define fallback boot devices. Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com> --- arch/arm/dts/rk3288-firefly.dts | 5 +++++ board/firefly/firefly-rk3288/firefly-rk3288.c | 8 ++++++++ 2 files changed, 13 insertions(+)