[PATCH 02/27] console: Unify console_simple.c and pbl/console.c
sam at ravnborg.org
Thu Jun 14 21:49:44 PDT 2018
On Thu, Jun 14, 2018 at 09:11:10PM -0700, Andrey Smirnov wrote:
> Move all of the shared code into lib/console.c and convert both files
> to use that.
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
> +++ b/lib/console.c
> @@ -0,0 +1,130 @@
> +// SPDX-License-Identifier: GPL-2.0+
> + * File containing all of the console-related code that is used by all
> + * possible consumers: PBL, CONSOLE_FULL, CONSOLE_SIMPLE, etc.
> + *
> + * Copyright (C) 2018 Zodiac Inflight Innovations
> + * Author: Andrey Smirnov <andrew.smirnov at gmail.com>
> + */
> +#include <debug_ll.h>
> +#include <console.h>
> + * Put this in the data section so that it survives the clearing of
> + * the BSS segment.
> + */
> +#define __data __attribute__ ((section(".data")))
This definition would be better placed in compiler.h
together with all the __naked etc. definitions.
And then it could be used in other places,
like for example first patch in this serie.
More information about the barebox