[U-Boot] [PATCH 51/60] ARM: tegra: move SPL-specific GPIO device to spl.c

Stephen Warren swarren at wwwdotorg.org
Tue Apr 19 22:59:31 CEST 2016


From: Stephen Warren <swarren at nvidia.com>

SPL-specific code generally belongs in an SPL-specific file. This allows
an ifdef to be removed too:-)

Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
 arch/arm/mach-tegra/board2.c | 8 --------
 arch/arm/mach-tegra/spl.c    | 6 ++++++
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index d7ca99985660..fb58b5e5986a 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -6,7 +6,6 @@
  */
 
 #include <common.h>
-#include <dm.h>
 #include <errno.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -33,13 +32,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#ifdef CONFIG_SPL_BUILD
-/* TODO(sjg at chromium.org): Remove once SPL supports device tree */
-U_BOOT_DEVICE(tegra_gpios) = {
-	"gpio_tegra"
-};
-#endif
-
 __weak void pin_mux_usb(void) {}
 __weak void pin_mux_spi(void) {}
 __weak void pin_mux_display(void) {}
diff --git a/arch/arm/mach-tegra/spl.c b/arch/arm/mach-tegra/spl.c
index 1c01f6c93c46..353a6ddfb6c2 100644
--- a/arch/arm/mach-tegra/spl.c
+++ b/arch/arm/mach-tegra/spl.c
@@ -7,6 +7,7 @@
  * SPDX-License-Identifier:	GPL-2.0+
  */
 #include <common.h>
+#include <dm.h>
 #include <spl.h>
 
 #include <asm/io.h>
@@ -18,6 +19,11 @@
 #include "apb_misc.h"
 #include "cpu.h"
 
+/* TODO(sjg at chromium.org): Remove once SPL supports device tree */
+U_BOOT_DEVICE(tegra_gpios) = {
+	"gpio_tegra"
+};
+
 __weak void tegra_spl_board_init(void) {}
 
 void spl_board_init(void)
-- 
2.8.1



More information about the U-Boot mailing list