diff options
author | Tom Rini <trini@konsulko.com> | 2023-01-09 19:30:08 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-01-09 19:30:08 +0300 |
commit | cebdfc22da6eb81793b616e855bc4d6d89c1c7a6 (patch) | |
tree | 44eaafcbe4866712d361304882e7d56ca0ef1682 /common | |
parent | 62e2ad1ceafbfdf2c44d3dc1b6efc81e768a96b9 (diff) | |
parent | fe33066d246462551f385f204690a11018336ac8 (diff) | |
download | u-boot-cebdfc22da6eb81793b616e855bc4d6d89c1c7a6.tar.xz |
Merge branch 'next'
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 7 | ||||
-rw-r--r-- | common/board_f.c | 20 | ||||
-rw-r--r-- | common/board_r.c | 14 | ||||
-rw-r--r-- | common/cli_hush.c | 1 | ||||
-rw-r--r-- | common/fdt_support.c | 4 | ||||
-rw-r--r-- | common/init/board_init.c | 2 | ||||
-rw-r--r-- | common/memsize.c | 6 | ||||
-rw-r--r-- | common/spl/Kconfig | 7 | ||||
-rw-r--r-- | common/spl/Kconfig.nxp | 4 | ||||
-rw-r--r-- | common/spl/spl.c | 10 | ||||
-rw-r--r-- | common/spl/spl_fit.c | 2 | ||||
-rw-r--r-- | common/spl/spl_nand.c | 8 | ||||
-rw-r--r-- | common/spl/spl_nor.c | 2 | ||||
-rw-r--r-- | common/spl/spl_ram.c | 4 | ||||
-rw-r--r-- | common/spl/spl_sata.c | 4 | ||||
-rw-r--r-- | common/spl/spl_spi.c | 8 | ||||
-rw-r--r-- | common/spl/spl_ubi.c | 2 | ||||
-rw-r--r-- | common/spl/spl_xip.c | 2 |
18 files changed, 55 insertions, 52 deletions
diff --git a/common/Kconfig b/common/Kconfig index 21434c5cf1..8c71d3c972 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -676,6 +676,10 @@ config CLOCKS bool "Call set_cpu_clk_info" depends on ARM +config HWCONFIG + bool "hwconfig infrastructure" + default y if PPC || ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 + config SYS_FSL_CLK bool depends on ARCH_LS1021A || FSL_LSCH2 || FSL_LSCH3 || \ @@ -1082,3 +1086,6 @@ config FDT_SIMPLEFB These functions can be used by board to indicate to the OS the presence of the simple frame buffer with associated reserved memory + +config IO_TRACE + bool diff --git a/common/board_f.c b/common/board_f.c index e6117a7ba5..2b4edf30c9 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -329,12 +329,12 @@ __weak int mach_cpu_init(void) /* Get the top of usable RAM */ __weak phys_size_t board_get_usable_ram_top(phys_size_t total_size) { -#if defined(CONFIG_SYS_SDRAM_BASE) && CONFIG_SYS_SDRAM_BASE > 0 +#if defined(CFG_SYS_SDRAM_BASE) && CFG_SYS_SDRAM_BASE > 0 /* * Detect whether we have so much RAM that it goes past the end of our * 32-bit address space. If so, clip the usable RAM so it doesn't. */ - if (gd->ram_top < CONFIG_SYS_SDRAM_BASE) + if (gd->ram_top < CFG_SYS_SDRAM_BASE) /* * Will wrap back to top of 32-bit space when reservations * are made. @@ -369,8 +369,8 @@ static int setup_dest_addr(void) */ gd->ram_size -= CONFIG_SYS_MEM_TOP_HIDE; #endif -#ifdef CONFIG_SYS_SDRAM_BASE - gd->ram_base = CONFIG_SYS_SDRAM_BASE; +#ifdef CFG_SYS_SDRAM_BASE + gd->ram_base = CFG_SYS_SDRAM_BASE; #endif gd->ram_top = gd->ram_base + get_effective_memsize(); gd->ram_top = board_get_usable_ram_top(gd->mon_len); @@ -380,19 +380,19 @@ static int setup_dest_addr(void) return arch_setup_dest_addr(); } -#ifdef CONFIG_PRAM +#ifdef CFG_PRAM /* reserve protected RAM */ static int reserve_pram(void) { ulong reg; - reg = env_get_ulong("pram", 10, CONFIG_PRAM); + reg = env_get_ulong("pram", 10, CFG_PRAM); gd->relocaddr -= (reg << 10); /* size is in kB */ debug("Reserving %ldk for protected RAM at %08lx\n", reg, gd->relocaddr); return 0; } -#endif /* CONFIG_PRAM */ +#endif /* CFG_PRAM */ /* Round memory pointer down to next 4 kB limit */ static int reserve_round_4k(void) @@ -900,9 +900,9 @@ static const init_fnc_t init_sequence_f[] = { post_init_f, #endif INIT_FUNC_WATCHDOG_RESET -#if defined(CONFIG_SYS_DRAM_TEST) +#if defined(CFG_SYS_DRAM_TEST) testdram, -#endif /* CONFIG_SYS_DRAM_TEST */ +#endif /* CFG_SYS_DRAM_TEST */ INIT_FUNC_WATCHDOG_RESET #ifdef CONFIG_POST @@ -925,7 +925,7 @@ static const init_fnc_t init_sequence_f[] = { #ifdef CONFIG_OF_BOARD_FIXUP fix_fdt, #endif -#ifdef CONFIG_PRAM +#ifdef CFG_PRAM reserve_pram, #endif reserve_round_4k, diff --git a/common/board_r.c b/common/board_r.c index f7fb7df54a..42060ee709 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -346,7 +346,7 @@ static int initr_flash(void) * NOTE: Maybe we should add some schedule()? XXX */ if (env_get_yesno("flashchecksum") == 1) { - const uchar *flash_base = (const uchar *)CONFIG_SYS_FLASH_BASE; + const uchar *flash_base = (const uchar *)CFG_SYS_FLASH_BASE; printf(" CRC: %08X", crc32(0, flash_base, @@ -356,8 +356,8 @@ static int initr_flash(void) putc('\n'); /* update start of FLASH memory */ -#ifdef CONFIG_SYS_FLASH_BASE - bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; +#ifdef CFG_SYS_FLASH_BASE + bd->bi_flashstart = CFG_SYS_FLASH_BASE; #endif /* size of FLASH memory (final value) */ bd->bi_flashsize = flash_size; @@ -370,7 +370,7 @@ static int initr_flash(void) #if defined(CONFIG_OXC) || defined(CONFIG_RMU) /* flash mapped at end of memory map */ bd->bi_flashoffset = CONFIG_TEXT_BASE + flash_size; -#elif CONFIG_SYS_MONITOR_BASE == CONFIG_SYS_FLASH_BASE +#elif CONFIG_SYS_MONITOR_BASE == CFG_SYS_FLASH_BASE bd->bi_flashoffset = monitor_flash_len; /* reserved area for monitor */ #endif return 0; @@ -533,7 +533,7 @@ static int initr_ide(void) } #endif -#if defined(CONFIG_PRAM) +#if defined(CFG_PRAM) /* * Export available size of memory for Linux, taking into account the * protected RAM at top of memory @@ -543,7 +543,7 @@ int initr_mem(void) ulong pram = 0; char memsz[32]; - pram = env_get_ulong("pram", 10, CONFIG_PRAM); + pram = env_get_ulong("pram", 10, CFG_PRAM); sprintf(memsz, "%ldk", (long int)((gd->ram_size / 1024) - pram)); env_set("mem", memsz); @@ -791,7 +791,7 @@ static init_fnc_t init_sequence_r[] = { */ last_stage_init, #endif -#if defined(CONFIG_PRAM) +#if defined(CFG_PRAM) initr_mem, #endif run_main_loop, diff --git a/common/cli_hush.c b/common/cli_hush.c index 1467ff81b3..a80b84756b 100644 --- a/common/cli_hush.c +++ b/common/cli_hush.c @@ -112,7 +112,6 @@ #define applet_name "hush" #include "standalone.h" #define hush_main main -#undef CONFIG_FEATURE_SH_FANCY_PROMPT #define BB_BANNER #endif #endif diff --git a/common/fdt_support.c b/common/fdt_support.c index ebebffc789..dbceec6f2d 100644 --- a/common/fdt_support.c +++ b/common/fdt_support.c @@ -739,7 +739,7 @@ int fdt_delete_disabled_nodes(void *blob) } #ifdef CONFIG_PCI -#define CONFIG_SYS_PCI_NR_INBOUND_WIN 4 +#define CFG_SYS_PCI_NR_INBOUND_WIN 4 #define FDT_PCI_PREFETCH (0x40000000) #define FDT_PCI_MEM32 (0x02000000) @@ -751,7 +751,7 @@ int fdt_pci_dma_ranges(void *blob, int phb_off, struct pci_controller *hose) { int addrcell, sizecell, len, r; u32 *dma_range; /* sized based on pci addr cells, size-cells, & address-cells */ - u32 dma_ranges[(3 + 2 + 2) * CONFIG_SYS_PCI_NR_INBOUND_WIN]; + u32 dma_ranges[(3 + 2 + 2) * CFG_SYS_PCI_NR_INBOUND_WIN]; addrcell = fdt_getprop_u32_default(blob, "/", "#address-cells", 1); sizecell = fdt_getprop_u32_default(blob, "/", "#size-cells", 1); diff --git a/common/init/board_init.c b/common/init/board_init.c index 6a55026177..96ffb79a98 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -78,7 +78,7 @@ __weak void board_init_f_init_stack_protection(void) ulong board_init_f_alloc_reserve(ulong top) { /* Reserve early malloc arena */ -#ifndef CONFIG_MALLOC_F_ADDR +#ifndef CFG_MALLOC_F_ADDR #if CONFIG_VAL(SYS_MALLOC_F_LEN) top -= CONFIG_VAL(SYS_MALLOC_F_LEN); #endif diff --git a/common/memsize.c b/common/memsize.c index 54a6416717..66d5be6a1f 100644 --- a/common/memsize.c +++ b/common/memsize.c @@ -108,11 +108,11 @@ phys_size_t __weak get_effective_memsize(void) ram_size = ((phys_size_t)~0xfffULL) - gd->ram_base; #endif -#ifndef CONFIG_MAX_MEM_MAPPED +#ifndef CFG_MAX_MEM_MAPPED return ram_size; #else /* limit stack to what we can reasonable map */ - return ((ram_size > CONFIG_MAX_MEM_MAPPED) ? - CONFIG_MAX_MEM_MAPPED : ram_size); + return ((ram_size > CFG_MAX_MEM_MAPPED) ? + CFG_MAX_MEM_MAPPED : ram_size); #endif } diff --git a/common/spl/Kconfig b/common/spl/Kconfig index d774c930a8..a25d8fd2e0 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -1232,6 +1232,11 @@ config SPL_SATA expense and power consumption. This enables loading from SATA using a configured device. +config SYS_SATA_FAT_BOOT_PARTITION + int "Partition on the SATA disk to load U-Boot from" + depends on SPL_SATA && SPL_FS_FAT + default 1 + config SPL_SATA_RAW_U_BOOT_USE_SECTOR bool "SATA raw mode: by sector" depends on SPL_SATA @@ -1342,7 +1347,7 @@ config SPL_USB_HOST config SPL_USB_STORAGE bool "Support loading from USB" - depends on SPL_USB_HOST && !(BLK && !DM_USB) + depends on SPL_USB_HOST help Enable support for USB devices in SPL. This allows use of USB devices such as hard drives and flash drivers for loading U-Boot. diff --git a/common/spl/Kconfig.nxp b/common/spl/Kconfig.nxp index 8da85539af..fc696cf0ce 100644 --- a/common/spl/Kconfig.nxp +++ b/common/spl/Kconfig.nxp @@ -26,7 +26,7 @@ config SPL_SYS_CCSR_DO_NOT_RELOCATE bool "Ensures that CCSR is not relocated" depends on PPC help - If this is defined, then CONFIG_SYS_CCSRBAR_PHYS will be forced to a + If this is defined, then CFG_SYS_CCSRBAR_PHYS will be forced to a value that ensures that CCSR is not relocated. config TPL_SYS_CCSR_DO_NOT_RELOCATE @@ -59,7 +59,7 @@ config SPL_RELOC_TEXT_BASE config SPL_RELOC_STACK hex "Address of the start of the stack SPL will use after relocation." help - If unspecified, this is equal to CONFIG_SYS_SPL_MALLOC_START. Starting + If unspecified, this is equal to CFG_SYS_SPL_MALLOC_START. Starting address of the malloc pool used in SPL. When this option is set the full malloc is used in SPL and it is set up by spl_init() and before that, the simple malloc() can be used if CONFIG_SYS_MALLOC_F is defined. diff --git a/common/spl/spl.c b/common/spl/spl.c index 22d2a0621e..4668367b68 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -43,8 +43,8 @@ DECLARE_GLOBAL_DATA_PTR; DECLARE_BINMAN_MAGIC_SYM; -#ifndef CONFIG_SYS_UBOOT_START -#define CONFIG_SYS_UBOOT_START CONFIG_TEXT_BASE +#ifndef CFG_SYS_UBOOT_START +#define CFG_SYS_UBOOT_START CONFIG_TEXT_BASE #endif u32 *boot_params_ptr = NULL; @@ -250,7 +250,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->entry_point = u_boot_pos; spl_image->load_addr = u_boot_pos; } else { - spl_image->entry_point = CONFIG_SYS_UBOOT_START; + spl_image->entry_point = CFG_SYS_UBOOT_START; spl_image->load_addr = CONFIG_TEXT_BASE; } spl_image->os = IH_OS_U_BOOT; @@ -527,8 +527,8 @@ static int spl_common_init(bool setup_malloc) #if CONFIG_VAL(SYS_MALLOC_F_LEN) if (setup_malloc) { -#ifdef CONFIG_MALLOC_F_ADDR - gd->malloc_base = CONFIG_MALLOC_F_ADDR; +#ifdef CFG_MALLOC_F_ADDR + gd->malloc_base = CFG_MALLOC_F_ADDR; #endif gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN); gd->malloc_ptr = 0; diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index c1ed31e367..08da7fed88 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -828,7 +828,7 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, } /* - * If a platform does not provide CONFIG_SYS_UBOOT_START, U-Boot's + * If a platform does not provide CFG_SYS_UBOOT_START, U-Boot's * Makefile will set it to 0 and it will end up as the entry point * here. What it actually means is: use the load address. */ diff --git a/common/spl/spl_nand.c b/common/spl/spl_nand.c index 25a38be65e..dc45204fc0 100644 --- a/common/spl/spl_nand.c +++ b/common/spl/spl_nand.c @@ -26,12 +26,12 @@ static int spl_nand_load_image(struct spl_image_info *spl_image, nand_init(); printf("Loading U-Boot from 0x%08x (size 0x%08x) to 0x%08x\n", - CONFIG_SYS_NAND_U_BOOT_OFFS, CONFIG_SYS_NAND_U_BOOT_SIZE, - CONFIG_SYS_NAND_U_BOOT_DST); + CONFIG_SYS_NAND_U_BOOT_OFFS, CFG_SYS_NAND_U_BOOT_SIZE, + CFG_SYS_NAND_U_BOOT_DST); nand_spl_load_image(spl_nand_get_uboot_raw_page(), - CONFIG_SYS_NAND_U_BOOT_SIZE, - (void *)CONFIG_SYS_NAND_U_BOOT_DST); + CFG_SYS_NAND_U_BOOT_SIZE, + (void *)CFG_SYS_NAND_U_BOOT_DST); spl_set_header_raw_uboot(spl_image); nand_deselect(); diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index eaa95fb9b5..1ef5e41262 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -20,7 +20,7 @@ static ulong spl_nor_load_read(struct spl_load_info *load, ulong sector, unsigned long __weak spl_nor_get_uboot_base(void) { - return CONFIG_SYS_UBOOT_BASE; + return CFG_SYS_UBOOT_BASE; } static int spl_nor_load_image(struct spl_image_info *spl_image, diff --git a/common/spl/spl_ram.c b/common/spl/spl_ram.c index 2b1ac19152..5753bd228f 100644 --- a/common/spl/spl_ram.c +++ b/common/spl/spl_ram.c @@ -17,10 +17,6 @@ #include <spl.h> #include <linux/libfdt.h> -#ifndef CONFIG_SPL_LOAD_FIT_ADDRESS -# define CONFIG_SPL_LOAD_FIT_ADDRESS 0 -#endif - static ulong spl_ram_load_read(struct spl_load_info *load, ulong sector, ulong count, void *buf) { diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c index 9ae0273068..12397f0ae1 100644 --- a/common/spl/spl_sata.c +++ b/common/spl/spl_sata.c @@ -17,10 +17,6 @@ #include <fat.h> #include <image.h> -#ifndef CONFIG_SYS_SATA_FAT_BOOT_PARTITION -#define CONFIG_SYS_SATA_FAT_BOOT_PARTITION 1 -#endif - #ifndef CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR /* Dummy value to make the compiler happy */ #define CONFIG_SPL_SATA_RAW_U_BOOT_SECTOR 0x100 diff --git a/common/spl/spl_spi.c b/common/spl/spl_spi.c index da6742416e..2aff025f76 100644 --- a/common/spl/spl_spi.c +++ b/common/spl/spl_spi.c @@ -31,7 +31,7 @@ static int spi_load_image_os(struct spl_image_info *spl_image, int err; /* Read for a header, parse or error out. */ - spi_flash_read(flash, CONFIG_SYS_SPI_KERNEL_OFFS, sizeof(*header), + spi_flash_read(flash, CFG_SYS_SPI_KERNEL_OFFS, sizeof(*header), (void *)header); if (image_get_magic(header) != IH_MAGIC) @@ -41,12 +41,12 @@ static int spi_load_image_os(struct spl_image_info *spl_image, if (err) return err; - spi_flash_read(flash, CONFIG_SYS_SPI_KERNEL_OFFS, + spi_flash_read(flash, CFG_SYS_SPI_KERNEL_OFFS, spl_image->size, (void *)spl_image->load_addr); /* Read device tree. */ - spi_flash_read(flash, CONFIG_SYS_SPI_ARGS_OFFS, - CONFIG_SYS_SPI_ARGS_SIZE, + spi_flash_read(flash, CFG_SYS_SPI_ARGS_OFFS, + CFG_SYS_SPI_ARGS_SIZE, (void *)CONFIG_SYS_SPL_ARGS_ADDR); return 0; diff --git a/common/spl/spl_ubi.c b/common/spl/spl_ubi.c index fb804f0208..bcac25cd02 100644 --- a/common/spl/spl_ubi.c +++ b/common/spl/spl_ubi.c @@ -31,7 +31,7 @@ int spl_ubi_load_image(struct spl_image_info *spl_image, #ifdef CONFIG_SPL_ONENAND_SUPPORT case BOOT_DEVICE_ONENAND: info.read = onenand_spl_read_block; - info.peb_size = CONFIG_SYS_ONENAND_BLOCK_SIZE; + info.peb_size = CFG_SYS_ONENAND_BLOCK_SIZE; break; #endif default: diff --git a/common/spl/spl_xip.c b/common/spl/spl_xip.c index 1258d85e63..77c23ba059 100644 --- a/common/spl/spl_xip.c +++ b/common/spl/spl_xip.c @@ -25,6 +25,6 @@ static int spl_xip(struct spl_image_info *spl_image, } #endif return(spl_parse_image_header(spl_image, bootdev, - (const struct legacy_img_hdr *)CONFIG_SYS_UBOOT_BASE)); + (const struct legacy_img_hdr *)CFG_SYS_UBOOT_BASE)); } SPL_LOAD_IMAGE_METHOD("XIP", 0, BOOT_DEVICE_XIP, spl_xip); |