[PATCH v3 90/95] kconfig: Drop CONFIG_VAL()

Simon Glass sjg at chromium.org
Mon Feb 13 00:16:33 CET 2023


This serves no purpose now since we can write CONFIG_FOO instead of
CONFIG_VAL(FOO)

Drop it.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 arch/arm/lib/bdinfo.c                         |  4 +-
 arch/arm/mach-at91/arm926ejs/eflash.c         |  4 +-
 arch/arm/mach-k3/am654_init.c                 |  2 +-
 .../arm/mach-uniphier/debug-uart/debug-uart.c |  4 +-
 arch/mips/cpu/start.S                         |  6 +--
 arch/mips/mach-mtmips/mt7621/spl/start.S      |  6 +--
 arch/powerpc/cpu/mpc83xx/start.S              |  6 +--
 arch/powerpc/cpu/mpc85xx/start.S              | 40 +++++++++----------
 arch/sandbox/cpu/start.c                      |  2 +-
 arch/sh/lib/start.S                           |  4 +-
 arch/x86/cpu/apollolake/cpu_common.c          |  2 +-
 board/eets/pdu001/board.c                     |  2 +-
 board/freescale/p1010rdb/spl.c                | 10 ++---
 board/freescale/p1_p2_rdb_pc/spl.c            | 10 ++---
 board/samsung/common/board.c                  |  2 +-
 boot/image-fit-sig.c                          |  2 +-
 boot/vbe_simple_fw.c                          |  2 +-
 common/board_f.c                              |  4 +-
 common/board_r.c                              |  2 +-
 common/bootstage.c                            |  2 +-
 common/console.c                              | 12 +++---
 common/dlmalloc.c                             | 14 +++----
 common/init/board_init.c                      | 12 +++---
 common/malloc_simple.c                        |  2 +-
 common/spl/spl.c                              | 16 ++++----
 common/spl/spl_mmc.c                          |  2 +-
 drivers/mmc/mmc.c                             |  2 +-
 drivers/serial/altera_jtag_uart.c             |  2 +-
 drivers/serial/altera_uart.c                  |  4 +-
 drivers/serial/atmel_usart.c                  |  4 +-
 drivers/serial/ns16550.c                      |  4 +-
 drivers/serial/serial_ar933x.c                |  4 +-
 drivers/serial/serial_arc.c                   |  4 +-
 drivers/serial/serial_bcm6345.c               |  4 +-
 drivers/serial/serial_linflexuart.c           |  4 +-
 drivers/serial/serial_meson.c                 |  2 +-
 drivers/serial/serial_msm_geni.c              |  6 +--
 drivers/serial/serial_mt7620.c                |  4 +-
 drivers/serial/serial_mtk.c                   |  5 +--
 drivers/serial/serial_mvebu_a3700.c           |  4 +-
 drivers/serial/serial_mxc.c                   |  4 +-
 drivers/serial/serial_omap.c                  |  4 +-
 drivers/serial/serial_pic32.c                 |  4 +-
 drivers/serial/serial_pl01x.c                 |  4 +-
 drivers/serial/serial_s5p.c                   |  4 +-
 drivers/serial/serial_sifive.c                |  4 +-
 drivers/serial/serial_stm32.c                 |  4 +-
 drivers/serial/serial_xuartlite.c             |  4 +-
 drivers/serial/serial_zynq.c                  |  4 +-
 include/asm-generic/global_data.h             |  2 +-
 include/dm/device_compat.h                    |  2 +-
 include/linux/kconfig.h                       |  4 --
 include/log.h                                 |  2 +-
 lib/asm-offsets.c                             |  2 +-
 lib/efi/efi_app.c                             |  2 +-
 lib/fdtdec.c                                  |  4 +-
 scripts/basic/fixdep.c                        |  2 +-
 57 files changed, 139 insertions(+), 144 deletions(-)

diff --git a/arch/arm/lib/bdinfo.c b/arch/arm/lib/bdinfo.c
index e62a13a3b96..06cce862b6b 100644
--- a/arch/arm/lib/bdinfo.c
+++ b/arch/arm/lib/bdinfo.c
@@ -57,8 +57,8 @@ void arch_print_bdinfo(void)
 #ifdef CONFIG_BOARD_TYPES
 	printf("Board Type  = %ld\n", gd->board_type);
 #endif
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	printf("Early malloc usage: %lx / %x\n", gd->malloc_ptr,
-	       CONFIG_VAL(SYS_MALLOC_F_LEN));
+	       CONFIG_SYS_MALLOC_F_LEN);
 #endif
 }
diff --git a/arch/arm/mach-at91/arm926ejs/eflash.c b/arch/arm/mach-at91/arm926ejs/eflash.c
index aade13cc014..dff69f4133d 100644
--- a/arch/arm/mach-at91/arm926ejs/eflash.c
+++ b/arch/arm/mach-at91/arm926ejs/eflash.c
@@ -121,7 +121,7 @@ unsigned long flash_init(void)
 		if (i%32 == 0)
 			tmp = readl(&eefc->frr);
 		flash_info[0].protect[i] = (tmp >> (i%32)) & 1;
-#if CONFIG_VAL(EFLASH_PROTSECTORS)
+#if CONFIG_EFLASH_PROTSECTORS
 		if (i < CONFIG_EFLASH_PROTSECTORS)
 			flash_info[0].protect[i] = 1;
 #endif
@@ -159,7 +159,7 @@ int flash_real_protect (flash_info_t *info, long sector, int prot)
 
 	debug("protect sector=%ld prot=%d\n", sector, prot);
 
