refactor(sgi): move apis and types to "nrd" prefix
Currently, functions and types internal to "neoverse_rd" platforms are
named with "sgi" as the prefix. Since common code and platforms are no
longer under the "sgi" umbrella, move the prefix to "nrd". This change
would amend the prefixes for functions, types and objects.
Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com>
Change-Id: I706a82bddf55c3be7cf9cef9aaa5df6d420098ca
diff --git a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_common.c b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_common.c
index d920560..85d927d 100644
--- a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_common.c
+++ b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_common.c
@@ -13,25 +13,25 @@
#include <nrd_ras.h>
-static struct plat_sgi_ras_config *sgi_ras_config;
+static struct plat_nrd_ras_config *nrd_ras_config;
/*
* Find event map for a given interrupt number. On success, returns pointer to
* the event map. On error, returns NULL.
*/
-struct sgi_ras_ev_map *sgi_find_ras_event_map_by_intr(uint32_t intr_num)
+struct nrd_ras_ev_map *nrd_find_ras_event_map_by_intr(uint32_t intr_num)
{
- struct sgi_ras_ev_map *map;
+ struct nrd_ras_ev_map *map;
int size;
int i;
- if (sgi_ras_config == NULL) {
+ if (nrd_ras_config == NULL) {
ERROR("RAS config is NULL\n");
return NULL;
}
- map = sgi_ras_config->ev_map;
- size = sgi_ras_config->ev_map_size;
+ map = nrd_ras_config->ev_map;
+ size = nrd_ras_config->ev_map_size;
for (i = 0; i < size; i++) {
if (map->intr == intr_num)
@@ -47,7 +47,7 @@
* Programs GIC registers and configures interrupt ID's as Group0 EL3
* interrupts. Current support is to register PPI and SPI interrupts.
*/
-static void sgi_ras_intr_configure(int intr, int intr_type)
+static void nrd_ras_intr_configure(int intr, int intr_type)
{
plat_ic_set_interrupt_type(intr, INTR_TYPE_EL3);
plat_ic_set_interrupt_priority(intr, PLAT_RAS_PRI);
@@ -67,9 +67,9 @@
* Registers RAS config provided by the platform and then configures and
* enables interrupt for each registered error. On success, return 0.
*/
-int sgi_ras_platform_setup(struct plat_sgi_ras_config *config)
+int nrd_ras_platform_setup(struct plat_nrd_ras_config *config)
{
- struct sgi_ras_ev_map *map;
+ struct nrd_ras_ev_map *map;
int size;
int i;
@@ -83,13 +83,13 @@
* Maintain a reference to the platform RAS config data for later
* use.
*/
- sgi_ras_config = config;
+ nrd_ras_config = config;
- map = sgi_ras_config->ev_map;
- size = sgi_ras_config->ev_map_size;
+ map = nrd_ras_config->ev_map;
+ size = nrd_ras_config->ev_map_size;
for (i = 0; i < size; i++) {
- sgi_ras_intr_configure(map->intr, map->intr_type);
+ nrd_ras_intr_configure(map->intr, map->intr_type);
map++;
}
diff --git a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_cpu.c b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_cpu.c
index 71d1775..d25fa7c 100644
--- a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_cpu.c
+++ b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_cpu.c
@@ -143,11 +143,11 @@
}
/* CPU RAS interrupt handler */
-int sgi_ras_cpu_intr_handler(const struct err_record_info *err_rec,
+int nrd_ras_cpu_intr_handler(const struct err_record_info *err_rec,
int probe_data,
const struct err_handler_data *const data)
{
- struct sgi_ras_ev_map *ras_map;
+ struct nrd_ras_ev_map *ras_map;
mm_communicate_header_t *header;
cpu_err_info cpu_info = {0};
uint64_t clear_status;
@@ -186,7 +186,7 @@
* Find if this is a RAS interrupt. There must be an event against
* this interrupt
*/
- ras_map = sgi_find_ras_event_map_by_intr(intr);
+ ras_map = nrd_find_ras_event_map_by_intr(intr);
if (ras_map == NULL) {
ERROR("SGI: RAS error info for interrupt id: %d not found\n",
intr);
diff --git a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_sram.c b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_sram.c
index 8f4fb4c..95bc3a4 100644
--- a/plat/arm/board/neoverse_rd/common/ras/nrd_ras_sram.c
+++ b/plat/arm/board/neoverse_rd/common/ras/nrd_ras_sram.c
@@ -22,11 +22,11 @@
* Base Element RAM error information data structure communicated as part of MM
* Communication data payload.
*/
-typedef struct sgi_sram_err_info {
+typedef struct nrd_sram_err_info {
uint32_t err_status;
uint32_t err_code;
uint32_t err_addr;
-} sgi_sram_err_info_t;
+} nrd_sram_err_info_t;
/*
* MM Communicate message header GUID to indicate the payload is intended for
@@ -38,13 +38,13 @@
};
/* Base element RAM RAS error interrupt handler */
-int sgi_ras_sram_intr_handler(const struct err_record_info *err_rec,
+int nrd_ras_sram_intr_handler(const struct err_record_info *err_rec,
int probe_data,
const struct err_handler_data *const data)
{
- struct sgi_ras_ev_map *ras_map;
+ struct nrd_ras_ev_map *ras_map;
mm_communicate_header_t *header;
- sgi_sram_err_info_t sram_info;
+ nrd_sram_err_info_t sram_info;
uintptr_t base_addr;
uint32_t clear_status, intr;
int ret;
@@ -87,7 +87,7 @@
* Find if this is a RAS interrupt. There must be an event against
* this interrupt
*/
- ras_map = sgi_find_ras_event_map_by_intr(intr);
+ ras_map = nrd_find_ras_event_map_by_intr(intr);
if (ras_map == NULL) {
ERROR("SGI: RAS error info for interrupt id: %d not found\n",
intr);