提交 7469688e 编写于 作者: H Hiroshi Doyu 提交者: Stephen Warren

ARM: tegra: Unify tegra{20,30,114}_init_early()

Refactored tegra{20,30,114}_init_early() so that we have the unified
tegra_init_early().
Signed-off-by: NHiroshi Doyu <hdoyu@nvidia.com>
Signed-off-by: NStephen Warren <swarren@nvidia.com>
上级 84b808da
...@@ -36,7 +36,7 @@ static const char * const tegra114_dt_board_compat[] = { ...@@ -36,7 +36,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 = tegra114_init_early, .init_early = tegra_init_early,
.init_irq = tegra_dt_init_irq, .init_irq = tegra_dt_init_irq,
.init_time = clocksource_of_init, .init_time = clocksource_of_init,
.init_machine = tegra114_dt_init, .init_machine = tegra114_dt_init,
......
...@@ -145,7 +145,7 @@ static const char *tegra20_dt_board_compat[] = { ...@@ -145,7 +145,7 @@ static const char *tegra20_dt_board_compat[] = {
DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)") DT_MACHINE_START(TEGRA_DT, "nVidia Tegra20 (Flattened Device Tree)")
.map_io = tegra_map_common_io, .map_io = tegra_map_common_io,
.smp = smp_ops(tegra_smp_ops), .smp = smp_ops(tegra_smp_ops),
.init_early = tegra20_init_early, .init_early = tegra_init_early,
.init_irq = tegra_dt_init_irq, .init_irq = tegra_dt_init_irq,
.init_time = clocksource_of_init, .init_time = clocksource_of_init,
.init_machine = tegra_dt_init, .init_machine = tegra_dt_init,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* NVIDIA Tegra30 device tree board support * NVIDIA Tegra30 device tree board support
* *
* Copyright (C) 2011 NVIDIA Corporation * Copyright (C) 2011, 2013, NVIDIA Corporation
* *
* Derived from: * Derived from:
* *
...@@ -50,7 +50,7 @@ static const char *tegra30_dt_board_compat[] = { ...@@ -50,7 +50,7 @@ static const char *tegra30_dt_board_compat[] = {
DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (Flattened Device Tree)") DT_MACHINE_START(TEGRA30_DT, "NVIDIA Tegra30 (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 = tegra_init_early,
.init_irq = tegra_dt_init_irq, .init_irq = tegra_dt_init_irq,
.init_time = clocksource_of_init, .init_time = clocksource_of_init,
.init_machine = tegra30_dt_init, .init_machine = tegra30_dt_init,
......
...@@ -26,9 +26,7 @@ ...@@ -26,9 +26,7 @@
void tegra_assert_system_reset(char mode, const char *cmd); void tegra_assert_system_reset(char mode, const char *cmd);
void __init tegra20_init_early(void); void __init tegra_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);
......
...@@ -94,7 +94,7 @@ static void __init tegra_init_cache(void) ...@@ -94,7 +94,7 @@ static void __init tegra_init_cache(void)
} }
static void __init tegra_init_early(void) void __init tegra_init_early(void)
{ {
tegra_cpu_reset_handler_init(); tegra_cpu_reset_handler_init();
tegra_apb_io_init(); tegra_apb_io_init();
...@@ -102,31 +102,9 @@ static void __init tegra_init_early(void) ...@@ -102,31 +102,9 @@ static void __init tegra_init_early(void)
tegra_init_cache(); tegra_init_cache();
tegra_pmc_init(); tegra_pmc_init();
tegra_powergate_init(); tegra_powergate_init();
tegra_hotplug_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_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) void __init tegra_init_late(void)
{ {
tegra_powergate_debugfs_init(); tegra_powergate_debugfs_init();
......
/* /*
*
* Copyright (C) 2002 ARM Ltd. * Copyright (C) 2002 ARM Ltd.
* All Rights Reserved * All Rights Reserved
* Copyright (c) 2010, 2012 NVIDIA Corporation. All rights reserved. * Copyright (c) 2010, 2012-2013, NVIDIA Corporation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as * it under the terms of the GNU General Public License version 2 as
...@@ -15,6 +14,7 @@ ...@@ -15,6 +14,7 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
#include "fuse.h"
#include "sleep.h" #include "sleep.h"
static void (*tegra_hotplug_shutdown)(void); static void (*tegra_hotplug_shutdown)(void);
...@@ -56,18 +56,13 @@ int tegra_cpu_disable(unsigned int cpu) ...@@ -56,18 +56,13 @@ int tegra_cpu_disable(unsigned int cpu)
return cpu == 0 ? -EPERM : 0; return cpu == 0 ? -EPERM : 0;
} }
#ifdef CONFIG_ARCH_TEGRA_2x_SOC void __init tegra_hotplug_init(void)
extern void tegra20_hotplug_shutdown(void);
void __init tegra20_hotplug_init(void)
{ {
tegra_hotplug_shutdown = tegra20_hotplug_shutdown; if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
} return;
#endif
#ifdef CONFIG_ARCH_TEGRA_3x_SOC if (IS_ENABLED(CONFIG_ARCH_TEGRA_2x_SOC) && tegra_chip_id == TEGRA20)
extern void tegra30_hotplug_shutdown(void); tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
void __init tegra30_hotplug_init(void) if (IS_ENABLED(CONFIG_ARCH_TEGRA_3x_SOC) && tegra_chip_id == TEGRA30)
{ tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
} }
#endif
/* /*
* Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved. * Copyright (c) 2010-2013, NVIDIA Corporation. All rights reserved.
* *
* This program is free software; you can redistribute it and/or modify it * This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License, * under the terms and conditions of the GNU General Public License,
...@@ -124,11 +124,11 @@ int tegra_sleep_cpu_finish(unsigned long); ...@@ -124,11 +124,11 @@ int tegra_sleep_cpu_finish(unsigned long);
void tegra_disable_clean_inv_dcache(void); void tegra_disable_clean_inv_dcache(void);
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
void tegra20_hotplug_init(void); void tegra20_hotplug_shutdown(void);
void tegra30_hotplug_init(void); void tegra30_hotplug_shutdown(void);
void tegra_hotplug_init(void);
#else #else
static inline void tegra20_hotplug_init(void) {} static inline void tegra_hotplug_init(void) {}
static inline void tegra30_hotplug_init(void) {}
#endif #endif
void tegra20_cpu_shutdown(int cpu); void tegra20_cpu_shutdown(int cpu);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册