xref: /aosp_15_r20/external/coreboot/src/soc/nvidia/tegra210/include/soc/id.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__
4 #define __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__
5 
6 #include <device/mmio.h>
7 #include <soc/addressmap.h>
8 
context_avp(void)9 static inline int context_avp(void)
10 {
11 	const uint32_t avp_id = 0xaaaaaaaa;
12 	void *const uptag = (void *)(uintptr_t)TEGRA_PG_UP_BASE;
13 
14 	return read32(uptag) == avp_id;
15 }
16 
17 #endif /* __SOC_NVIDIA_TEGRA210_INCLUDE_SOC_ID_H__ */
18