diff options
author | Joseph Lo <josephl@nvidia.com> | 2013-05-20 06:39:24 -0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-05-22 17:19:21 -0400 |
commit | 4b3e2edacf4344cdf7863b6fae64ccb8b02fe9f5 (patch) | |
tree | 27d0a82998abce335dd155cbcc3ac1b6195349df /arch/arm/mach-tegra/sleep.h | |
parent | b39f38c4d27f04fbc3ee8ce9a5fb04673047d5a0 (diff) |
ARM: tegra: add an assembly marco to check Tegra SoC ID
There are some Tegra SoC ID checking code around the low level assembly
code. Adding a marco to replace them. For the single image to support all
the Tegra series, we may also need the marco in other common code. So we
make it become a marco for the usage.
Signed-off-by: Joseph Lo <josephl@nvidia.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/sleep.h')
-rw-r--r-- | arch/arm/mach-tegra/sleep.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/sleep.h b/arch/arm/mach-tegra/sleep.h index 2080fb12ce26..f9f2164a2fc7 100644 --- a/arch/arm/mach-tegra/sleep.h +++ b/arch/arm/mach-tegra/sleep.h | |||
@@ -85,6 +85,15 @@ | |||
85 | dsb | 85 | dsb |
86 | .endm | 86 | .endm |
87 | 87 | ||
88 | /* Macro to check Tegra revision */ | ||
89 | #define APB_MISC_GP_HIDREV 0x804 | ||
90 | .macro tegra_get_soc_id base, tmp1 | ||
91 | mov32 \tmp1, \base | ||
92 | ldr \tmp1, [\tmp1, #APB_MISC_GP_HIDREV] | ||
93 | and \tmp1, \tmp1, #0xff00 | ||
94 | mov \tmp1, \tmp1, lsr #8 | ||
95 | .endm | ||
96 | |||
88 | /* Macro to resume & re-enable L2 cache */ | 97 | /* Macro to resume & re-enable L2 cache */ |
89 | #ifndef L2X0_CTRL_EN | 98 | #ifndef L2X0_CTRL_EN |
90 | #define L2X0_CTRL_EN 1 | 99 | #define L2X0_CTRL_EN 1 |