diff options
author | Tom Rini <trini@konsulko.com> | 2020-05-15 21:44:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-05-15 21:44:46 -0400 |
commit | 515f613253cf0a892c3a321770ab927fa3d925cf (patch) | |
tree | 8385db76a60ea1ed2c3169b71b28e438557d2725 /common/board_r.c | |
parent | 585da32f4cedcad5a86534f45d397f352af7da0a (diff) | |
parent | c60f6d668dd6c439f4a88bdce3398ac05e5f8843 (diff) |
Merge branch '2020-05-15-kconfig-migrations'
- Convert CONFIG_DELAY_ENVIRONMENT to Kconfig and update initr_pci to be
Kconfig'd.
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/common/board_r.c b/common/board_r.c index d9015cd057..96034b874e 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -232,9 +232,8 @@ static int initr_unlock_ram_in_cache(void) #ifdef CONFIG_PCI static int initr_pci(void) { -#ifndef CONFIG_DM_PCI - pci_init(); -#endif + if (IS_ENABLED(CONFIG_PCI_INIT_R)) + pci_init(); return 0; } @@ -464,13 +463,14 @@ static int initr_mmc(void) */ static int should_load_env(void) { -#ifdef CONFIG_OF_CONTROL - return fdtdec_get_config_int(gd->fdt_blob, "load-environment", 1); -#elif defined CONFIG_DELAY_ENVIRONMENT - return 0; -#else + if (IS_ENABLED(CONFIG_OF_CONTROL)) + return fdtdec_get_config_int(gd->fdt_blob, + "load-environment", 1); + + if (IS_ENABLED(CONFIG_DELAY_ENVIRONMENT)) + return 0; + return 1; -#endif } static int initr_env(void) @@ -480,10 +480,10 @@ static int initr_env(void) env_relocate(); else env_set_default(NULL, 0); -#ifdef CONFIG_OF_CONTROL - env_set_hex("fdtcontroladdr", - (unsigned long)map_to_sysmem(gd->fdt_blob)); -#endif + + if (IS_ENABLED(CONFIG_OF_CONTROL)) + env_set_hex("fdtcontroladdr", + (unsigned long)map_to_sysmem(gd->fdt_blob)); /* Initialize from environment */ image_load_addr = env_get_ulong("loadaddr", 16, image_load_addr); |