mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-18 02:44:37 +00:00
arm: mach-k3: am62: provide more soc feature info accessors
Add two functions, one which returns the SoC speed grade and one which returns the SoC operating temperature range. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
This commit is contained in:
parent
9c68b0427c
commit
00812e2257
1 changed files with 16 additions and 0 deletions
|
@ -86,6 +86,22 @@ static inline int k3_get_core_nr(void)
|
|||
return (full_devid & JTAG_DEV_CORE_NR_MASK) >> JTAG_DEV_CORE_NR_SHIFT;
|
||||
}
|
||||
|
||||
static inline char k3_get_speed_grade(void)
|
||||
{
|
||||
u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
|
||||
u32 speed_grade = (full_devid & JTAG_DEV_SPEED_MASK) >>
|
||||
JTAG_DEV_SPEED_SHIFT;
|
||||
|
||||
return 'A' - 1 + speed_grade;
|
||||
}
|
||||
|
||||
static inline int k3_get_temp_grade(void)
|
||||
{
|
||||
u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
|
||||
|
||||
return (full_devid & JTAG_DEV_TEMP_MASK) >> JTAG_DEV_TEMP_SHIFT;
|
||||
}
|
||||
|
||||
static inline int k3_has_pru(void)
|
||||
{
|
||||
u32 full_devid = readl(CTRLMMR_WKUP_JTAG_DEVICE_ID);
|
||||
|
|
Loading…
Add table
Reference in a new issue