-#if CONFIG_VAL(EFLASH_PROTSECTORS)
+#if CONFIG_EFLASH_PROTSECTORS
 	if (sector < CONFIG_EFLASH_PROTSECTORS) {
 		if (!prot) {
 			printf("eflash: sector %lu cannot be unprotected\n",
diff --git a/arch/arm/mach-k3/am654_init.c b/arch/arm/mach-k3/am654_init.c
index cc645289ae3..83632c68118 100644
--- a/arch/arm/mach-k3/am654_init.c
+++ b/arch/arm/mach-k3/am654_init.c
@@ -204,7 +204,7 @@ void board_init_f(ulong dummy)
 	 * new malloc area inside the currently active pre-relocation "first"
 	 * malloc pool of which we use all that's left.
 	 */
-	pool_size = CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr;
+	pool_size = CONFIG_SYS_MALLOC_F_LEN - gd->malloc_ptr;
 	pool_addr = malloc(pool_size);
 	if (!pool_addr)
 		panic("ERROR: Can't allocate full malloc pool!\n");
diff --git a/arch/arm/mach-uniphier/debug-uart/debug-uart.c b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
index 1ba012ca45d..d116d46812d 100644
--- a/arch/arm/mach-uniphier/debug-uart/debug-uart.c
+++ b/arch/arm/mach-uniphier/debug-uart/debug-uart.c
@@ -18,7 +18,7 @@
 
 static void _debug_uart_putc(int c)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readl(base + UNIPHIER_UART_LSR) & UART_LSR_THRE))
 		;
@@ -57,7 +57,7 @@ void sg_set_iectrl(unsigned int pin)
 void _debug_uart_init(void)
 {
 #ifdef CONFIG_SPL_BUILD
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 	unsigned int divisor;
 
 	switch (uniphier_get_soc_id()) {
diff --git a/arch/mips/cpu/start.S b/arch/mips/cpu/start.S
index c89118c24e3..dd94a5c5ad8 100644
--- a/arch/mips/cpu/start.S
+++ b/arch/mips/cpu/start.S
@@ -46,9 +46,9 @@
 		sp, sp, GD_SIZE		# reserve space for gd
 	and	sp, sp, t0		# force 16 byte alignment
 	move	k0, sp			# save gd pointer
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+#if CONFIG_SYS_MALLOC_F_LEN && \
     !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
-	li	t2, CONFIG_VAL(SYS_MALLOC_F_LEN)
+	li	t2, CONFIG_SYS_MALLOC_F_LEN
 	PTR_SUBU \
 		sp, sp, t2		# reserve space for early malloc
 	and	sp, sp, t0		# force 16 byte alignment
@@ -63,7 +63,7 @@
 	blt	t0, t1, 1b
 	 nop
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+#if CONFIG_SYS_MALLOC_F_LEN && \
     !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
 	PTR_S	sp, GD_MALLOC_BASE(k0)	# gd->malloc_base offset
 #endif
diff --git a/arch/mips/mach-mtmips/mt7621/spl/start.S b/arch/mips/mach-mtmips/mt7621/spl/start.S
index 3bd6a989115..a4bc0b7e816 100644
--- a/arch/mips/mach-mtmips/mt7621/spl/start.S
+++ b/arch/mips/mach-mtmips/mt7621/spl/start.S
@@ -37,9 +37,9 @@
 		sp, sp, GD_SIZE		# reserve space for gd
 	and	sp, sp, t0		# force 16 byte alignment
 	move	k0, sp			# save gd pointer
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+#if CONFIG_SYS_MALLOC_F_LEN && \
     !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
-	li	t2, CONFIG_VAL(SYS_MALLOC_F_LEN)
+	li	t2, CONFIG_SYS_MALLOC_F_LEN
 	PTR_SUBU \
 		sp, sp, t2		# reserve space for early malloc
 	and	sp, sp, t0		# force 16 byte alignment
@@ -54,7 +54,7 @@
 	blt	t0, t1, 1b
 	 nop
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && \
+#if CONFIG_SYS_MALLOC_F_LEN && \
     !IS_ENABLED(CONFIG_INIT_STACK_WITHOUT_MALLOC_F)
 	PTR_S	sp, GD_MALLOC_BASE(k0)	# gd->malloc_base offset
 #endif
diff --git a/arch/powerpc/cpu/mpc83xx/start.S b/arch/powerpc/cpu/mpc83xx/start.S
index 7484396d69b..df511acc95a 100644
--- a/arch/powerpc/cpu/mpc83xx/start.S
+++ b/arch/powerpc/cpu/mpc83xx/start.S
@@ -244,14 +244,14 @@ in_flash:
 	cmplw	r3, r4
 	bne	1b
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE
+#if CONFIG_SYS_MALLOC_F_LEN + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE
 #error "SYS_MALLOC_F_LEN too large to fit into initial RAM."
 #endif
 
 	/* r3 = new stack pointer / pre-reloc malloc area */
-	subi    r3, r3, CONFIG_VAL(SYS_MALLOC_F_LEN)
+	subi    r3, r3, CONFIG_SYS_MALLOC_F_LEN
 
 	/* Set pointer to pre-reloc malloc area in GD */
 	stw     r3, GD_MALLOC_BASE(r4)
diff --git a/arch/powerpc/cpu/mpc85xx/start.S b/arch/powerpc/cpu/mpc85xx/start.S
index 506296bf08d..e02865a4d3f 100644
--- a/arch/powerpc/cpu/mpc85xx/start.S
+++ b/arch/powerpc/cpu/mpc85xx/start.S
@@ -341,7 +341,7 @@ l2_disabled:
 /* Interrupt vectors do not fit in minimal SPL. */
 #if !defined(MINIMAL_SPL)
 	/* Setup interrupt vectors */
-	lis	r1,CONFIG_VAL(SYS_MONITOR_BASE)@h
+	lis	r1,CONFIG_SYS_MONITOR_BASE at h
 	mtspr	IVPR,r1
 
 	li	r4,CriticalInput at l
@@ -544,7 +544,7 @@ nexti:	mflr	r1		/* R1 = our PC */
  */
 	create_tlb1_entry CONFIG_SYS_PPC_E500_DEBUG_TLB, \
 		0, BOOKE_PAGESZ_4M, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xffc00000,  MAS2_I|MAS2_G, \
+		CONFIG_SYS_MONITOR_BASE & 0xffc00000,  MAS2_I|MAS2_G, \
 		0xffc00000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 
@@ -555,8 +555,8 @@ nexti:	mflr	r1		/* R1 = our PC */
  */
 	create_tlb1_entry CONFIG_SYS_PPC_E500_DEBUG_TLB, \
 		0, BOOKE_PAGESZ_256K, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfffc0000, MAS2_I, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfffc0000, MAS3_SX|MAS3_SW|MAS3_SR, \
+		CONFIG_SYS_MONITOR_BASE & 0xfffc0000, MAS2_I, \
+		CONFIG_SYS_MONITOR_BASE & 0xfffc0000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 #endif
 #endif
@@ -1121,7 +1121,7 @@ create_init_ram_area:
 	/* create a temp mapping in AS=1 to the 4M boot window */
 	create_tlb1_entry 15, \
 		1, BOOKE_PAGESZ_4M, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xffc00000, MAS2_I|MAS2_G, \
+		CONFIG_SYS_MONITOR_BASE & 0xffc00000, MAS2_I|MAS2_G, \
 		0xffc00000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 
@@ -1131,7 +1131,7 @@ create_init_ram_area:
 	 */
 	create_tlb1_entry 15, \
 		1, BOOKE_PAGESZ_1M, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \
+		CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \
 		CFG_SYS_PBI_FLASH_WINDOW & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 
@@ -1142,24 +1142,24 @@ create_init_ram_area:
  */
 #elif defined(CONFIG_RAMBOOT_PBL) && defined(CONFIG_NXP_ESBC) && \
 	(!defined(CONFIG_SPL) || defined(CONFIG_SPL_BUILD))
-	/* create a temp mapping in AS = 1 for mapping CONFIG_VAL(SYS_MONITOR_BASE)
+	/* create a temp mapping in AS = 1 for mapping CONFIG_SYS_MONITOR_BASE
 	 * to L3 Address configured by PBL for ISBC code
 	 */
 	create_tlb1_entry 15, \
 		1, BOOKE_PAGESZ_1M, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \
+		CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \
 		CFG_SYS_INIT_L3_ADDR & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 
 #else
 	/*
-	 * create a temp mapping in AS=1 to the 1M CONFIG_VAL(SYS_MONITOR_BASE) space, the main
-	 * image has been relocated to CONFIG_VAL(SYS_MONITOR_BASE) on the second stage.
+	 * create a temp mapping in AS=1 to the 1M CONFIG_SYS_MONITOR_BASE space, the main
+	 * image has been relocated to CONFIG_SYS_MONITOR_BASE on the second stage.
 	 */
 	create_tlb1_entry 15, \
 		1, BOOKE_PAGESZ_1M, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS2_I|MAS2_G, \
-		CONFIG_VAL(SYS_MONITOR_BASE) & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \
+		CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS2_I|MAS2_G, \
+		CONFIG_SYS_MONITOR_BASE & 0xfff00000, MAS3_SX|MAS3_SW|MAS3_SR, \
 		0, r6
 #endif
 
@@ -1233,13 +1233,13 @@ _start_cont:
 	lis	r3,(CFG_SYS_INIT_RAM_ADDR)@h
 	ori	r3,r3,((CFG_SYS_INIT_SP_OFFSET-16)&~0xf)@l /* Align to 16 */
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE
+#if CONFIG_SYS_MALLOC_F_LEN
+#if CONFIG_SYS_MALLOC_F_LEN + GENERATED_GBL_DATA_SIZE > CFG_SYS_INIT_RAM_SIZE
 #error "SYS_MALLOC_F_LEN too large to fit into initial RAM."
 #endif
 
 	/* Leave 16+ byte for back chain termination and NULL return address */
-	subi	r3,r3,((CONFIG_VAL(SYS_MALLOC_F_LEN)+16+15)&~0xf)
+	subi	r3,r3,((CONFIG_SYS_MALLOC_F_LEN+16+15)&~0xf)
 #endif
 
 	/* End of RAM */
@@ -1253,7 +1253,7 @@ _start_cont:
 	cmplw	r4,r3
 	bne	1b
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	lis	r4,SYS_INIT_SP_ADDR at h
 	ori	r4,r4,SYS_INIT_SP_ADDR at l
 
@@ -1619,8 +1619,8 @@ relocate_code:
 	GET_GOT
 #ifndef CONFIG_SPL_SKIP_RELOCATE
 	mr	r3,r5				/* Destination Address	*/
-	lis	r4,CONFIG_VAL(SYS_MONITOR_BASE)@h		/* Source      Address	*/
-	ori	r4,r4,CONFIG_VAL(SYS_MONITOR_BASE)@l
+	lis	r4,CONFIG_SYS_MONITOR_BASE at h		/* Source      Address	*/
+	ori	r4,r4,CONFIG_SYS_MONITOR_BASE at l
 	lwz	r5,GOT(__init_end)
 	sub	r5,r5,r4
 	li	r6,CONFIG_SYS_CACHELINE_SIZE		/* Cache Line Size	*/
@@ -1628,7 +1628,7 @@ relocate_code:
 	/*
 	 * Fix GOT pointer:
 	 *
-	 * New GOT-PTR = (old GOT-PTR - CONFIG_VAL(SYS_MONITOR_BASE)) + Destination Address
+	 * New GOT-PTR = (old GOT-PTR - CONFIG_SYS_MONITOR_BASE) + Destination Address
 	 *
 	 * Offset:
 	 */
@@ -1693,7 +1693,7 @@ relocate_code:
  * initialization, now running from RAM.
  */
 
-	addi	r0,r10,in_ram - CONFIG_VAL(SYS_MONITOR_BASE)
+	addi	r0,r10,in_ram - CONFIG_SYS_MONITOR_BASE
 
 	/*
 	 * As IVPR is going to point RAM address,
diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c
index e0c5db2a522..856dfbb9962 100644
--- a/arch/sandbox/cpu/start.c
+++ b/arch/sandbox/cpu/start.c
@@ -534,7 +534,7 @@ int sandbox_main(int argc, char *argv[])
 			goto err;
 	}
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	gd->malloc_base = CFG_MALLOC_F_ADDR;
 #endif
 #if IS_ENABLED(CONFIG_LOG)
diff --git a/arch/sh/lib/start.S b/arch/sh/lib/start.S
index ddb9aa9f87b..6777429ee29 100644
--- a/arch/sh/lib/start.S
+++ b/arch/sh/lib/start.S
@@ -53,7 +53,7 @@ _start:
 
 	mov.l	._gd_init, r13		/* global data */
 	mov.l	._stack_init, r15	/* stack */
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	mov.l	._gd_malloc_base, r14
 	mov.l	r15, @r14
 #endif
@@ -73,7 +73,7 @@ loop:
 ._bss_start:		.long	bss_start
 ._bss_end:		.long	bss_end
 ._gd_init:		.long	(_start - GENERATED_GBL_DATA_SIZE)
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 ._gd_malloc_base:	.long	(_start - GENERATED_GBL_DATA_SIZE + GD_MALLOC_BASE)
 #endif
 ._stack_init:		.long	(_start - GENERATED_GBL_DATA_SIZE - CONFIG_SYS_MALLOC_LEN - 16)
diff --git a/arch/x86/cpu/apollolake/cpu_common.c b/arch/x86/cpu/apollolake/cpu_common.c
index 9a5502617bf..5d7d26b140f 100644
--- a/arch/x86/cpu/apollolake/cpu_common.c
+++ b/arch/x86/cpu/apollolake/cpu_common.c
@@ -72,7 +72,7 @@ static void pch_uart_init(void)
 	}
 
 #ifdef CONFIG_DEBUG_UART
-	apl_uart_init(PCH_DEV_UART, CONFIG_VAL(DEBUG_UART_BASE));
+	apl_uart_init(PCH_DEV_UART, CONFIG_DEBUG_UART_BASE);
 #endif
 }
 
diff --git a/board/eets/pdu001/board.c b/board/eets/pdu001/board.c
index 15ee65b5354..79236c968ab 100644
--- a/board/eets/pdu001/board.c
+++ b/board/eets/pdu001/board.c
@@ -273,7 +273,7 @@ void board_debug_uart_init(void)
 	setup_early_clocks();
 
 	/* done by pin controller driver if not debugging */
-	enable_uart_pin_mux(CONFIG_VAL(DEBUG_UART_BASE));
+	enable_uart_pin_mux(CONFIG_DEBUG_UART_BASE);
 }
 #endif
 
