summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Schmelzer <hannes.schmelzer@br-automation.com>2019-04-10 14:13:11 +0200
committerTom Rini <trini@konsulko.com>2019-04-26 17:51:51 -0400
commitad6be25c19840811e2e9ecd56620a0a1f5415631 (patch)
treef1f5e8c35ac362a7c53adcb27c43b35a9d1ac999
parent07b68b7843ad1fa15d63dcd26b5ca5a053fcc27f (diff)
board/BuR/common: prepare for compiling common into non AM33XX boards
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 <hannes.schmelzer@br-automation.com>
-rw-r--r--board/BuR/common/common.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c
index 602c571f9ce..513872a7d72 100644
--- a/board/BuR/common/common.c
+++ b/board/BuR/common/common.c
@@ -10,28 +10,22 @@
*/
#include <version.h>
#include <common.h>
-#include <environment.h>
-#include <errno.h>
-#include <asm/arch/cpu.h>
-#include <asm/arch/hardware.h>
-#include <asm/arch/omap.h>
-#include <asm/arch/clock.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/sys_proto.h>
-#include <asm/arch/mmc_host_def.h>
-#include <asm/io.h>
-#include <asm/gpio.h>
+#include <fdtdec.h>
#include <i2c.h>
-#include <power/tps65217.h>
#include <lcd.h>
#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 <asm/arch/hardware.h>
+#include <asm/arch/cpu.h>
+#include <asm/gpio.h>
+#include <power/tps65217.h>
+#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 <asm/arch/hardware.h>
+#include <asm/arch/omap.h>
+#include <asm/arch/clock.h>
+#include <asm/arch/sys_proto.h>
+#include <power/tps65217.h>
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;