]> git.baikalelectronics.ru Git - uboot.git/commit
serial: Fix Makefile during SPL and TPL build
authorMarek Vasut <marek.vasut@gmail.com>
Sat, 7 Apr 2018 14:06:22 +0000 (16:06 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 11 Apr 2018 17:22:05 +0000 (13:22 -0400)
commit1e9143b77f27ffc4c1bbc1118322552d348582c7
tree617340fa09a1bfb10df16181ddc46df2511b1677
parent9bb99c02c4b4cc4ef889d310d1ad426c81307d8b
serial: Fix Makefile during SPL and TPL build

This patch fixes a situation where CONFIG_DM_SERIAL is enabled for
regular U-Boot and SPL, but not for TPL. In that case, the build
will try to include serial-uclass into the TPL nonetheless, because
CONFIG_DM_SERIAL is set.

The solution is to check if the build is for SPL or TPL and in that
case, check if CONFIG_$(SPL_TPL_)DM_SERIAL is also set. Only in that
case, include serial-uclass.c . If the build is for regular U-Boot,
CONFIG_BUILD is not set, so only check if CONFIG_DM_SERIAL is set
and if so, include serial-uclass.c

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
drivers/serial/Makefile