Skip to contentSkip to conversation

ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC

PATCH In review Hiroshi Doyu 3 participants 3 messages Feb 6, 2013 – Feb 10, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: Fix build error w/ ARCH_TEGRA_114_SOC w/o ARCH_TEGRA_3x_SOC

This patch fixes the build error when ARCH_TEGRA_114_SOC is enabled and ARCH_TEGRA_3x_SOC is disabled.

This provides Tegra114 with its own tegra114_init_early() instead of making use of tegra30_init_early() so that T114 build doesn't depend on T3x anymore.

---
 arch/arm/mach-tegra/board-dt-tegra114.c |    2 +-
 arch/arm/mach-tegra/board.h             |    2 ++
 arch/arm/mach-tegra/common.c            |   25 +++++++++++++++++--------
 3 files changed, 20 insertions(+), 9 deletions(-)
arch/arm/mach-tegra/board-dt-tegra114.c +1 -1
index 72598e2..085d636 100644
@@ -36,7 +36,7 @@ static const char * const tegra114_dt_board_compat[] = {
 DT_MACHINE_START(TEGRA114_DT, "NVIDIA Tegra114 (Flattened Device Tree)")
 	.smp		= smp_ops(tegra_smp_ops),
 	.map_io		= tegra_map_common_io,
-	.init_early	= tegra30_init_early,
+	.init_early	= tegra114_init_early,
 	.init_irq	= tegra_dt_init_irq,
 	.init_time	= clocksource_of_init,
 	.init_machine	= tegra114_dt_init,
arch/arm/mach-tegra/board.h +2 -0
index da8f5a3..86851c8 100644
@@ -1,6 +1,7 @@
 /*
  * arch/arm/mach-tegra/board.h
  *
+ * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
  * Copyright (C) 2010 Google, Inc.
  *
  * Author:
@@ -27,6 +28,7 @@ void tegra_assert_system_reset(char mode, const char *cmd);
 
 void __init tegra20_init_early(void);
 void __init tegra30_init_early(void);
+void __init tegra114_init_early(void);
 void __init tegra_map_common_io(void);
 void __init tegra_init_irq(void);
 void __init tegra_dt_init_irq(void);
arch/arm/mach-tegra/common.c +17 -8
index 46c0718..5449a3f 100644
@@ -1,6 +1,7 @@
 /*
  * arch/arm/mach-tegra/common.c
  *
+ * Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
  * Copyright (C) 2010 Google, Inc.
  *
  * Author:
@@ -93,8 +94,7 @@ static void __init tegra_init_cache(void)
 
 }
 
-#ifdef CONFIG_ARCH_TEGRA_2x_SOC
-void __init tegra20_init_early(void)
+static void __init tegra_init_early(void)
 {
 	tegra_cpu_reset_handler_init();
 	tegra_apb_io_init();
@@ -102,22 +102,31 @@ void __init tegra20_init_early(void)
 	tegra_init_cache();
 	tegra_pmc_init();
 	tegra_powergate_init();
+}
+
+#ifdef CONFIG_ARCH_TEGRA_2x_SOC
+void __init tegra20_init_early(void)
+{
+	tegra_init_early();
 	tegra20_hotplug_init();
 }
 #endif
+
 #ifdef CONFIG_ARCH_TEGRA_3x_SOC
 void __init tegra30_init_early(void)
 {
-	tegra_cpu_reset_handler_init();
-	tegra_apb_io_init();
-	tegra_init_fuse();
-	tegra_init_cache();
-	tegra_pmc_init();
-	tegra_powergate_init();
+	tegra_init_early();
 	tegra30_hotplug_init();
 }
 #endif
 
+#ifdef CONFIG_ARCH_TEGRA_114_SOC
+void __init tegra114_init_early(void)
+{
+	tegra_init_early();
+}
+#endif
+
 void __init tegra_init_late(void)
 {
 	tegra_powergate_debugfs_init();
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 6 lines · Hiroshi Doyu

This patch fixes the build error when ARCH_TEGRA_114_SOC is enabled and ARCH_TEGRA_3x_SOC is disabled.

This provides Tegra114 with its own tegra114_init_early() instead of making use of tegra30_init_early() so that T114 build doesn't depend on T3x anymore.

Olof, Arnd,

This patch fixes the (well, an) issue for me. Can you apply it directly to the arm-soc tree. I believe it should apply on top of the tegra-for-3.9-soc-t114 pull request I sent.

Let me know if you need a resend, although it was CC'd to LAKML, so I assume you have it in your email history.

BTW, I anticipate a few more fixes coming down the line:

1) Clock-related patch from Laxman so that UART C clock on Cardhu is set up correctly for Bluetooth. v1 was posted already, but I think a v2 is needed here.

2) Another fix for Tegra20+Tegra114 w/o Tegra30 build fix from Hiroshi, related to drivers/amba/tegra-ahb.c, although there aren't any dependencies there, so perhaps that can go through Russell since he maintains that tree.

3) Something related to fb2229a "ARM: 7634/1: uncompress debug support for multiplatform build" since that breaks tegra_defconfig, but I haven't had a chance to look into that yet.

4) Something related to a boot failure related to crash in tegra_timer_interrupt(), which I'm just about to go investigate.

Hopefully that's it...

#2 lore raw
Quoted 8 lines · Stephen Warren
Quoted 6 lines · Hiroshi Doyu

This patch fixes the build error when ARCH_TEGRA_114_SOC is enabled and ARCH_TEGRA_3x_SOC is disabled.

This provides Tegra114 with its own tegra114_init_early() instead of making use of tegra30_init_early() so that T114 build doesn't depend on T3x anymore.

Quoted 5 lines

Olof, Arnd,

This patch fixes the (well, an) issue for me. Can you apply it directly to the arm-soc tree. I believe it should apply on top of the tegra-for-3.9-soc-t114 pull request I sent.

Ok, applied -- I presumed your acked-by so I added it.

Quoted 2 lines

Let me know if you need a resend, although it was CC'd to LAKML, so I assume you have it in your email history.

No resend needed -- it had a bit of fuzz when applied though.

Quoted 11 lines

BTW, I anticipate a few more fixes coming down the line:

1) Clock-related patch from Laxman so that UART C clock on Cardhu is set up correctly for Bluetooth. v1 was posted already, but I think a v2 is needed here.

2) Another fix for Tegra20+Tegra114 w/o Tegra30 build fix from Hiroshi, related to drivers/amba/tegra-ahb.c, although there aren't any dependencies there, so perhaps that can go through Russell since he maintains that tree.

Quoted 8 lines

3) Something related to fb2229a "ARM: 7634/1: uncompress debug support for multiplatform build" since that breaks tegra_defconfig, but I haven't had a chance to look into that yet.

4) Something related to a boot failure related to crash in tegra_timer_interrupt(), which I'm just about to go investigate.

Hopefully that's it...

Above sounds reasonable, thanks for the heads up.

-Olof