diff mbox

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

Message ID 1461099580-3866-52-git-send-email-swarren@wwwdotorg.org
State Rejected
Delegated to: Tom Warren
Headers show

Commit Message

Stephen Warren April 19, 2016, 8:59 p.m. UTC
From: Stephen Warren <swarren@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@nvidia.com>
---
 arch/arm/mach-tegra/board2.c | 8 --------
 arch/arm/mach-tegra/spl.c    | 6 ++++++
 2 files changed, 6 insertions(+), 8 deletions(-)

Comments

Simon Glass May 7, 2016, 10:32 p.m. UTC | #1
On 19 April 2016 at 14:59, Stephen Warren <swarren@wwwdotorg.org> wrote:
> From: Stephen Warren <swarren@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@nvidia.com>
> ---
>  arch/arm/mach-tegra/board2.c | 8 --------
>  arch/arm/mach-tegra/spl.c    | 6 ++++++
>  2 files changed, 6 insertions(+), 8 deletions(-)


Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox

Patch

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