#define PRE_CONSOLE_FLUSHPOINT2_EVERYTHING_BUT_SERIAL 1
#if CONFIG_IS_ENABLED(PRE_CONSOLE_BUFFER)
-#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
+#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_VAL(PRE_CON_BUF_SZ))
static void pre_console_putc(const char c)
{
char *buffer;
- buffer = map_sysmem(CONFIG_PRE_CON_BUF_ADDR, CONFIG_PRE_CON_BUF_SZ);
+ buffer = map_sysmem(CONFIG_VAL(PRE_CON_BUF_ADDR), CONFIG_VAL(PRE_CON_BUF_SZ));
buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c;
static void print_pre_console_buffer(int flushpoint)
{
unsigned long in = 0, out = 0;
- char buf_out[CONFIG_PRE_CON_BUF_SZ + 1];
+ char buf_out[CONFIG_VAL(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_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;
+ 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);
while (in < gd->precon_buf_idx)
buf_out[out++] = buf_in[CIRC_BUF_IDX(in++)];