diff --git a/board/freescale/p1010rdb/spl.c b/board/freescale/p1010rdb/spl.c
index e450f626e0a..9b34c6b8687 100644
--- a/board/freescale/p1010rdb/spl.c
+++ b/board/freescale/p1010rdb/spl.c
@@ -57,24 +57,24 @@ void board_init_f(ulong bootflag)
 	/* NOTE - code has to be copied out of NAND buffer before
 	 * other blocks can be read.
 	*/
-	relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE);
+	relocate_code(CONFIG_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE);
 }
 
 void board_init_r(gd_t *gd, ulong dest_addr)
 {
 	/* Pointer is writable since we allocated a register for it */
-	gd = (gd_t *)CONFIG_VAL(GD_ADDR);
+	gd = (gd_t *)CONFIG_GD_ADDR;
 	struct bd_info *bd;
 
 	memset(gd, 0, sizeof(gd_t));
-	bd = (struct bd_info *)(CONFIG_VAL(GD_ADDR) + sizeof(gd_t));
+	bd = (struct bd_info *)(CONFIG_GD_ADDR + sizeof(gd_t));
 	memset(bd, 0, sizeof(struct bd_info));
 	gd->bd = bd;
 
 	arch_cpu_init();
 	get_clocks();
-	mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR),
-			CONFIG_VAL(RELOC_MALLOC_SIZE));
+	mem_malloc_init(CONFIG_RELOC_MALLOC_ADDR,
+			CONFIG_RELOC_MALLOC_SIZE);
 	gd->flags |= GD_FLG_FULL_MALLOC_INIT;
 
 #ifndef CONFIG_SPL_NAND_BOOT
diff --git a/board/freescale/p1_p2_rdb_pc/spl.c b/board/freescale/p1_p2_rdb_pc/spl.c
index 64bd65113f4..bbd6285c54d 100644
--- a/board/freescale/p1_p2_rdb_pc/spl.c
+++ b/board/freescale/p1_p2_rdb_pc/spl.c
@@ -69,24 +69,24 @@ void board_init_f(ulong bootflag)
 	/* NOTE - code has to be copied out of NAND buffer before
 	 * other blocks can be read.
 	 */
