ARM: tegra: remove tegra specific cpu_disable()
[GitHub/LineageOS/android_kernel_samsung_universal7580.git] / arch / arm / mach-tegra / hotplug.c
CommitLineData
1cea7326 1/*
1cea7326
CC
2 *
3 * Copyright (C) 2002 ARM Ltd.
4 * All Rights Reserved
59b0f682 5 * Copyright (c) 2010, 2012 NVIDIA Corporation. All rights reserved.
1cea7326
CC
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/kernel.h>
1cea7326 12#include <linux/smp.h>
89572c77 13#include <linux/clk/tegra.h>
1cea7326
CC
14
15#include <asm/cacheflush.h>
59b0f682 16#include <asm/smp_plat.h>
1cea7326 17
59b0f682 18#include "sleep.h"
1cea7326 19
59b0f682 20static void (*tegra_hotplug_shutdown)(void);
1cea7326 21
b8119431
JL
22int tegra_cpu_kill(unsigned cpu)
23{
24 cpu = cpu_logical_map(cpu);
25
26 /* Clock gate the CPU */
27 tegra_wait_cpu_in_reset(cpu);
28 tegra_disable_cpu_clock(cpu);
29
30 return 1;
31}
32
1cea7326
CC
33/*
34 * platform-specific code to shutdown a CPU
35 *
36 * Called with IRQs disabled
37 */
a1725732 38void __ref tegra_cpu_die(unsigned int cpu)
1cea7326 39{
57886616
JL
40 /* Clean L1 data cache */
41 tegra_disable_clean_inv_dcache();
1cea7326 42
59b0f682
JL
43 /* Shut down the current CPU. */
44 tegra_hotplug_shutdown();
45
59b0f682
JL
46 /* Should never return here. */
47 BUG();
1cea7326
CC
48}
49
453689e4
JL
50#ifdef CONFIG_ARCH_TEGRA_2x_SOC
51extern void tegra20_hotplug_shutdown(void);
52void __init tegra20_hotplug_init(void)
53{
54 tegra_hotplug_shutdown = tegra20_hotplug_shutdown;
55}
56#endif
57
59b0f682
JL
58#ifdef CONFIG_ARCH_TEGRA_3x_SOC
59extern void tegra30_hotplug_shutdown(void);
60void __init tegra30_hotplug_init(void)
61{
62 tegra_hotplug_shutdown = tegra30_hotplug_shutdown;
63}
64#endif