u-boot/arch/arm/mach-uniphier
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
..
arm32 Revert "ARM: uniphier: fix ROM boot mode for PH1-sLD3" 2017-08-20 23:05:39 +09:00
arm64 ARM: uniphier: remove SPL support for ARMv8 SoCs 2017-07-26 22:27:15 +09:00
bcu ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
boot-device ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
clk ARM: uniphier: add GPU(Mali) reset deassert and clk enable 2017-09-18 20:26:18 +09:00
debug-uart ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
dram ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
sbc ARM: uniphier: set system bus pinmux for PXs3 2017-08-30 09:07:04 +09:00
board_init.c ARM: uniphier: remove ad-hoc pin settings for NAND 2017-08-30 09:06:57 +09:00
board_late_init.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
boards.c ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
cpu-info.c ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
debug.h ARM: uniphier: add PSCI support for UniPhier ARMv7 SoCs 2016-08-11 17:58:06 +09:00
dram_init.c printk: collect printk stuff into <linux/printk.h> with loglevel support 2017-10-04 10:31:17 -04:00
init.h printk: collect printk stuff into <linux/printk.h> with loglevel support 2017-10-04 10:31:17 -04:00
Kconfig ARM: uniphier: merge two defconfig files into uniphier_v7_defconfig 2017-09-18 20:26:06 +09:00
Makefile ARM: uniphier: enable PSCI sysreset for uniphier_v8_defconfig 2017-04-20 23:49:50 +09:00
memconf.c ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
micro-support-card.c ARM: uniphier: print Support Card info very late 2017-02-23 08:37:56 +09:00
micro-support-card.h ARM: uniphier: refactor Support Card init code 2017-01-17 09:00:40 +09:00
mmc-boot-mode.c ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
mmc-first-dev.c env: Rename common functions related to setenv() 2017-08-16 08:23:32 -04:00
pinctrl-glue.c dm: Fix up inclusion of common.h 2017-06-01 07:03:03 -06:00
reset.c ARM: uniphier: support system reset functionality for PSCI 2016-08-28 13:09:19 +09:00
sc64-regs.h ARM: uniphier: remove bit field macros from sc64-regs.h 2017-09-18 20:26:12 +09:00
sc-regs.h ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
sg-regs.h ARM: uniphier: add more init code for PXs3 2017-05-17 21:56:17 +09:00
soc-info.c ARM: uniphier: fix MODEL field of REVISION register 2017-05-17 21:46:14 +09:00
soc-info.h ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00
spl_board_init.c ARM: uniphier: remove sLD3 SoC support 2017-08-20 23:05:39 +09:00