mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-10-01 17:10:42 +09:00
sunxi: Use sunxi_get_boot_device
Our current board code duplicates a bit the sunxi_get_boot_device logic. Now that we can use that function in the full-flavoured U-Boot, remove that duplication and call the function instead. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
This commit is contained in:
parent
8829076a5b
commit
f4c3523c98
@ -32,6 +32,7 @@
|
|||||||
#include <libfdt.h>
|
#include <libfdt.h>
|
||||||
#include <nand.h>
|
#include <nand.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
|
#include <spl.h>
|
||||||
#include <sy8106a.h>
|
#include <sy8106a.h>
|
||||||
#include <asm/setup.h>
|
#include <asm/setup.h>
|
||||||
|
|
||||||
@ -720,11 +721,14 @@ static void setup_environment(const void *fdt)
|
|||||||
int misc_init_r(void)
|
int misc_init_r(void)
|
||||||
{
|
{
|
||||||
__maybe_unused int ret;
|
__maybe_unused int ret;
|
||||||
|
uint boot;
|
||||||
|
|
||||||
env_set("fel_booted", NULL);
|
env_set("fel_booted", NULL);
|
||||||
env_set("fel_scriptaddr", NULL);
|
env_set("fel_scriptaddr", NULL);
|
||||||
|
|
||||||
|
boot = sunxi_get_boot_device();
|
||||||
/* determine if we are running in FEL mode */
|
/* determine if we are running in FEL mode */
|
||||||
if (!is_boot0_magic(SPL_ADDR + 4)) { /* eGON.BT0 */
|
if (boot == BOOT_DEVICE_BOARD) {
|
||||||
env_set("fel_booted", "1");
|
env_set("fel_booted", "1");
|
||||||
parse_spl_header(SPL_ADDR);
|
parse_spl_header(SPL_ADDR);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user