-	relocate_code(CONFIG_VAL(RELOC_STACK), 0, CONFIG_SPL_RELOC_TEXT_BASE);
+	relocate_code(CONFIG_RELOC_STACK, 0, CONFIG_SPL_RELOC_TEXT_BASE);
 }
 
 void board_init_r(gd_t *gd, ulong dest_addr)
 {
 	/* Pointer is writable since we allocated a register for it */
-	gd = (gd_t *)CONFIG_VAL(GD_ADDR);
+	gd = (gd_t *)CONFIG_GD_ADDR;
 	struct bd_info *bd;
 
 	memset(gd, 0, sizeof(gd_t));
-	bd = (struct bd_info *)(CONFIG_VAL(GD_ADDR) + sizeof(gd_t));
+	bd = (struct bd_info *)(CONFIG_GD_ADDR + sizeof(gd_t));
 	memset(bd, 0, sizeof(struct bd_info));
 	gd->bd = bd;
 
 	arch_cpu_init();
 	get_clocks();
-	mem_malloc_init(CONFIG_VAL(RELOC_MALLOC_ADDR),
-			CONFIG_VAL(RELOC_MALLOC_SIZE));
+	mem_malloc_init(CONFIG_RELOC_MALLOC_ADDR,
+			CONFIG_RELOC_MALLOC_SIZE);
 	gd->flags |= GD_FLG_FULL_MALLOC_INIT;
 
 #ifdef CONFIG_SPL_ENV_SUPPORT
diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c
index 07ec059437b..9bca5894737 100644
--- a/board/samsung/common/board.c
+++ b/board/samsung/common/board.c
@@ -106,7 +106,7 @@ int board_init(void)
 	}
 	boot_temp_check();
 #endif
-#if CONFIG_VAL(SYS_MEM_TOP_HIDE)
+#if CONFIG_SYS_MEM_TOP_HIDE
 	/* The last few MB of memory can be reserved for secure firmware */
 	ulong size = CONFIG_SYS_MEM_TOP_HIDE;
 
