-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'tegra-for-3.7-cpu-hotplug' of git://git.kernel.org/pub/scm…
…/linux/kernel/git/swarren/linux-tegra into next/soc From Stephen Warren: ARM: tegra: implement CPU hotplug This branch implements CPU hot-plugging support for both Tegra20 and Tegra30. Portions of the implementation are contained in the clock driver, hence this branch is based on the common clock conversion in order to avoid duplicating work. By Joseph Lo via Stephen Warren * tag 'tegra-for-3.7-cpu-hotplug' of git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-tegra: ARM: tegra20: add CPU hotplug support ARM: tegra30: add CPU hotplug support ARM: tegra: clean up the common assembly macros into sleep.h ARM: tegra: replace the CPU CAR access code by tegra_cpu_car_ops ARM: tegra: introduce tegra_cpu_car_ops structures
- Loading branch information
Showing
15 changed files
with
556 additions
and
147 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright (c) 2010-2012, NVIDIA Corporation. All rights reserved. | ||
* Copyright (c) 2011, Google, Inc. | ||
* | ||
* Author: Colin Cross <ccross@android.com> | ||
* Gary King <gking@nvidia.com> | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms and conditions of the GNU General Public License, | ||
* version 2, as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include <linux/linkage.h> | ||
|
||
#include <asm/assembler.h> | ||
|
||
#include <mach/iomap.h> | ||
|
||
#include "sleep.h" | ||
#include "flowctrl.h" | ||
|
||
#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_PM_SLEEP) | ||
/* | ||
* tegra20_hotplug_shutdown(void) | ||
* | ||
* puts the current cpu in reset | ||
* should never return | ||
*/ | ||
ENTRY(tegra20_hotplug_shutdown) | ||
/* Turn off SMP coherency */ | ||
exit_smp r4, r5 | ||
|
||
/* Put this CPU down */ | ||
cpu_id r0 | ||
bl tegra20_cpu_shutdown | ||
mov pc, lr @ should never get here | ||
ENDPROC(tegra20_hotplug_shutdown) | ||
|
||
/* | ||
* tegra20_cpu_shutdown(int cpu) | ||
* | ||
* r0 is cpu to reset | ||
* | ||
* puts the specified CPU in wait-for-event mode on the flow controller | ||
* and puts the CPU in reset | ||
* can be called on the current cpu or another cpu | ||
* if called on the current cpu, does not return | ||
* MUST NOT BE CALLED FOR CPU 0. | ||
* | ||
* corrupts r0-r3, r12 | ||
*/ | ||
ENTRY(tegra20_cpu_shutdown) | ||
cmp r0, #0 | ||
moveq pc, lr @ must not be called for CPU 0 | ||
|
||
cpu_to_halt_reg r1, r0 | ||
ldr r3, =TEGRA_FLOW_CTRL_VIRT | ||
mov r2, #FLOW_CTRL_WAITEVENT | FLOW_CTRL_JTAG_RESUME | ||
str r2, [r3, r1] @ put flow controller in wait event mode | ||
ldr r2, [r3, r1] | ||
isb | ||
dsb | ||
movw r1, 0x1011 | ||
mov r1, r1, lsl r0 | ||
ldr r3, =TEGRA_CLK_RESET_VIRT | ||
str r1, [r3, #0x340] @ put slave CPU in reset | ||
isb | ||
dsb | ||
cpu_id r3 | ||
cmp r3, r0 | ||
beq . | ||
mov pc, lr | ||
ENDPROC(tegra20_cpu_shutdown) | ||
#endif |
Oops, something went wrong.