Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1705 from chandnich/platform-id
plat/arm/sgi: Use platform specific functions to get platform ids
- Loading branch information
Showing
7 changed files
with
53 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include <platform.h> | ||
|
||
unsigned int plat_arm_sgi_get_platform_id(void) | ||
{ | ||
return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK; | ||
} | ||
|
||
unsigned int plat_arm_sgi_get_config_id(void) | ||
{ | ||
return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT) | ||
& SSC_VERSION_CONFIG_MASK; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* | ||
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. | ||
* | ||
* SPDX-License-Identifier: BSD-3-Clause | ||
*/ | ||
|
||
#include <platform.h> | ||
|
||
unsigned int plat_arm_sgi_get_platform_id(void) | ||
{ | ||
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_ID_OFFSET) | ||
& SID_SYSTEM_ID_PART_NUM_MASK; | ||
} | ||
|
||
unsigned int plat_arm_sgi_get_config_id(void) | ||
{ | ||
return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters