From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hannes Schmelzer Date: Wed, 10 Apr 2019 14:13:11 +0200 Subject: [U-Boot] [PATCH 1/6] board/BuR/common: prepare for compiling common into non AM33XX boards Message-ID: <1554898396-5549-1-git-send-email-hannes.schmelzer@br-automation.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Today the BuR common stuff is only used on AM33XX boards. In future we plan to have many other platforms than AM33XX so we have to move arch- specific #include(s) to responsible #ifdef sections. By the way we drop unneeded #include(s). Signed-off-by: Hannes Schmelzer --- board/BuR/common/common.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 602c571..513872a 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -10,28 +10,22 @@ */ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include #include -#include #include #include "bur_common.h" -#include "../../../drivers/video/am335x-fb.h" DECLARE_GLOBAL_DATA_PTR; /* --------------------------------------------------------------------------*/ #if defined(CONFIG_LCD) && defined(CONFIG_AM335X_LCD) && \ !defined(CONFIG_SPL_BUILD) +#include +#include +#include +#include +#include "../../../drivers/video/am335x-fb.h" + void lcdbacklight(int on) { unsigned int driver = env_get_ulong("ds1_bright_drv", 16, 0UL); @@ -272,7 +266,12 @@ int ft_board_setup(void *blob, bd_t *bd) return 0; } -#ifdef CONFIG_SPL_BUILD +#if defined(CONFIG_SPL_BUILD) && defined(CONFIG_AM33XX) +#include +#include +#include +#include +#include static struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; @@ -359,8 +358,7 @@ void set_mux_conf_regs(void) enable_board_pin_mux(); } -#endif /* CONFIG_SPL_BUILD */ - +#endif /* CONFIG_SPL_BUILD && CONFIG_AM33XX */ int overwrite_console(void) { return 1; -- 2.7.4