diff --git a/boot/image-fit-sig.c b/boot/image-fit-sig.c
index 12369896fe3..96e65d559ec 100644
--- a/boot/image-fit-sig.c
+++ b/boot/image-fit-sig.c
@@ -71,7 +71,7 @@ static int fit_image_setup_verify(struct image_sign_info *info,
 	const char *algo_name;
 	const char *padding_name;
 
-	if (fdt_totalsize(fit) > CONFIG_VAL(FIT_SIGNATURE_MAX_SIZE)) {
+	if (fdt_totalsize(fit) > CONFIG_FIT_SIGNATURE_MAX_SIZE) {
 		*err_msgp = "Total size too large";
 		return 1;
 	}
diff --git a/boot/vbe_simple_fw.c b/boot/vbe_simple_fw.c
index d59a704ddba..00092db76f4 100644
--- a/boot/vbe_simple_fw.c
+++ b/boot/vbe_simple_fw.c
@@ -80,7 +80,7 @@ int vbe_simple_read_bootflow_fw(struct udevice *dev, struct bootflow *bflow)
 	 * Load the FIT into the SPL memory. This is typically a FIT with
 	 * external data, so this is quite small, perhaps a few KB.
 	 */
-	addr = CONFIG_VAL(TEXT_BASE);
+	addr = CONFIG_TEXT_BASE;
 	buf = map_sysmem(addr, size);
 	num_blks = DIV_ROUND_UP(size, desc->blksz);
 	log_debug("read %lx, %lx blocks to %lx / %p\n", size, num_blks, addr,
diff --git a/common/board_f.c b/common/board_f.c
index 20e330ecd94..59cb1980fa4 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -359,7 +359,7 @@ static int setup_dest_addr(void)
 	 * Ram is setup, size stored in gd !!
 	 */
 	debug("Ram size: %08llX\n", (unsigned long long)gd->ram_size);
-#if CONFIG_VAL(SYS_MEM_TOP_HIDE)
+#if CONFIG_SYS_MEM_TOP_HIDE
 	/*
 	 * Subtract specified amount of memory to hide so that it won't
 	 * get "touched" at all by U-Boot. By fixing up gd->ram_size
@@ -791,7 +791,7 @@ static int initf_bootstage(void)
 
 static int initf_dm(void)
 {
-#if defined(CONFIG_DM) && CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if defined(CONFIG_DM) && CONFIG_SYS_MALLOC_F_LEN
 	int ret;
 
 	bootstage_start(BOOTSTAGE_ID_ACCUM_DM_F, "dm_f");
diff --git a/common/board_r.c b/common/board_r.c
index 174285cdb60..3ff6a8e4f69 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -198,7 +198,7 @@ static int initr_malloc(void)
 {
 	ulong malloc_start;
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	debug("Pre-reloc malloc() used %#lx bytes (%ld KB)\n", gd->malloc_ptr,
 	      gd->malloc_ptr / 1024);
 #endif
diff --git a/common/bootstage.c b/common/bootstage.c
index 326c40f1561..389131647a9 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -25,7 +25,7 @@
 DECLARE_GLOBAL_DATA_PTR;
 
 enum {
-	RECORD_COUNT = CONFIG_VAL(BOOTSTAGE_RECORD_COUNT),
+	RECORD_COUNT = CONFIG_BOOTSTAGE_RECORD_COUNT,
 };
 
 struct bootstage_record {
diff --git a/common/console.c b/common/console.c
index 1995b8a996e..8c96bcb0438 100644
--- a/common/console.c
+++ b/common/console.c
@@ -624,7 +624,7 @@ int tstc(void)
 #define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL	1
 
 #if IS_ENABLED(CONFIG_PRE_CONSOLE_BUFFER)
-#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ))
+#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
 
 static void pre_console_putc(const char c)
 {
@@ -633,7 +633,7 @@ static void pre_console_putc(const char c)
 	if (gd->precon_buf_idx < 0)
 		return;
 
-	buffer = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ));
+	buffer = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ);
 
 	buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c;
 
@@ -652,15 +652,15 @@ static void pre_console_puts(const char *s)
 static void print_pre_console_buffer(int flushpoint)
 {
 	long in = 0, out = 0;
-	char buf_out[CONFIG_VAL(PRE_CON_BUF_SZ) + 1];
+	char buf_out[CONFIG_PRE_CON_BUF_SZ + 1];
 	char *buf_in;
 
 	if (IS_ENABLED(CONFIG_SILENT_CONSOLE) && (gd->flags & GD_FLG_SILENT))
 		return;
 
-	buf_in = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ));
-	if (gd->precon_buf_idx > CONFIG_VAL(PRE_CON_BUF_SZ))
-		in = gd->precon_buf_idx - CONFIG_VAL(PRE_CON_BUF_SZ);
+	buf_in = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ);
+	if (gd->precon_buf_idx > CONFIG_PRE_CON_BUF_SZ)
+		in = gd->precon_buf_idx - CONFIG_PRE_CON_BUF_SZ;
 
 	while (in < gd->precon_buf_idx)
 		buf_out[out++] = buf_in[CIRC_BUF_IDX(in++)];
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index c0f22d7f02a..f675baaa003 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -1305,7 +1305,7 @@ Void_t* mALLOc(bytes) size_t bytes;
 
   INTERNAL_SIZE_T nb;
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT))
 		return malloc_simple(bytes);
 #endif
@@ -1586,7 +1586,7 @@ void fREe(mem) Void_t* mem;
   mchunkptr fwd;       /* misc temp for linking */
   int       islr;      /* track whether merging with last_remainder */
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	/* free() is a no-op - all the memory will be freed on relocation */
 	if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
 		VALGRIND_FREELIKE_BLOCK(mem, SIZE_SZ);
@@ -1749,7 +1749,7 @@ Void_t* rEALLOc(oldmem, bytes) Void_t* oldmem; size_t bytes;
   /* realloc of null is supposed to be same as malloc */
   if (oldmem == NULL) return mALLOc(bytes);
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
 		/* This is harder to support and should not be needed */
 		panic("pre-reloc realloc() is not supported");
@@ -1971,7 +1971,7 @@ Void_t* mEMALIGn(alignment, bytes) size_t alignment; size_t bytes;
 
   if ((long)bytes < 0) return NULL;
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
 		return memalign_simple(alignment, bytes);
 	}
@@ -2167,7 +2167,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
     return NULL;
   else
   {
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	if (!(gd->flags & GD_FLG_FULL_MALLOC_INIT)) {
 		memset(mem, 0, sz);
 		return mem;
@@ -2469,9 +2469,9 @@ int mALLOPt(param_number, value) int param_number; int value;
 
 int initf_malloc(void)
 {
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	assert(gd->malloc_base);	/* Set up by crt0.S */
-	gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN);
+	gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;
 	gd->malloc_ptr = 0;
 #endif
 
diff --git a/common/init/board_init.c b/common/init/board_init.c
index e8bbb6be74c..20a7e2f649a 100644
--- a/common/init/board_init.c
+++ b/common/init/board_init.c
@@ -43,11 +43,11 @@ __weak void board_init_f_init_stack_protection(void)
 {
 #if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)
 	ulong stack_bottom = gd->start_addr_sp -
-		CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK);
+		CONFIG_SIZE_LIMIT_PROVIDE_STACK;
 
 	/* substact some safety margin (0x20) since stack is in use here */
-	memset((void *)stack_bottom, CONFIG_VAL(SYS_STACK_F_CHECK_BYTE),
-	       CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK) - 0x20);
+	memset((void *)stack_bottom, CONFIG_SYS_STACK_F_CHECK_BYTE,
+	       CONFIG_SIZE_LIMIT_PROVIDE_STACK - 0x20);
 #endif
 }
 
@@ -79,8 +79,8 @@ ulong board_init_f_alloc_reserve(ulong top)
 {
 	/* Reserve early malloc arena */
 #ifndef CFG_MALLOC_F_ADDR
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
-	top -= CONFIG_VAL(SYS_MALLOC_F_LEN);
+#if CONFIG_SYS_MALLOC_F_LEN
+	top -= CONFIG_SYS_MALLOC_F_LEN;
 #endif
 #endif
 	/* LAST : reserve GD (rounded up to a multiple of 16 bytes) */
@@ -159,7 +159,7 @@ void board_init_f_init_reserve(ulong base)
 	 * Use gd as it is now properly set for all architectures.
 	 */
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	/* go down one 'early malloc arena' */
 	gd->malloc_base = base;
 #endif
diff --git a/common/malloc_simple.c b/common/malloc_simple.c
index f77fdd62f39..bbcf31c609e 100644
--- a/common/malloc_simple.c
+++ b/common/malloc_simple.c
@@ -89,5 +89,5 @@ void free_simple(void *ptr)
 void malloc_simple_info(void)
 {
 	log_info("malloc_simple: %lx bytes used, %lx remain\n", gd->malloc_ptr,
-		 CONFIG_VAL(SYS_MALLOC_F_LEN) - gd->malloc_ptr);
+		 CONFIG_SYS_MALLOC_F_LEN - gd->malloc_ptr);
 }
diff --git a/common/spl/spl.c b/common/spl/spl.c
index f2c6ebef023..47703fe8dac 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -525,12 +525,12 @@ static int spl_common_init(bool setup_malloc)
 {
 	int ret;
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	if (setup_malloc) {
 #ifdef CFG_MALLOC_F_ADDR
 		gd->malloc_base = CFG_MALLOC_F_ADDR;
 #endif
-		gd->malloc_limit = CONFIG_VAL(SYS_MALLOC_F_LEN);
+		gd->malloc_limit = CONFIG_SYS_MALLOC_F_LEN;
 		gd->malloc_ptr = 0;
 	}
 #endif
@@ -877,7 +877,7 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
 	default:
 		debug("Unsupported OS image.. Jumping nevertheless..\n");
 	}
-#if CONFIG_VAL(SYS_MALLOC_F_LEN) && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
+#if CONFIG_SYS_MALLOC_F_LEN && !defined(CONFIG_SYS_SPL_MALLOC_SIZE)
 	debug("SPL malloc() used 0x%lx bytes (%ld KB)\n", gd->malloc_ptr,
 	      gd->malloc_ptr / 1024);
 #endif
@@ -924,17 +924,17 @@ __weak void spl_relocate_stack_check(void)
 {
 #if IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE)
 	ulong init_sp = gd->start_addr_sp;
-	ulong stack_bottom = init_sp - CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK);
+	ulong stack_bottom = init_sp - CONFIG_SIZE_LIMIT_PROVIDE_STACK;
 	u8 *ptr = (u8 *)stack_bottom;
 	ulong i;
 
-	for (i = 0; i < CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK); i++) {
-		if (*ptr != CONFIG_VAL(SYS_STACK_F_CHECK_BYTE))
+	for (i = 0; i < CONFIG_SIZE_LIMIT_PROVIDE_STACK; i++) {
+		if (*ptr != CONFIG_SYS_STACK_F_CHECK_BYTE)
 			break;
 		ptr++;
 	}
 	printf("SPL initial stack usage: %lu bytes\n",
-	       CONFIG_VAL(SIZE_LIMIT_PROVIDE_STACK) - i);
+	       CONFIG_SIZE_LIMIT_PROVIDE_STACK - i);
 #endif
 }
 
@@ -965,7 +965,7 @@ ulong spl_relocate_stack_gd(void)
 	if (IS_ENABLED(CONFIG_SYS_REPORT_STACK_F_USAGE))
 		spl_relocate_stack_check();
 
