1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-05 14:49:18 +01:00
Files
u-boot-megous/include
Masahiro Yamada b44b30260f printk: collect printk stuff into <linux/printk.h> with loglevel support
When we import code from Linux, with regular re-sync planned, we want
to use printk() and pr_*().  U-Boot does not support them in a clean
way.  So, people end up with local macros, or compat headers here and
there, then we occasionally see build errors of definition conflicts.

We have include/linux/compat.h, but putting all sorts of unrelated
things into a single header is just a temporal workaround.  Hence this
patch, to find the best home for all printk variants.  If you want to
use printk() and friends, please include <linux/printk.h>.  This header
is self-contained, and pulls in only a few headers.

When I was testing this clean-up, I noticed the image size exceeded
its platform limit on some boards.  This is because all pr_*() that
were previously defined as no-op in include/linux/mtd/mtd.h (unless
CONFIG_MTD_DEBUG is set), are now enabled.

To make such boards happy, this commit also implements CONFIG_LOGLEVEL.
The concept is similar to the kernel parameter "loglevel".  (Actually,
the Kconfig help message was taken from kernel-paremeter.txt of Linux)
Messages with a loglevel smaller than console loglevel will be printed.

The difference is the loglevel is build-time determined.  To save the
image size, lower priority pr_*() are compiled out.  I set the default
of CONFIG_LOGLEVEL to 6, i.e. pr_notice and higher priority messages
are compiled in.

I adjusted CONFIG_LOGLEVEL to avoid build error for some boards.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
[trini: Add in SPL_LOGLEVEL that is the same as LOGLEVEL]
Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-04 10:31:17 -04:00
..
2017-07-03 17:35:28 -04:00
2016-04-01 17:18:12 -04:00
2016-12-03 13:21:21 -05:00
2017-02-08 15:56:28 -05:00
2016-03-24 09:47:43 +01:00
2017-06-05 11:02:29 -04:00
2016-05-25 17:52:39 +02:00
2016-05-25 17:52:39 +02:00
2015-05-05 20:58:20 -06:00
2015-06-10 19:26:54 -06:00
2017-09-16 14:57:44 +08:00
2017-10-02 21:52:18 -04:00
2016-01-20 19:06:23 -07:00
2017-09-12 17:57:59 -04:00
2017-09-15 05:27:47 -06:00
2016-10-19 09:01:51 +02:00
2017-08-16 08:22:18 -04:00
2017-05-11 22:21:27 -04:00
2017-07-28 23:34:39 +02:00
2017-04-13 09:41:10 -04:00
2016-02-23 16:14:45 +05:30
2017-08-17 16:59:55 +09:00
2017-05-15 20:32:12 +02:00
2017-09-20 11:08:01 +02:00
2017-09-20 11:00:57 +02:00
2016-11-14 23:24:03 +01:00
2016-05-03 17:52:11 -05:00
2016-01-28 12:22:19 -06:00
2017-08-16 08:30:24 -04:00
2017-06-02 10:16:46 -06:00
2016-01-27 15:55:54 +01:00
2017-10-02 21:52:18 -04:00
2016-12-08 10:36:22 -06:00
2017-09-03 15:30:35 -04:00
2017-07-23 09:24:47 -04:00
2017-06-12 08:37:55 -04:00
2017-04-14 19:38:57 -06:00
2016-06-19 17:05:55 -06:00
2016-03-08 15:01:47 -05:00
2016-08-12 11:01:22 -06:00
2016-01-20 10:19:40 -05:00
2015-11-12 08:26:58 +08:00
2017-07-11 22:41:54 -04:00
2017-07-28 12:02:47 -06:00
2016-01-21 20:42:36 -07:00
2017-09-20 10:20:00 +02:00
2017-09-20 10:20:00 +02:00
2016-02-05 12:47:21 +08:00
2017-06-12 08:37:55 -04:00
2017-07-03 17:35:28 -04:00
2016-01-21 20:42:34 -07:00
2015-07-21 17:39:27 -06:00
2015-07-21 17:39:28 -06:00
2017-07-28 23:34:07 +02:00
2017-04-10 10:02:03 +08:00
2017-08-17 16:59:55 +09:00
2017-08-23 10:41:58 +02:00
2017-08-16 08:22:18 -04:00
2016-08-17 10:25:35 +09:00
2017-06-01 07:03:16 -06:00
2016-05-26 20:48:31 -06:00
2015-07-26 12:11:33 +02:00
2016-02-26 08:53:10 -07:00
2016-09-26 13:24:43 -04:00
2017-04-12 13:28:27 -04:00
2017-10-01 16:32:51 +02:00
2016-05-02 18:37:09 -04:00
2017-08-24 11:00:47 +08:00
2016-10-23 18:33:48 -04:00