diff options
author | Tom Rini <trini@konsulko.com> | 2020-10-05 13:05:46 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-10-05 14:10:59 -0400 |
commit | b7e7831e5d5be047f421ddc1f308afc22764a893 (patch) | |
tree | 7d5f27c82b260278ed0b3ea96bce592b0505b898 /common | |
parent | 050acee119b3757fee3bd128f55d720fdd9bb890 (diff) | |
parent | caebff09efe8c061b4d99b82262c67fb2db9bbcf (diff) | |
download | u-boot-b7e7831e5d5be047f421ddc1f308afc22764a893.tar.gz |
Merge branch 'next'
Bring in the assorted changes that have been staged in the 'next' branch
prior to release.
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/board_f.c | 12 | ||||
-rw-r--r-- | common/image.c | 10 | ||||
-rw-r--r-- | common/init/handoff.c | 33 | ||||
-rw-r--r-- | common/log.c | 13 | ||||
-rw-r--r-- | common/log_syslog.c | 8 | ||||
-rw-r--r-- | common/spl/Kconfig | 4 | ||||
-rw-r--r-- | common/spl/spl_fit.c | 4 |
7 files changed, 32 insertions, 52 deletions
diff --git a/common/board_f.c b/common/board_f.c index d3444c7edc..62473abf79 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -215,8 +215,6 @@ static int announce_dram_init(void) static int show_dram_config(void) { unsigned long long size; - -#ifdef CONFIG_NR_DRAM_BANKS int i; debug("\nRAM Configuration:\n"); @@ -229,9 +227,6 @@ static int show_dram_config(void) #endif } debug("\nDRAM: "); -#else - size = gd->ram_size; -#endif print_size(size, ""); board_add_ram_info(0); @@ -242,10 +237,8 @@ static int show_dram_config(void) __weak int dram_init_banksize(void) { -#if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE) - gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].start = gd->ram_base; gd->bd->bi_dram[0].size = get_effective_memsize(); -#endif return 0; } @@ -603,9 +596,6 @@ int setup_bdinfo(void) { struct bd_info *bd = gd->bd; - bd->bi_memstart = gd->ram_base; /* start of memory */ - bd->bi_memsize = gd->ram_size; /* size in bytes */ - if (IS_ENABLED(CONFIG_SYS_HAS_SRAM)) { bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; /* start of SRAM */ bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */ diff --git a/common/image.c b/common/image.c index da8bccd400..645bfef169 100644 --- a/common/image.c +++ b/common/image.c @@ -685,14 +685,8 @@ phys_size_t env_get_bootm_size(void) return tmp; } -#if (defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)) && \ - defined(CONFIG_NR_DRAM_BANKS) - start = gd->bd->bi_dram[0].start; - size = gd->bd->bi_dram[0].size; -#else - start = gd->bd->bi_memstart; - size = gd->bd->bi_memsize; -#endif + start = gd->ram_base; + size = gd->ram_size; if (start + size > gd->ram_top) size = gd->ram_top - start; diff --git a/common/init/handoff.c b/common/init/handoff.c index e00b43e6a7..62071bd017 100644 --- a/common/init/handoff.c +++ b/common/init/handoff.c @@ -12,18 +12,15 @@ DECLARE_GLOBAL_DATA_PTR; void handoff_save_dram(struct spl_handoff *ho) { + struct bd_info *bd = gd->bd; + int i; + ho->ram_size = gd->ram_size; -#ifdef CONFIG_NR_DRAM_BANKS - { - struct bd_info *bd = gd->bd; - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - ho->ram_bank[i].start = bd->bi_dram[i].start; - ho->ram_bank[i].size = bd->bi_dram[i].size; - } + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + ho->ram_bank[i].start = bd->bi_dram[i].start; + ho->ram_bank[i].size = bd->bi_dram[i].size; } -#endif } void handoff_load_dram_size(struct spl_handoff *ho) @@ -33,15 +30,11 @@ void handoff_load_dram_size(struct spl_handoff *ho) void handoff_load_dram_banks(struct spl_handoff *ho) { -#ifdef CONFIG_NR_DRAM_BANKS - { - struct bd_info *bd = gd->bd; - int i; - - for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { - bd->bi_dram[i].start = ho->ram_bank[i].start; - bd->bi_dram[i].size = ho->ram_bank[i].size; - } + struct bd_info *bd = gd->bd; + int i; + + for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) { + bd->bi_dram[i].start = ho->ram_bank[i].start; + bd->bi_dram[i].size = ho->ram_bank[i].size; } -#endif } diff --git a/common/log.c b/common/log.c index 734d26de4a..9a5f100da3 100644 --- a/common/log.c +++ b/common/log.c @@ -191,12 +191,23 @@ static bool log_passes_filters(struct log_device *ldev, struct log_rec *rec) static int log_dispatch(struct log_rec *rec) { struct log_device *ldev; + static int processing_msg; + /* + * When a log driver writes messages (e.g. via the network stack) this + * may result in further generated messages. We cannot process them here + * as this might result in infinite recursion. + */ + if (processing_msg) + return 0; + + /* Emit message */ + processing_msg = 1; list_for_each_entry(ldev, &gd->log_head, sibling_node) { if (log_passes_filters(ldev, rec)) ldev->drv->emit(ldev, rec); } - + processing_msg = 0; return 0; } diff --git a/common/log_syslog.c b/common/log_syslog.c index 149ff5af31..2ae703fed7 100644 --- a/common/log_syslog.c +++ b/common/log_syslog.c @@ -35,16 +35,9 @@ static int log_syslog_emit(struct log_device *ldev, struct log_rec *rec) char *log_msg; int eth_hdr_size; struct in_addr bcast_ip; - static int processing_msg; unsigned int log_level; char *log_hostname; - /* Fend off messages from the network stack while writing a message */ - if (processing_msg) - return 0; - - processing_msg = 1; - /* Setup packet buffers */ net_init(); /* Disable hardware and put it into the reset state */ @@ -108,7 +101,6 @@ static int log_syslog_emit(struct log_device *ldev, struct log_rec *rec) net_send_packet((uchar *)msg, ptr - msg); out: - processing_msg = 0; return ret; } diff --git a/common/spl/Kconfig b/common/spl/Kconfig index af8255a8d6..807b1dc059 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -602,7 +602,7 @@ config SPL_FAT_WRITE Support for the underlying block device (e.g. MMC or USB) must be enabled separately. -config SPL_FPGA_SUPPORT +config SPL_FPGA bool "Support FPGAs" help Enable support for FPGAs in SPL. Field-programmable Gate Arrays @@ -1271,7 +1271,7 @@ config SPL_YMODEM_SUPPORT config SPL_ATF bool "Support ARM Trusted Firmware" - depends on ARM64 + depends on ARM64 && SPL_FIT help ATF(ARM Trusted Firmware) is a component for ARM AArch64 which is loaded by SPL (which is considered as BL2 in ATF terminology). diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index a8bfd388b1..0e27ad1d6a 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -253,7 +253,7 @@ static int spl_load_fit_image(struct spl_load_info *info, ulong sector, const void *data; bool external_data = false; - if (IS_ENABLED(CONFIG_SPL_FPGA_SUPPORT) || + if (IS_ENABLED(CONFIG_SPL_FPGA) || (IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP))) { if (fit_image_get_type(fit, node, &type)) puts("Cannot get image type.\n"); @@ -546,7 +546,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, return -1; } -#ifdef CONFIG_SPL_FPGA_SUPPORT +#ifdef CONFIG_SPL_FPGA node = spl_fit_get_image_node(fit, images, "fpga", 0); if (node >= 0) { /* Load the image and set up the spl_image structure */ |