u-boot-brain/arch/arm
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
..
cpu armv8: fsl: i2c: Put I2C related code under CONFIG_SYS_I2C 2017-09-22 12:45:27 -07:00
dts rockchip: rk3399-puma: add boot-on regulator to override BIOS_DISABLE 2017-10-01 00:33:35 +02:00
include arm: Use asm-generic/io.h 2017-10-02 21:52:20 -04:00
lib env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
mach-aspeed aspeed: Refactor SCU to use consistent mask & shift 2017-05-08 11:57:35 -04:00
mach-at91 ARM: at91: spl: Add macro CONFIG_XXXX_BOOT support 2017-09-14 16:02:47 -04:00
mach-bcm283x bcm2835_wdt: support for the BCM2835/2836 watchdog 2017-05-09 20:30:08 -04:00
mach-davinci ARM: davinci: Remove CONFIG_SOC_DA830 2017-09-15 12:35:48 -04:00
mach-exynos usb: net: migrate USB Ethernet adapters to Kconfig 2017-09-08 10:23:00 -04:00
mach-highbank ARM: highbank: move SoC sources to mach-highbank 2015-02-21 08:23:51 -05:00
mach-imx toradex: imx6: Move g_dnl_bind_fixup() into common SPL code 2017-09-20 15:34:59 +02:00
mach-integrator env: Convert CONFIG_ENV_IS_IN... to a choice 2017-08-15 20:50:01 -04:00
mach-keystone env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
mach-kirkwood env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
mach-meson meson-gx: reserved memory regions 2017-07-22 15:36:18 -04:00
mach-mvebu arm: mvebu: fix boot from UART on ClearFog Base 2017-09-26 06:53:18 +02:00
mach-omap2 arm: am33xx: security: adds auth support for encrypted images 2017-09-29 14:07:55 -04:00
mach-orion5x spl: add hierarchical defaults for SPL_LDSCRIPT 2017-08-13 17:12:37 +02:00
mach-rmobile ARM: rmobile: Add missing IPSR18 bits to R8A7795 PFC 2017-09-05 07:51:39 +09:00
mach-rockchip rk3288: spl: Add dram_init_banksize 2017-10-01 00:33:35 +02:00
mach-s5pc1xx arm: s5pc1xx: move SoC to mach-s5pc1xx 2015-11-30 17:17:01 +09:00
mach-snapdragon dm: Rename dev_addr..() functions 2017-06-01 07:03:01 -06:00
mach-socfpga ARM: socfpga: fix duplicate const specifier warning 2017-09-23 15:13:20 +02:00
mach-sti board: Add STMicroelectronics STiH410-B2260 support 2017-03-14 20:40:21 -04:00
mach-stm32 board: Add stm32h7 SoC, discovery and evaluation boards support 2017-09-22 07:40:03 -04:00
mach-sunxi sunxi: Enable MMC new mode for A83T 2017-08-28 22:36:48 +05:30
mach-tegra dm: core: Add ofnode_for_each_subnode() 2017-09-11 21:43:58 -06:00
mach-uniphier printk: collect printk stuff into <linux/printk.h> with loglevel support 2017-10-04 10:31:17 -04:00
mach-versatile arm: Remove versatileab board 2015-09-11 15:01:25 -04:00
mach-zynq spl: add hierarchical defaults for SPL_LDSCRIPT 2017-08-13 17:12:37 +02:00
thumb1/include/asm/proc-armv arm: support Thumb-1 with CONFIG_SYS_THUMB_BUILD 2015-11-10 15:03:48 +01:00
config.mk arm: Always keep the dtb section on objcopy 2017-06-05 14:13:11 -04:00
Kconfig rockchip: enable TPL_SYSRESET for all rockchip SoCs 2017-10-01 00:33:35 +02:00
Kconfig.debug arm: debug: add Kconfig entries for lowlevel debug 2014-10-26 22:23:12 +01:00
Makefile imx: reorganize IMX code as other SOCs 2017-07-12 10:17:44 +02:00