mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-24 22:36:05 +00:00
arm: total_compute: Initialize environment variables
Initialize the environment variables 'fdt_addr_r' and 'kernel_addr_r' during the misc init phase. The static configurations are not needed, remove them. Signed-off-by: Boyan Karatotev <boyan.karatotev@arm.com> Signed-off-by: Leo Yan <leo.yan@arm.com>
This commit is contained in:
parent
ed36494724
commit
ea70352af8
3 changed files with 25 additions and 3 deletions
|
@ -1391,6 +1391,7 @@ config TARGET_TOTAL_COMPUTE
|
||||||
select DM_MMC
|
select DM_MMC
|
||||||
select DM_GPIO
|
select DM_GPIO
|
||||||
imply OF_HAS_PRIOR_STAGE
|
imply OF_HAS_PRIOR_STAGE
|
||||||
|
imply MISC_INIT_R
|
||||||
|
|
||||||
config TARGET_LS2080A_EMU
|
config TARGET_LS2080A_EMU
|
||||||
bool "Support ls2080a_emu"
|
bool "Support ls2080a_emu"
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
#include <dm.h>
|
#include <dm.h>
|
||||||
#include <dm/platform_data/serial_pl01x.h>
|
#include <dm/platform_data/serial_pl01x.h>
|
||||||
#include <env.h>
|
#include <env.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
|
|
||||||
#include <asm/armv8/mmu.h>
|
#include <asm/armv8/mmu.h>
|
||||||
#include <asm/global_data.h>
|
#include <asm/global_data.h>
|
||||||
#include <asm/system.h>
|
#include <asm/system.h>
|
||||||
|
@ -51,6 +53,27 @@ void *board_fdt_blob_setup(int *err)
|
||||||
return (void *)fw_dtb_pointer;
|
return (void *)fw_dtb_pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int misc_init_r(void)
|
||||||
|
{
|
||||||
|
size_t base;
|
||||||
|
|
||||||
|
if (!env_get("fdt_addr_r"))
|
||||||
|
env_set_hex("fdt_addr_r", fw_dtb_pointer);
|
||||||
|
|
||||||
|
if (!env_get("kernel_addr_r")) {
|
||||||
|
/*
|
||||||
|
* The kernel has to be 2M aligned and the first 64K at the
|
||||||
|
* start of SDRAM is reserved for DTB.
|
||||||
|
*/
|
||||||
|
base = gd->ram_base + SZ_2M;
|
||||||
|
assert(IS_ALIGNED(base, SZ_2M));
|
||||||
|
|
||||||
|
env_set_hex("kernel_addr_r", base);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int board_init(void)
|
int board_init(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -14,9 +14,7 @@
|
||||||
#define CFG_EXTRA_ENV_SETTINGS \
|
#define CFG_EXTRA_ENV_SETTINGS \
|
||||||
"bootm_size=0x20000000\0" \
|
"bootm_size=0x20000000\0" \
|
||||||
"load_addr=0xa0000000\0" \
|
"load_addr=0xa0000000\0" \
|
||||||
"kernel_addr_r=0x80080000\0" \
|
"initrd_addr_r=0x88000000\0"
|
||||||
"initrd_addr_r=0x88000000\0" \
|
|
||||||
"fdt_addr_r=0x83000000\0"
|
|
||||||
/*
|
/*
|
||||||
* If vbmeta partition is present, boot Android with verification using AVB.
|
* If vbmeta partition is present, boot Android with verification using AVB.
|
||||||
* Else if system partition is present (no vbmeta partition), boot Android
|
* Else if system partition is present (no vbmeta partition), boot Android
|
||||||
|
|
Loading…
Add table
Reference in a new issue