-#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if defined(CONFIG_SPL_SYS_MALLOC_SIMPLE) && CONFIG_SYS_MALLOC_F_LEN
 	if (CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN) {
 		debug("SPL malloc() before relocation used 0x%lx bytes (%ld KB)\n",
 		      gd->malloc_ptr, gd->malloc_ptr / 1024);
diff --git a/common/spl/spl_mmc.c b/common/spl/spl_mmc.c
index f1a80fbeb81..89eee8702ac 100644
--- a/common/spl/spl_mmc.c
+++ b/common/spl/spl_mmc.c
@@ -229,7 +229,7 @@ static int mmc_load_image_raw_os(struct spl_image_info *spl_image,
 {
 	int ret;
 
-#if CONFIG_VAL(SYS_MMCSD_RAW_MODE_ARGS_SECTOR)
+#if CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR
 	unsigned long count;
 
 	count = blk_dread(mmc_get_blk_desc(mmc),
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 97fe7365c04..be0c1cbc543 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -135,7 +135,7 @@ void mmc_trace_state(struct mmc *mmc, struct mmc_cmd *cmd)
 }
 #endif
 
-#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_VAL(LOGLEVEL) >= LOGL_DEBUG
+#if IS_ENABLED(CONFIG_MMC_VERBOSE) || defined(DEBUG) || CONFIG_LOGLEVEL >= LOGL_DEBUG
 const char *mmc_mode_name(enum bus_mode mode)
 {
 	static const char *const names[] = {
diff --git a/drivers/serial/altera_jtag_uart.c b/drivers/serial/altera_jtag_uart.c
index 9e39da7dd24..4435fcf56b9 100644
--- a/drivers/serial/altera_jtag_uart.c
+++ b/drivers/serial/altera_jtag_uart.c
@@ -134,7 +134,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct altera_jtaguart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct altera_jtaguart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
 
 	while (1) {
 		u32 st = readl(&regs->control);
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c
index 35920480841..b18be6e2454 100644
--- a/drivers/serial/altera_uart.c
+++ b/drivers/serial/altera_uart.c
@@ -123,7 +123,7 @@ U_BOOT_DRIVER(altera_uart) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
 	u32 div;
 
 	div = (CONFIG_DEBUG_UART_CLOCK / CONFIG_BAUDRATE) - 1;
@@ -132,7 +132,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct altera_uart_regs *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct altera_uart_regs *regs = (void *)CONFIG_DEBUG_UART_BASE;
 
 	while (1) {
 		u32 st = readl(&regs->status);
diff --git a/drivers/serial/atmel_usart.c b/drivers/serial/atmel_usart.c
index 6327a590a69..7d34b293cf3 100644
--- a/drivers/serial/atmel_usart.c
+++ b/drivers/serial/atmel_usart.c
@@ -317,14 +317,14 @@ U_BOOT_DRIVER(serial_atmel) = {
 #ifdef CONFIG_DEBUG_UART_ATMEL
 static inline void _debug_uart_init(void)
 {
-	atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE);
+	atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
 
 	_atmel_serial_init(usart, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
 }
 
 static inline void _debug_uart_putc(int ch)
 {
-	atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_VAL(DEBUG_UART_BASE);
+	atmel_usart3_t *usart = (atmel_usart3_t *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readl(&usart->csr) & USART3_BIT(TXRDY)))
 		;
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 1d384ddbe12..8d6f3c54114 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -325,7 +325,7 @@ int ns16550_tstc(struct ns16550 *com_port)
 
 static inline void _debug_uart_init(void)
 {
-	struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
 	int baud_divisor;
 
 	/* Wait until tx buffer is empty */
@@ -364,7 +364,7 @@ static inline int NS16550_read_baud_divisor(struct ns16550 *com_port)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(serial_din(&com_port->lsr) & UART_LSR_THRE)) {
 #ifdef CONFIG_DEBUG_UART_NS16550_CHECK_ENABLED
diff --git a/drivers/serial/serial_ar933x.c b/drivers/serial/serial_ar933x.c
index 4f916349762..da06bef97c7 100644
--- a/drivers/serial/serial_ar933x.c
+++ b/drivers/serial/serial_ar933x.c
@@ -199,7 +199,7 @@ U_BOOT_DRIVER(serial_ar933x) = {
 
 static inline void _debug_uart_init(void)
 {
-	void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE;
 	u32 val, scale, step;
 
 	/*
@@ -227,7 +227,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int c)
 {
-	void __iomem *regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE;
 	u32 data;
 
 	do {
diff --git a/drivers/serial/serial_arc.c b/drivers/serial/serial_arc.c
index c2fc8a901e2..707177d00ec 100644
--- a/drivers/serial/serial_arc.c
+++ b/drivers/serial/serial_arc.c
@@ -137,7 +137,7 @@ U_BOOT_DRIVER(serial_arc) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
 	int arc_console_baud = CONFIG_DEBUG_UART_CLOCK / (CONFIG_BAUDRATE * 4) - 1;
 
 	writeb(arc_console_baud & 0xff, &regs->baudl);
@@ -146,7 +146,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int c)
 {
-	struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct arc_serial_regs *regs = (struct arc_serial_regs *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readb(&regs->status) & UART_TXEMPTY))
 		;
diff --git a/drivers/serial/serial_bcm6345.c b/drivers/serial/serial_bcm6345.c
index 2359656a239..f08e91ff3ba 100644
--- a/drivers/serial/serial_bcm6345.c
+++ b/drivers/serial/serial_bcm6345.c
@@ -269,7 +269,7 @@ U_BOOT_DRIVER(bcm6345_serial) = {
 #ifdef CONFIG_DEBUG_UART_BCM6345
 static inline void _debug_uart_init(void)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 
 	bcm6345_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
 }
@@ -285,7 +285,7 @@ static inline void wait_xfered(void __iomem *base)
 
 static inline void _debug_uart_putc(int ch)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 
 	wait_xfered(base);
 	writel(ch, base + UART_FIFO_REG);
diff --git a/drivers/serial/serial_linflexuart.c b/drivers/serial/serial_linflexuart.c
index b449e55a650..876a4baa9fc 100644
--- a/drivers/serial/serial_linflexuart.c
+++ b/drivers/serial/serial_linflexuart.c
@@ -201,14 +201,14 @@ U_BOOT_DRIVER(serial_linflex) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;
 
 	linflex_serial_init_internal(base);
 }
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct linflex_fsl *base = (struct linflex_fsl *)CONFIG_DEBUG_UART_BASE;
 
 	/* XXX: Is this OK? Should this use the non-DM version? */
 	_linflex_serial_putc(base, ch);
diff --git a/drivers/serial/serial_meson.c b/drivers/serial/serial_meson.c
index d026f5a7a8e..90c370cf611 100644
--- a/drivers/serial/serial_meson.c
+++ b/drivers/serial/serial_meson.c
@@ -252,7 +252,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct meson_uart *regs = (struct meson_uart *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct meson_uart *regs = (struct meson_uart *)CONFIG_DEBUG_UART_BASE;
 
 	while (readl(&regs->status) & AML_UART_TX_FULL)
 		;
diff --git a/drivers/serial/serial_msm_geni.c b/drivers/serial/serial_msm_geni.c
index 3943ca43e49..3e255a99dcc 100644
--- a/drivers/serial/serial_msm_geni.c
+++ b/drivers/serial/serial_msm_geni.c
@@ -569,7 +569,7 @@ U_BOOT_DRIVER(serial_msm_geni) = {
 #ifdef CONFIG_DEBUG_UART_MSM_GENI
 
 static struct msm_serial_data init_serial_data = {
-	.base = CONFIG_VAL(DEBUG_UART_BASE)
+	.base = CONFIG_DEBUG_UART_BASE
 };
 
 /* Serial dumb device, to reuse driver code */
@@ -587,7 +587,7 @@ static struct udevice init_dev = {
 
 static inline void _debug_uart_init(void)
 {
-	phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
+	phys_addr_t base = CONFIG_DEBUG_UART_BASE;
 
 	geni_serial_init(&init_dev);
 	geni_serial_baud(base, CLK_DIV, CONFIG_BAUDRATE);
@@ -596,7 +596,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	phys_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
+	phys_addr_t base = CONFIG_DEBUG_UART_BASE;
 
 	writel(DEF_TX_WM, base + SE_GENI_TX_WATERMARK_REG);
 	qcom_geni_serial_setup_tx(base, 1);
diff --git a/drivers/serial/serial_mt7620.c b/drivers/serial/serial_mt7620.c
index 903ba2dd6ac..a89264b4ddf 100644
--- a/drivers/serial/serial_mt7620.c
+++ b/drivers/serial/serial_mt7620.c
@@ -220,7 +220,7 @@ static inline void _debug_uart_init(void)
 {
 	struct mt7620_serial_plat plat;
 
-	plat.regs = (void *)CONFIG_VAL(DEBUG_UART_BASE);
+	plat.regs = (void *)CONFIG_DEBUG_UART_BASE;
 	plat.clock = CONFIG_DEBUG_UART_CLOCK;
 
 	writel(0, &plat.regs->ier);
@@ -233,7 +233,7 @@ static inline void _debug_uart_init(void)
 static inline void _debug_uart_putc(int ch)
 {
 	struct mt7620_serial_regs __iomem *regs =
-		(void *)CONFIG_VAL(DEBUG_UART_BASE);
+		(void *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readl(&regs->lsr) & UART_LSR_THRE))
 		;
diff --git a/drivers/serial/serial_mtk.c b/drivers/serial/serial_mtk.c
index a9d1b8280ef..c9c5c38f451 100644
--- a/drivers/serial/serial_mtk.c
+++ b/drivers/serial/serial_mtk.c
@@ -439,7 +439,7 @@ static inline void _debug_uart_init(void)
 {
 	struct mtk_serial_priv priv;
 
-	priv.regs = (void *) CONFIG_VAL(DEBUG_UART_BASE);
+	priv.regs = (void *)CONFIG_DEBUG_UART_BASE;
 	priv.fixed_clk_rate = CONFIG_DEBUG_UART_CLOCK;
 
 	writel(0, &priv.regs->ier);
@@ -451,8 +451,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct mtk_serial_regs __iomem *regs =
-		(void *) CONFIG_VAL(DEBUG_UART_BASE);
+	struct mtk_serial_regs __iomem *regs = (void *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readl(&regs->lsr) & UART_LSR_THRE))
 		;
diff --git a/drivers/serial/serial_mvebu_a3700.c b/drivers/serial/serial_mvebu_a3700.c
index b2017c64556..d8035b28ea7 100644
--- a/drivers/serial/serial_mvebu_a3700.c
+++ b/drivers/serial/serial_mvebu_a3700.c
@@ -321,7 +321,7 @@ U_BOOT_DRIVER(serial_mvebu) = {
 
 static inline void _debug_uart_init(void)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 	u32 parent_rate, divider;
 
 	/* reset FIFOs */
@@ -349,7 +349,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 
 	while (readl(base + UART_STATUS_REG) & UART_STATUS_TXFIFO_FULL)
 		;
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c
index 34e639072ba..870ae769a5b 100644
--- a/drivers/serial/serial_mxc.c
+++ b/drivers/serial/serial_mxc.c
@@ -409,7 +409,7 @@ U_BOOT_DRIVER(serial_mxc) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE;
 
 	_mxc_serial_init(base, false);
 	_mxc_serial_setbrg(base, CONFIG_DEBUG_UART_CLOCK,
@@ -418,7 +418,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct mxc_uart *base = (struct mxc_uart *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct mxc_uart *base = (struct mxc_uart *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(readl(&base->ts) & UTS_TXEMPTY))
 		schedule();
diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 3eae2db313e..a53cce012a7 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -66,7 +66,7 @@ static inline int serial_in_shift(void *addr, int shift)
 
 static inline void _debug_uart_init(void)
 {
-	struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
 	int baud_divisor;
 
 	baud_divisor = ns16550_calc_divisor(com_port, CONFIG_DEBUG_UART_CLOCK,
@@ -85,7 +85,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct ns16550 *com_port = (struct ns16550 *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct ns16550 *com_port = (struct ns16550 *)CONFIG_DEBUG_UART_BASE;
 
 	while (!(serial_din(&com_port->lsr) & UART_LSR_THRE))
 		;
diff --git a/drivers/serial/serial_pic32.c b/drivers/serial/serial_pic32.c
index 3c5d37ce0ab..ccdda9f0334 100644
--- a/drivers/serial/serial_pic32.c
+++ b/drivers/serial/serial_pic32.c
@@ -187,14 +187,14 @@ U_BOOT_DRIVER(pic32_serial) = {
 
 static inline void _debug_uart_init(void)
 {
-	void __iomem *base = (void __iomem *)CONFIG_VAL(DEBUG_UART_BASE);
+	void __iomem *base = (void __iomem *)CONFIG_DEBUG_UART_BASE;
 
 	pic32_serial_init(base, CONFIG_DEBUG_UART_CLOCK, CONFIG_BAUDRATE);
 }
 
 static inline void _debug_uart_putc(int ch)
 {
-	writel(ch, CONFIG_VAL(DEBUG_UART_BASE) + U_TXR);
+	writel(ch, CONFIG_DEBUG_UART_BASE + U_TXR);
 }
 
 DEBUG_UART_FUNCS
diff --git a/drivers/serial/serial_pl01x.c b/drivers/serial/serial_pl01x.c
index b3a988cb241..29f362b39e6 100644
--- a/drivers/serial/serial_pl01x.c
+++ b/drivers/serial/serial_pl01x.c
@@ -398,7 +398,7 @@ U_BOOT_DRIVER(serial_pl01x) = {
 static void _debug_uart_init(void)
 {
 #ifndef CONFIG_DEBUG_UART_SKIP_INIT
-	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
 	enum pl01x_type type;
 
 	if (IS_ENABLED(CONFIG_DEBUG_UART_PL011))
@@ -414,7 +414,7 @@ static void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct pl01x_regs *regs = (struct pl01x_regs *)CONFIG_DEBUG_UART_BASE;
 
 	while (pl01x_putc(regs, ch) == -EAGAIN)
 		;
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index 7aeb8c0f8cb..2b465115bda 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -276,7 +276,7 @@ static inline void _debug_uart_init(void)
 	if (IS_ENABLED(CONFIG_DEBUG_UART_SKIP_INIT))
 		return;
 
-	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
 
 	s5p_serial_init(uart);
 #if IS_ENABLED(CONFIG_ARCH_APPLE)
@@ -288,7 +288,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct s5p_uart *uart = (struct s5p_uart *)CONFIG_DEBUG_UART_BASE;
 
 #if IS_ENABLED(CONFIG_ARCH_APPLE)
 	while (readl(&uart->ufstat) & S5L_TX_FIFO_FULL);
diff --git a/drivers/serial/serial_sifive.c b/drivers/serial/serial_sifive.c
index c449f3fd02d..a48b0b5b340 100644
--- a/drivers/serial/serial_sifive.c
+++ b/drivers/serial/serial_sifive.c
@@ -212,7 +212,7 @@ U_BOOT_DRIVER(serial_sifive) = {
 static inline void _debug_uart_init(void)
 {
 	struct uart_sifive *regs =
-			(struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE);
+			(struct uart_sifive *)CONFIG_DEBUG_UART_BASE;
 
 	_sifive_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
 			      CONFIG_BAUDRATE);
@@ -222,7 +222,7 @@ static inline void _debug_uart_init(void)
 static inline void _debug_uart_putc(int ch)
 {
 	struct uart_sifive *regs =
-			(struct uart_sifive *)CONFIG_VAL(DEBUG_UART_BASE);
+			(struct uart_sifive *)CONFIG_DEBUG_UART_BASE;
 
 	while (_sifive_serial_putc(regs, ch) == -EAGAIN)
 		schedule();
diff --git a/drivers/serial/serial_stm32.c b/drivers/serial/serial_stm32.c
index 37ceca426d2..ad5cac0cdec 100644
--- a/drivers/serial/serial_stm32.c
+++ b/drivers/serial/serial_stm32.c
@@ -270,7 +270,7 @@ static inline struct stm32_uart_info *_debug_uart_info(void)
 
 static inline void _debug_uart_init(void)
 {
-	fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
+	fdt_addr_t base = CONFIG_DEBUG_UART_BASE;
 	struct stm32_uart_info *uart_info = _debug_uart_info();
 
 	_stm32_serial_init(base, uart_info);
@@ -281,7 +281,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int c)
 {
-	fdt_addr_t base = CONFIG_VAL(DEBUG_UART_BASE);
+	fdt_addr_t base = CONFIG_DEBUG_UART_BASE;
 	struct stm32_uart_info *uart_info = _debug_uart_info();
 
 	while (_stm32_serial_putc(base, uart_info, c) == -EAGAIN)
diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
index b6197da97cc..9780a44d09e 100644
--- a/drivers/serial/serial_xuartlite.c
+++ b/drivers/serial/serial_xuartlite.c
@@ -143,7 +143,7 @@ U_BOOT_DRIVER(serial_uartlite) = {
 
 static inline void _debug_uart_init(void)
 {
-	struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
 	int ret;
 
 	uart_out32(&regs->control, 0);
@@ -159,7 +159,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct uartlite *regs = (struct uartlite *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct uartlite *regs = (struct uartlite *)CONFIG_DEBUG_UART_BASE;
 
 	while (uart_in32(&regs->status) & SR_TX_FIFO_FULL)
 		;
diff --git a/drivers/serial/serial_zynq.c b/drivers/serial/serial_zynq.c
index 9bb9b7d3b8d..ae74b09fbc9 100644
--- a/drivers/serial/serial_zynq.c
+++ b/drivers/serial/serial_zynq.c
@@ -295,7 +295,7 @@ U_BOOT_DRIVER(serial_zynq) = {
 #ifdef CONFIG_DEBUG_UART_ZYNQ
 static inline void _debug_uart_init(void)
 {
-	struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE;
 
 	_uart_zynq_serial_init(regs);
 	_uart_zynq_serial_setbrg(regs, CONFIG_DEBUG_UART_CLOCK,
@@ -304,7 +304,7 @@ static inline void _debug_uart_init(void)
 
 static inline void _debug_uart_putc(int ch)
 {
-	struct uart_zynq *regs = (struct uart_zynq *)CONFIG_VAL(DEBUG_UART_BASE);
+	struct uart_zynq *regs = (struct uart_zynq *)CONFIG_DEBUG_UART_BASE;
 
 	while (_uart_zynq_serial_putc(regs, ch) == -EAGAIN)
 		schedule();
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 0e2559a8a85..c51388cfb6a 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -301,7 +301,7 @@ struct global_data {
 	 * @timebase_l: low 32 bits of timer
 	 */
 	unsigned int timebase_l;
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	/**
 	 * @malloc_base: base address of early malloc()
 	 */
diff --git a/include/dm/device_compat.h b/include/dm/device_compat.h
index 47329089d50..2dc106b99dd 100644
--- a/include/dm/device_compat.h
+++ b/include/dm/device_compat.h
@@ -50,7 +50,7 @@
 		printf(fmt, ##__VA_ARGS__); \
 	else if (IS_ENABLED(CONFIG_LOG)) \
 		log(cat, level, fmt, ##__VA_ARGS__); \
-	else if (level < CONFIG_VAL(LOGLEVEL)) \
+	else if (level < CONFIG_LOGLEVEL) \
 		printf(fmt, ##__VA_ARGS__); \
 })
 
diff --git a/include/linux/kconfig.h b/include/linux/kconfig.h
index 381f4eb5a1c..591b38040cd 100644
--- a/include/linux/kconfig.h
+++ b/include/linux/kconfig.h
@@ -32,10 +32,6 @@
 #define __config_enabled(arg1_or_junk, def_val) ___config_enabled(arg1_or_junk 1, def_val)
 #define ___config_enabled(__ignored, val, ...) val
 
-#define __config_val(cfg) CONFIG_ ## cfg
-
-#define CONFIG_VAL(option)  __config_val(option)
-
 /*
  * Count number of arguments to a variadic macro. Currently only need
  * it for 1, 2 or 3 arguments.
diff --git a/include/log.h b/include/log.h
index dfdb2e4f004..fd9c5be0afd 100644
--- a/include/log.h
+++ b/include/log.h
@@ -165,7 +165,7 @@ int _log_buffer(enum log_category_t cat, enum log_level_t level,
  * CONFIG_LOG_MAX_LEVEL is not defined. Add a check for this.
  */
 #if IS_ENABLED(CONFIG_LOG)
-#define _LOG_MAX_LEVEL CONFIG_VAL(LOG_MAX_LEVEL)
+#define _LOG_MAX_LEVEL CONFIG_LOG_MAX_LEVEL
 #else
 #define _LOG_MAX_LEVEL LOGL_INFO
 #endif
diff --git a/lib/asm-offsets.c b/lib/asm-offsets.c
index 0808cd4b0c1..a5c18888d8a 100644
--- a/lib/asm-offsets.c
+++ b/lib/asm-offsets.c
@@ -32,7 +32,7 @@ int main(void)
 
 	DEFINE(GD_FLAGS, offsetof(struct global_data, flags));
 
-#if CONFIG_VAL(SYS_MALLOC_F_LEN)
+#if CONFIG_SYS_MALLOC_F_LEN
 	DEFINE(GD_MALLOC_BASE, offsetof(struct global_data, malloc_base));
 #endif
 
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index 2209410f35b..918b7a48407 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -125,7 +125,7 @@ static efi_status_t setup_memory(struct efi_priv *priv)
 		return ret;
 	memset(gd, '\0', sizeof(*gd));
 
-	gd->malloc_base = (ulong)efi_malloc(priv, CONFIG_VAL(SYS_MALLOC_F_LEN),
+	gd->malloc_base = (ulong)efi_malloc(priv, CONFIG_SYS_MALLOC_F_LEN,
 					    &ret);
 	if (!gd->malloc_base)
 		return ret;
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index b044bd33826..e8eb38260ec 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1160,7 +1160,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
 {
 #if IS_ENABLED(CONFIG_MULTI_DTB_FIT_GZIP) ||\
 	IS_ENABLED(CONFIG_MULTI_DTB_FIT_LZO)
-	size_t sz_out = CONFIG_VAL(MULTI_DTB_FIT_UNCOMPRESS_SZ);
+	size_t sz_out = CONFIG_MULTI_DTB_FIT_UNCOMPRESS_SZ;
 	bool gzip = 0, lzo = 0;
 	ulong sz_in = sz_src;
 	void *dst;
@@ -1185,7 +1185,7 @@ static int uncompress_blob(const void *src, ulong sz_src, void **dstp)
 		}
 	} else  {
 # if IS_ENABLED(CONFIG_MULTI_DTB_FIT_USER_DEFINED_AREA)
-		dst = (void *)CONFIG_VAL(MULTI_DTB_FIT_USER_DEF_ADDR);
+		dst = (void *)CONFIG_MULTI_DTB_FIT_USER_DEF_ADDR;
 # else
 		return -ENOTSUPP;
 # endif
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index 82a3b748b65..1cb76dc8b19 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -482,7 +482,7 @@ static int run_tests(void)
 	CHECKP(buf + 18, out);
 	CHECKP(buf + 22, end);
 
-	strcpy(buf, "CONFIG_VAL(MARY)");
+	strcpy(buf, "CONFIG_MARY");
 	out = parse_config_line(buf, &end);
 	CHECKP(buf + 11, out);
 	CHECKP(buf + 15, end);
-- 
2.39.1.581.gbfd45094c4-goog



More information about the U-Boot mailing list