summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/flowctrl.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-07-11 09:52:41 +0200
committerThierry Reding <treding@nvidia.com>2014-07-17 13:36:41 +0200
commit304664eab93f9e95a8d28fbd9702ede88bb10cc5 (patch)
tree9ce11babe79ed88006a40ad994ef30e2f1a55d14 /arch/arm/mach-tegra/flowctrl.c
parenta0524acc94c91c72c2968a76eddc6f3afe82f9f2 (diff)
ARM: tegra: Use a function to get the chip ID
Instead of using a simple variable access to get at the Tegra chip ID, use a function so that we can run additional code. This can be used to determine where the chip ID is being accessed without being available. That in turn will be handy for resolving boot sequence dependencies in order to convert more code to regular initcalls rather than a sequence fixed by Tegra SoC setup code. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/flowctrl.c')
-rw-r--r--arch/arm/mach-tegra/flowctrl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/flowctrl.c b/arch/arm/mach-tegra/flowctrl.c
index fde581d78398..ec55d1de1b55 100644
--- a/arch/arm/mach-tegra/flowctrl.c
+++ b/arch/arm/mach-tegra/flowctrl.c
@@ -23,9 +23,10 @@
#include <linux/io.h>
#include <linux/kernel.h>
+#include <soc/tegra/fuse.h>
+
#include "flowctrl.h"
#include "iomap.h"
-#include "fuse.h"
static u8 flowctrl_offset_halt_cpu[] = {
FLOW_CTRL_HALT_CPU0_EVENTS,
@@ -76,7 +77,7 @@ void flowctrl_cpu_suspend_enter(unsigned int cpuid)
int i;
reg = flowctrl_read_cpu_csr(cpuid);
- switch (tegra_chip_id) {
+ switch (tegra_get_chip_id()) {
case TEGRA20:
/* clear wfe bitmap */
reg &= ~TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP;
@@ -117,7 +118,7 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)
/* Disable powergating via flow controller for CPU0 */
reg = flowctrl_read_cpu_csr(cpuid);
- switch (tegra_chip_id) {
+ switch (tegra_get_chip_id()) {
case TEGRA20:
/* clear wfe bitmap */
reg &= ~TEGRA20_FLOW_CTRL_CSR_WFE_BITMAP;