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>
This commit is contained in:

committed by
Stephen Warren

parent
b39f38c4d2
commit
4b3e2edacf
@@ -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
|
||||
|
Reference in New Issue
Block a user