Commit d2ffb918 authored by Olof Johansson's avatar Olof Johansson

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.
Signed-off-by: default avatarHiroshi Doyu <hdoyu@nvidia.com>
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
parent 031b77af
...@@ -37,7 +37,7 @@ static const char * const tegra114_dt_board_compat[] = { ...@@ -37,7 +37,7 @@ static const char * const tegra114_dt_board_compat[] = {
DT_MACHINE_START(TEGRA114_DT, "NVIDIA Tegra114 (Flattened Device Tree)") DT_MACHINE_START(TEGRA114_DT, "NVIDIA Tegra114 (Flattened Device Tree)")
.smp = smp_ops(tegra_smp_ops), .smp = smp_ops(tegra_smp_ops),
.map_io = tegra_map_common_io, .map_io = tegra_map_common_io,
.init_early = tegra30_init_early, .init_early = tegra114_init_early,
.init_irq = tegra_dt_init_irq, .init_irq = tegra_dt_init_irq,
.handle_irq = gic_handle_irq, .handle_irq = gic_handle_irq,
.init_time = clocksource_of_init, .init_time = clocksource_of_init,
......
/* /*
* arch/arm/mach-tegra/board.h * arch/arm/mach-tegra/board.h
* *
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
* Copyright (C) 2010 Google, Inc. * Copyright (C) 2010 Google, Inc.
* *
* Author: * Author:
...@@ -27,6 +28,7 @@ void tegra_assert_system_reset(char mode, const char *cmd); ...@@ -27,6 +28,7 @@ void tegra_assert_system_reset(char mode, const char *cmd);
void __init tegra20_init_early(void); void __init tegra20_init_early(void);
void __init tegra30_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_map_common_io(void);
void __init tegra_init_irq(void); void __init tegra_init_irq(void);
void __init tegra_dt_init_irq(void); void __init tegra_dt_init_irq(void);
......
/* /*
* arch/arm/mach-tegra/common.c * arch/arm/mach-tegra/common.c
* *
* Copyright (c) 2013 NVIDIA Corporation. All rights reserved.
* Copyright (C) 2010 Google, Inc. * Copyright (C) 2010 Google, Inc.
* *
* Author: * Author:
...@@ -100,8 +101,7 @@ static void __init tegra_init_cache(void) ...@@ -100,8 +101,7 @@ static void __init tegra_init_cache(void)
} }
#ifdef CONFIG_ARCH_TEGRA_2x_SOC static void __init tegra_init_early(void)
void __init tegra20_init_early(void)
{ {
tegra_cpu_reset_handler_init(); tegra_cpu_reset_handler_init();
tegra_apb_io_init(); tegra_apb_io_init();
...@@ -109,22 +109,31 @@ void __init tegra20_init_early(void) ...@@ -109,22 +109,31 @@ void __init tegra20_init_early(void)
tegra_init_cache(); tegra_init_cache();
tegra_pmc_init(); tegra_pmc_init();
tegra_powergate_init(); tegra_powergate_init();
}
#ifdef CONFIG_ARCH_TEGRA_2x_SOC
void __init tegra20_init_early(void)
{
tegra_init_early();
tegra20_hotplug_init(); tegra20_hotplug_init();
} }
#endif #endif
#ifdef CONFIG_ARCH_TEGRA_3x_SOC #ifdef CONFIG_ARCH_TEGRA_3x_SOC
void __init tegra30_init_early(void) void __init tegra30_init_early(void)
{ {
tegra_cpu_reset_handler_init(); tegra_init_early();
tegra_apb_io_init();
tegra_init_fuse();
tegra_init_cache();
tegra_pmc_init();
tegra_powergate_init();
tegra30_hotplug_init(); tegra30_hotplug_init();
} }
#endif #endif
#ifdef CONFIG_ARCH_TEGRA_114_SOC
void __init tegra114_init_early(void)
{
tegra_init_early();
}
#endif
void __init tegra_init_late(void) void __init tegra_init_late(void)
{ {
tegra_powergate_debugfs_init(); tegra_powergate_debugfs_init();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment