@@ -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
}
@@ -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",
@@ -347,8 +347,8 @@ struct mem_timings mem_timings[] = {
DMC_MEMCONFIGX_CHIP_COL_10 |
DMC_MEMCONFIGX_CHIP_ROW_15 |
DMC_MEMCONFIGX_CHIP_BANK_8,
- .membaseconfig0 = DMC_MEMBASECONFIG_VAL(0x40),
- .membaseconfig1 = DMC_MEMBASECONFIG_VAL(0x80),
+ .membaseconfig0 = DMC_MEMBASECONFIG_0x40,
+ .membaseconfig1 = DMC_MEMBASECONFIG_0x80,
.prechconfig_tp_cnt = 0xff,
.dpwrdn_cyc = 0xff,
.dsref_cyc = 0xffff,
@@ -450,8 +450,8 @@ struct mem_timings mem_timings[] = {
DMC_MEMCONFIGX_CHIP_COL_10 |
DMC_MEMCONFIGX_CHIP_ROW_15 |
DMC_MEMCONFIGX_CHIP_BANK_8,
- .membaseconfig0 = DMC_MEMBASECONFIG_VAL(0x40),
- .membaseconfig1 = DMC_MEMBASECONFIG_VAL(0x80),
+ .membaseconfig0 = DMC_MEMBASECONFIG_0x40,
+ .membaseconfig1 = DMC_MEMBASECONFIG_0x80,
.prechconfig_tp_cnt = 0xff,
.dpwrdn_cyc = 0xff,
.dsref_cyc = 0xffff,
@@ -59,7 +59,7 @@
#define DMC_MEMBASECONFIGX_CHIP_BASE(x) (x << 16)
#define DMC_MEMBASECONFIGX_CHIP_MASK(x) (x << 0)
-#define DMC_MEMBASECONFIG_VAL(x) ( \
+#define DMC_MEMBASECONFIG_x ( \
DMC_MEMBASECONFIGX_CHIP_BASE(x) | \
DMC_MEMBASECONFIGX_CHIP_MASK(0x780) \
)
@@ -75,8 +75,8 @@
#define DMC_CHIP_BASE_1 0x50
#define DMC_CHIP_MASK 0x7C0
-#define DMC_MEMBASECONFIG0_VAL DMC_MEMBASECONFIG_VAL(0x40)
-#define DMC_MEMBASECONFIG1_VAL DMC_MEMBASECONFIG_VAL(0x80)
+#define DMC_MEMBASECONFIG0_VAL DMC_MEMBASECONFIG_0x40
+#define DMC_MEMBASECONFIG1_VAL DMC_MEMBASECONFIG_0x80
#define DMC_PRECHCONFIG_VAL 0xFF000000
#define DMC_PWRDNCONFIG_VAL 0xFFFF00FF
@@ -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");
@@ -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()) {
@@ -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
@@ -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
@@ -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)
@@ -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@h
mtspr IVPR,r1
li r4,CriticalInput@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@h
ori r4,r4,SYS_INIT_SP_ADDR@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@h /* Source Address */
+ ori r4,r4,CONFIG_SYS_MONITOR_BASE@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,
@@ -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)
@@ -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)
@@ -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
}
@@ -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
@@ -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
@@ -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
@@ -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;
@@ -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;
}
@@ -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,
@@ -356,7 +356,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
@@ -788,7 +788,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");
@@ -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
@@ -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 {
@@ -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++)];
@@ -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
@@ -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
@@ -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);
}
@@ -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);
@@ -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),
@@ -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[] = {
@@ -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(®s->control);
@@ -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(®s->status);
@@ -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)))
;
@@ -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
@@ -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 {
@@ -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, ®s->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(®s->status) & UART_TXEMPTY))
;
@@ -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);
@@ -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);
@@ -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(®s->status) & AML_UART_TX_FULL)
;
@@ -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);
@@ -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(®s->lsr) & UART_LSR_THRE))
;
@@ -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);
@@ -452,7 +452,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);
+ (void *) CONFIG_DEBUG_UART_BASE;
while (!(readl(®s->lsr) & UART_LSR_THRE))
;
@@ -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)
;
@@ -385,7 +385,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,
@@ -394,7 +394,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();
@@ -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))
;
@@ -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
@@ -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)
;
@@ -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);
@@ -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();
@@ -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)
@@ -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(®s->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(®s->status) & SR_TX_FIFO_FULL)
;
@@ -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();
@@ -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()
*/
@@ -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__); \
})
@@ -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.
@@ -163,7 +163,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
@@ -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
@@ -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;
@@ -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
@@ -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);
This serves no purpose now since we can write CONFIG_FOO instead of CONFIG_VAL(FOO) Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> --- arch/arm/lib/bdinfo.c | 4 +- arch/arm/mach-at91/arm926ejs/eflash.c | 4 +- arch/arm/mach-exynos/clock_init_exynos5.c | 8 ++-- arch/arm/mach-exynos/exynos5_setup.h | 6 +-- 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 | 4 +- 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 +- 59 files changed, 146 insertions(+), 150 deletions(-)