rv1126-uboot/include/linux
Masahiro Yamada a9a4552a1c UPSTREAM: 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.

Change-Id: I997d8bbeedd48777be87472df8ed126181fc4b8e
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>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit b44b30260ffa3dc82f4bb98b022483bb09e95353)
2018-01-17 15:27:28 +08:00
..
byteorder
mtd UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support 2018-01-17 15:27:28 +08:00
unaligned
usb UPSTREAM: usb: xhci: Honor endpoint's interval 2018-01-17 15:27:28 +08:00
apm_bios.h
arm-smccc.h
bch.h
bitops.h
bitrev.h
bug.h
compat.h UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support 2018-01-17 15:27:28 +08:00
compiler-clang.h
compiler-gcc.h
compiler-intel.h
compiler.h
crc7.h
crc8.h
crc32.h
ctype.h
delay.h
dma-direction.h UPSTREAM: dma: import linux/dma-direction.h to consolidate enum dma_data_direction 2018-01-16 18:13:53 +08:00
drm_dp_helper.h
dw_hdmi.h drm/rockchip: Complete missing header files 2017-12-06 18:09:08 +08:00
edd.h
err.h
errno.h
ethtool.h
fb.h
hdmi.h common: edid: Add more detailed edid parsing 2017-11-20 11:54:16 +08:00
immap_qe.h
input.h
io.h UPSTREAM: linux/io.h: import generic ioread* / iowrite* accessors from Linux 2018-01-16 18:14:05 +08:00
ioctl.h
iopoll.h
ioport.h
kbuild.h
kconfig.h
kernel.h
linkage.h
linux_string.h
list.h
list_sort.h
log2.h
lzo.h
math64.h
mbus.h
mc146818rtc.h
mdio.h
media-bus-format.h common: edid: Add more detailed edid parsing 2017-11-20 11:54:16 +08:00
mii.h
netdevice.h
poison.h
posix_types.h
printk.h UPSTREAM: printk: collect printk stuff into <linux/printk.h> with loglevel support 2018-01-17 15:27:28 +08:00
psci.h
rbtree.h
rbtree_augmented.h
screen_info.h
serial_reg.h
sizes.h
stat.h
stddef.h
string.h
stringify.h
time.h
typecheck.h
types.h