mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 01:24:27 +00:00

NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__. All common C compilers predefine a macro called __ASSEMBLER__ when preprocessing a .S file. There is no reason for TF-A to define it's own __ASSEMBLY__ macro for this purpose instead. To unify code with the export headers (which use __ASSEMBLER__ to avoid one extra dependency), let's deprecate __ASSEMBLY__ and switch the code base over to the predefined standard. Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417 Signed-off-by: Julius Werner <jwerner@chromium.org>
62 lines
1.7 KiB
C
62 lines
1.7 KiB
C
/*
|
|
* Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef TEGRA_PLATFORM_H
|
|
#define TEGRA_PLATFORM_H
|
|
|
|
#include <cdefs.h>
|
|
#include <lib/utils_def.h>
|
|
#include <stdbool.h>
|
|
|
|
/*******************************************************************************
|
|
* Tegra major, minor version helper macros
|
|
******************************************************************************/
|
|
#define MAJOR_VERSION_SHIFT U(0x4)
|
|
#define MAJOR_VERSION_MASK U(0xF)
|
|
#define MINOR_VERSION_SHIFT U(0x10)
|
|
#define MINOR_VERSION_MASK U(0xF)
|
|
#define CHIP_ID_SHIFT U(8)
|
|
#define CHIP_ID_MASK U(0xFF)
|
|
#define PRE_SI_PLATFORM_SHIFT U(0x14)
|
|
#define PRE_SI_PLATFORM_MASK U(0xF)
|
|
|
|
/*******************************************************************************
|
|
* Tegra chip ID values
|
|
******************************************************************************/
|
|
#define TEGRA_CHIPID_TEGRA13 U(0x13)
|
|
#define TEGRA_CHIPID_TEGRA21 U(0x21)
|
|
#define TEGRA_CHIPID_TEGRA18 U(0x18)
|
|
|
|
#ifndef __ASSEMBLER__
|
|
|
|
/*
|
|
* Tegra chip ID major/minor identifiers
|
|
*/
|
|
uint32_t tegra_get_chipid_major(void);
|
|
uint32_t tegra_get_chipid_minor(void);
|
|
|
|
/*
|
|
* Tegra chip ID identifiers
|
|
*/
|
|
bool tegra_chipid_is_t132(void);
|
|
bool tegra_chipid_is_t186(void);
|
|
bool tegra_chipid_is_t210(void);
|
|
bool tegra_chipid_is_t210_b01(void);
|
|
|
|
/*
|
|
* Tegra platform identifiers
|
|
*/
|
|
bool tegra_platform_is_silicon(void);
|
|
bool tegra_platform_is_qt(void);
|
|
bool tegra_platform_is_emulation(void);
|
|
bool tegra_platform_is_linsim(void);
|
|
bool tegra_platform_is_fpga(void);
|
|
bool tegra_platform_is_unit_fpga(void);
|
|
bool tegra_platform_is_virt_dev_kit(void);
|
|
|
|
#endif /* __ASSEMBLER__ */
|
|
|
|
#endif /* TEGRA_PLATFORM_H */
|