All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/6] board/BuR/common: prepare for compiling common into non AM33XX boards
Date: Wed, 10 Apr 2019 14:13:11 +0200	[thread overview]
Message-ID: <1554898396-5549-1-git-send-email-hannes.schmelzer@br-automation.com> (raw)

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>
---

 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 <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;
-- 
2.7.4

             reply	other threads:[~2019-04-10 12:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-10 12:13 Hannes Schmelzer [this message]
2019-04-10 12:13 ` [U-Boot] [PATCH 2/6] board/BuR/common: cosmetic: move 'overwrite_console' up to more related stuff Hannes Schmelzer
2019-04-27 14:44   ` [U-Boot] [U-Boot, " Tom Rini
2019-04-10 12:13 ` [U-Boot] [PATCH 3/6] board/BuR/common: add 'brdefaulip_setup' function Hannes Schmelzer
2019-04-27 14:44   ` [U-Boot] [U-Boot, " Tom Rini
2019-04-10 12:13 ` [U-Boot] [PATCH 4/6] board/BuR/common: add br resetcontoller implementation Hannes Schmelzer
2019-04-27 14:44   ` [U-Boot] [U-Boot, " Tom Rini
2019-04-10 12:13 ` [U-Boot] [PATCH 5/6] board/BuR/brxre1: cosmetic cleanup Hannes Schmelzer
2019-04-27 14:44   ` [U-Boot] [U-Boot,5/6] " Tom Rini
2019-04-10 12:13 ` [U-Boot] [PATCH 6/6] board/BuR/brxre1: use common resetcontroller implementation Hannes Schmelzer
2019-04-27 14:44   ` [U-Boot] [U-Boot, " Tom Rini
2019-04-27 14:44 ` [U-Boot] [U-Boot, 1/6] board/BuR/common: prepare for compiling common into non AM33XX boards Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1554898396-5549-1-git-send-email-hannes.schmelzer@br-automation.com \
    --to=hannes.schmelzer@br-automation.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.