mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 13:43:28 +00:00
xilinx: Introduce board_late_init_xilinx()
This function should keep common shared late configurations for Xilinx SoCs. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
b72f450527
commit
80fdef12b2
7 changed files with 28 additions and 9 deletions
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
obj-y := board.o
|
||||
obj-y += ../../xilinx/common/board.o
|
||||
|
||||
# Remove quotes
|
||||
hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0+
|
||||
|
||||
obj-y := board.o
|
||||
obj-y += ../../xilinx/common/board.o
|
||||
|
||||
# Remove quotes
|
||||
hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE))
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <asm/sections.h>
|
||||
#include <dm/uclass.h>
|
||||
#include <i2c.h>
|
||||
#include "board.h"
|
||||
|
||||
int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
|
||||
{
|
||||
|
@ -71,3 +72,10 @@ void *board_fdt_blob_setup(void)
|
|||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
int board_late_init_xilinx(void)
|
||||
{
|
||||
env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
12
board/xilinx/common/board.h
Normal file
12
board/xilinx/common/board.h
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* (C) Copyright 2020 Xilinx, Inc.
|
||||
* Michal Simek <michal.simek@xilinx.com>
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_XILINX_COMMON_BOARD_H
|
||||
#define _BOARD_XILINX_COMMON_BOARD_H
|
||||
|
||||
int board_late_init_xilinx(void);
|
||||
|
||||
#endif /* BOARD_XILINX_COMMON_BOARD_H */
|
|
@ -17,6 +17,7 @@
|
|||
#include <dm/uclass.h>
|
||||
#include <versalpl.h>
|
||||
#include <linux/sizes.h>
|
||||
#include "../common/board.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
@ -204,9 +205,7 @@ int board_late_init(void)
|
|||
initrd_hi = round_down(initrd_hi, SZ_16M);
|
||||
env_set_addr("initrd_high", (void *)initrd_hi);
|
||||
|
||||
env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
|
||||
|
||||
return 0;
|
||||
return board_late_init_xilinx();
|
||||
}
|
||||
|
||||
int dram_init_banksize(void)
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <zynqpl.h>
|
||||
#include <asm/arch/hardware.h>
|
||||
#include <asm/arch/sys_proto.h>
|
||||
#include "../common/board.h"
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
@ -76,9 +77,7 @@ int board_late_init(void)
|
|||
|
||||
env_set("boot_targets", new_targets);
|
||||
|
||||
env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
|
||||
|
||||
return 0;
|
||||
return board_late_init_xilinx();
|
||||
}
|
||||
|
||||
#if !defined(CONFIG_SYS_SDRAM_BASE) && !defined(CONFIG_SYS_SDRAM_SIZE)
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <zynqmp_firmware.h>
|
||||
#include <g_dnl.h>
|
||||
#include <linux/sizes.h>
|
||||
#include "../common/board.h"
|
||||
|
||||
#include "pm_cfg_obj.h"
|
||||
|
||||
|
@ -695,11 +696,9 @@ int board_late_init(void)
|
|||
initrd_hi = round_down(initrd_hi, SZ_16M);
|
||||
env_set_addr("initrd_high", (void *)initrd_hi);
|
||||
|
||||
env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
|
||||
|
||||
reset_reason();
|
||||
|
||||
return 0;
|
||||
return board_late_init_xilinx();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue