ARM: 6331/1: ux500 cpu/SoC version macros v2
This patch adds support for checking if the digital baseband (DB) System-on-Chip (aka "cpu) ASIC hardware version is 1.0, 1.1 or 2.0. We print the result in the bootlog, the functions are then used for runtime decisions based on hardware version. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:

committed by
Russell King

parent
2bfc96a127
commit
f946738ca8
@@ -104,16 +104,35 @@ static inline bool cpu_is_u8500(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#define CPUID_DB8500ED 0x410fc090
|
||||
#define CPUID_DB8500V1 0x411fc091
|
||||
#define CPUID_DB8500V2 0x412fc091
|
||||
|
||||
static inline bool cpu_is_u8500ed(void)
|
||||
{
|
||||
return cpu_is_u8500() && (read_cpuid_id() & 15) == 0;
|
||||
return cpu_is_u8500() && (read_cpuid_id() == CPUID_DB8500ED);
|
||||
}
|
||||
|
||||
static inline bool cpu_is_u8500v1(void)
|
||||
{
|
||||
return cpu_is_u8500() && (read_cpuid_id() & 15) == 1;
|
||||
return cpu_is_u8500() && (read_cpuid_id() == CPUID_DB8500V1);
|
||||
}
|
||||
|
||||
static inline bool cpu_is_u8500v2(void)
|
||||
{
|
||||
return cpu_is_u8500() && (read_cpuid_id() == CPUID_DB8500V2);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_UX500_SOC_DB8500
|
||||
bool cpu_is_u8500v10(void);
|
||||
bool cpu_is_u8500v11(void);
|
||||
bool cpu_is_u8500v20(void);
|
||||
#else
|
||||
static inline bool cpu_is_u8500v10(void) { return false; }
|
||||
static inline bool cpu_is_u8500v11(void) { return false; }
|
||||
static inline bool cpu_is_u8500v20(void) { return false; }
|
||||
#endif
|
||||
|
||||
static inline bool cpu_is_u5500(void)
|
||||
{
|
||||
#ifdef CONFIG_UX500_SOC_DB5500
|
||||
|
Reference in New Issue
Block a user