mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
ARM: imx8m: Deduplicate CAAM init with arch_misc_init() call
Instead of duplicating code implemented by i.MX8M version of arch_misc_init() in every board, enable CONFIG_ARCH_MISC_INIT and call arch_misc_init() from spl_board_init(). This removes the duplication. No functional change. Signed-off-by: Marek Vasut <marex@denx.de> Reviewed-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
parent
5302576e93
commit
1f908b1898
12 changed files with 13 additions and 34 deletions
|
@ -53,15 +53,7 @@ static void spl_dram_init(void)
|
|||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||
}
|
||||
puts("Normal Boot\n");
|
||||
arch_misc_init();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SPL_LOAD_FIT
|
||||
|
|
|
@ -49,11 +49,8 @@ void spl_board_init(void)
|
|||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||
}
|
||||
arch_misc_init();
|
||||
|
||||
puts("Normal Boot\n");
|
||||
|
||||
ret = uclass_get_device_by_name(UCLASS_CLK,
|
||||
|
|
|
@ -37,14 +37,8 @@ void spl_dram_init(void)
|
|||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
arch_misc_init();
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize caam_jr: %d\n", ret);
|
||||
}
|
||||
/*
|
||||
* Set GIC clock to 500Mhz for OD VDD_SOC. Kernel driver does
|
||||
* not allow to change it. Should set the clock after PMIC
|
||||
|
|
|
@ -162,11 +162,7 @@ void spl_board_init(void)
|
|||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize %s: %d\n", dev->name, ret);
|
||||
}
|
||||
arch_misc_init();
|
||||
|
||||
puts("Normal Boot\n");
|
||||
|
||||
|
|
|
@ -53,14 +53,7 @@ void spl_dram_init(void)
|
|||
|
||||
void spl_board_init(void)
|
||||
{
|
||||
if (IS_ENABLED(CONFIG_FSL_CAAM)) {
|
||||
struct udevice *dev;
|
||||
int ret;
|
||||
|
||||
ret = uclass_get_device_by_driver(UCLASS_MISC, DM_DRIVER_GET(caam_jr), &dev);
|
||||
if (ret)
|
||||
printf("Failed to initialize %s: %d\n", dev->name, ret);
|
||||
}
|
||||
arch_misc_init();
|
||||
|
||||
/* Serial download mode */
|
||||
if (is_usb_boot()) {
|
||||
|
|
|
@ -34,6 +34,7 @@ CONFIG_DEFAULT_FDT_FILE="imx8mm-mx8menlo.dtb"
|
|||
CONFIG_LOG=y
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x910000
|
||||
|
|
|
@ -23,6 +23,7 @@ CONFIG_FIT_EXTERNAL_OFFSET=0x3000
|
|||
CONFIG_SPL_LOAD_FIT=y
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x910000
|
||||
|
|
|
@ -24,6 +24,7 @@ CONFIG_FIT_EXTERNAL_OFFSET=0x3000
|
|||
CONFIG_SPL_LOAD_FIT=y
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_MAX_SIZE=0x25000
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
|
|
|
@ -24,6 +24,7 @@ CONFIG_FIT_EXTERNAL_OFFSET=0x3000
|
|||
CONFIG_SPL_LOAD_FIT=y
|
||||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx8mn-ddr4-evk.dtb"
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_MAX_SIZE=0x25000
|
||||
|
|
|
@ -28,6 +28,7 @@ CONFIG_SPL_LOAD_FIT=y
|
|||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_OF_SYSTEM_SETUP=y
|
||||
CONFIG_DEFAULT_FDT_FILE="imx8mp-evk.dtb"
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_MAX_SIZE=0x26000
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
|
|
|
@ -31,6 +31,7 @@ CONFIG_SPL_LOAD_FIT=y
|
|||
# CONFIG_USE_SPL_FIT_GENERATOR is not set
|
||||
CONFIG_OF_BOARD_SETUP=y
|
||||
CONFIG_BOARD_TYPES=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x910000
|
||||
|
|
|
@ -36,6 +36,7 @@ CONFIG_PREBOOT="test -n ${fdtfile} || setenv fdtfile imx8mm-verdin-${variant}-${
|
|||
CONFIG_LOG=y
|
||||
# CONFIG_DISPLAY_BOARDINFO is not set
|
||||
CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
CONFIG_ARCH_MISC_INIT=y
|
||||
CONFIG_BOARD_LATE_INIT=y
|
||||
CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
|
||||
CONFIG_SPL_BSS_START_ADDR=0x910000
|
||||
|
|
Loading…
Reference in a new issue