diff options
author | Joseph Lo <josephl@nvidia.com> | 2013-05-20 14:39:24 +0400 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2013-05-23 01:19:21 +0400 |
commit | 4b3e2edacf4344cdf7863b6fae64ccb8b02fe9f5 (patch) | |
tree | 27d0a82998abce335dd155cbcc3ac1b6195349df /arch/arm/mach-tegra/sleep.h | |
parent | b39f38c4d27f04fbc3ee8ce9a5fb04673047d5a0 (diff) | |
download | linux-4b3e2edacf4344cdf7863b6fae64ccb8b02fe9f5.tar.xz |
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 @@ dsb .endm +/* Macro to check Tegra revision */ +#define APB_MISC_GP_HIDREV 0x804 +.macro tegra_get_soc_id base, tmp1 + mov32 \tmp1, \base + ldr \tmp1, [\tmp1, #APB_MISC_GP_HIDREV] + and \tmp1, \tmp1, #0xff00 + mov \tmp1, \tmp1, lsr #8 +.endm + /* Macro to resume & re-enable L2 cache */ #ifndef L2X0_CTRL_EN #define L2X0_CTRL_EN 1 |