summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon2019-05-18 07:19:31 -0500
committerAndreas Dannenberg2019-06-10 11:41:59 -0500
commit8c2ade06998768ab4e4295afed92eb591e264171 (patch)
tree00d42298a977ec5997ebe0e2ce19ac741a5f6144
parentabf74952fff0e812315a415decb6da6a941ec9d3 (diff)
downloadk3-image-gen-8c2ade06998768ab4e4295afed92eb591e264171.tar.gz
k3-image-gen-8c2ade06998768ab4e4295afed92eb591e264171.tar.xz
k3-image-gen-8c2ade06998768ab4e4295afed92eb591e264171.zip
common.h: Make board config data structure names generic
Rename board config data structures for better alignment as well as to be SoC independent. While at it drop the exporting of those data structures that was inherited from a previous project which is no longer necessary. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Reviewed-by: Suman Anna <s-anna@ti.com>
-rw-r--r--board-cfg.c4
-rw-r--r--common.h22
-rw-r--r--pm-cfg.c4
-rw-r--r--rm-cfg.c4
-rw-r--r--sec-cfg.c4
5 files changed, 15 insertions, 23 deletions
diff --git a/board-cfg.c b/board-cfg.c
index 877426809..5cec0e4c7 100644
--- a/board-cfg.c
+++ b/board-cfg.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * K3 System Firmware Board Configuration Data 2 * K3 System Firmware Board Configuration Data
3 * 3 *
4 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 4 * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
5 * Andreas Dannenberg <dannenberg@ti.com> 5 * Andreas Dannenberg <dannenberg@ti.com>
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
35 35
36#include "common.h" 36#include "common.h"
37 37
38const struct k3_boardcfg am65_boardcfg_data = { 38const struct boardcfg am65_boardcfg_data = {
39 /* boardcfg_abi_rev */ 39 /* boardcfg_abi_rev */
40 .rev = { 40 .rev = {
41 .boardcfg_abi_maj = 0x0, 41 .boardcfg_abi_maj = 0x0,
diff --git a/common.h b/common.h
index 40203963f..912a52407 100644
--- a/common.h
+++ b/common.h
@@ -126,7 +126,7 @@ struct boardcfg_dbg_cfg {
126 u16 trace_src_enables; 126 u16 trace_src_enables;
127} __attribute__((__packed__)); 127} __attribute__((__packed__));
128 128
129struct k3_boardcfg { 129struct boardcfg {
130 struct boardcfg_abi_rev rev; 130 struct boardcfg_abi_rev rev;
131 struct boardcfg_control control; 131 struct boardcfg_control control;
132 struct boardcfg_secproxy secproxy; 132 struct boardcfg_secproxy secproxy;
@@ -343,19 +343,19 @@ struct boardcfg_rm_resasg {
343 struct boardcfg_rm_resasg_entry resasg_entries[]; 343 struct boardcfg_rm_resasg_entry resasg_entries[];
344} __attribute__((__packed__)); 344} __attribute__((__packed__));
345 345
346struct k3_boardcfg_rm { 346struct boardcfg_rm {
347 struct boardcfg_abi_rev rev; 347 struct boardcfg_abi_rev rev;
348 struct boardcfg_rm_host_cfg host_cfg; 348 struct boardcfg_rm_host_cfg host_cfg;
349 struct boardcfg_rm_resasg resasg; 349 struct boardcfg_rm_resasg resasg;
350} __attribute__((__packed__)); 350} __attribute__((__packed__));
351 351
352/* 352/*
353 * This is essentially 'struct k3_boardcfg_rm', but modified to pull 353 * This is essentially 'struct boardcfg_rm', but modified to pull
354 * .resasg_entries which is a member of 'struct boardcfg_rm_resasg' into 354 * .resasg_entries which is a member of 'struct boardcfg_rm_resasg' into
355 * the outer structure for easier explicit initialization. 355 * the outer structure for easier explicit initialization.
356 */ 356 */
357struct am65_boardcfg_rm_local { 357struct boardcfg_rm_local {
358 struct k3_boardcfg_rm rm_boardcfg; 358 struct boardcfg_rm rm_boardcfg;
359 struct boardcfg_rm_resasg_entry 359 struct boardcfg_rm_resasg_entry
360 resasg_entries[BOARDCFG_RM_RESASG_ENTRIES]; 360 resasg_entries[BOARDCFG_RM_RESASG_ENTRIES];
361} __attribute__((__packed__)); 361} __attribute__((__packed__));
@@ -391,7 +391,7 @@ struct boardcfg_host_hierarchy {
391 host_hierarchy_entries[HOST_HIERARCHY_ENTRIES]; 391 host_hierarchy_entries[HOST_HIERARCHY_ENTRIES];
392} __attribute__((__packed__)); 392} __attribute__((__packed__));
393 393
394struct k3_boardcfg_security { 394struct boardcfg_security {
395 struct boardcfg_abi_rev rev; 395 struct boardcfg_abi_rev rev;
396 struct boardcfg_proc_acl processor_acl_list; 396 struct boardcfg_proc_acl processor_acl_list;
397 struct boardcfg_host_hierarchy host_hierarchy; 397 struct boardcfg_host_hierarchy host_hierarchy;
@@ -400,16 +400,8 @@ struct k3_boardcfg_security {
400/** 400/**
401 * Definitions, types, etc. as used for PM configuration 401 * Definitions, types, etc. as used for PM configuration
402 */ 402 */
403struct k3_boardcfg_pm { 403struct boardcfg_pm {
404 struct boardcfg_abi_rev rev; 404 struct boardcfg_abi_rev rev;
405} __attribute__((__packed__)); 405} __attribute__((__packed__));
406 406
407/**
408 * Export different board configuration structures
409 */
410extern const struct k3_boardcfg am65_boardcfg_data;
411extern const struct am65_boardcfg_rm_local am65_boardcfg_rm_data;
412extern const struct k3_boardcfg_security am65_boardcfg_security_data;
413extern const struct k3_boardcfg_pm am65_boardcfg_pm_data;
414
415#endif /* COMMON_H */ 407#endif /* COMMON_H */
diff --git a/pm-cfg.c b/pm-cfg.c
index ae8983f90..deaf67357 100644
--- a/pm-cfg.c
+++ b/pm-cfg.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * K3 System Firmware Power Management Configuration Data 2 * K3 System Firmware Power Management Configuration Data
3 * 3 *
4 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 4 * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
5 * Andreas Dannenberg <dannenberg@ti.com> 5 * Andreas Dannenberg <dannenberg@ti.com>
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
35 35
36#include "common.h" 36#include "common.h"
37 37
38const struct k3_boardcfg_pm am65_boardcfg_pm_data = { 38const struct boardcfg_pm am65_boardcfg_pm_data = {
39 /* boardcfg_abi_rev */ 39 /* boardcfg_abi_rev */
40 .rev = { 40 .rev = {
41 .boardcfg_abi_maj = 0x0, 41 .boardcfg_abi_maj = 0x0,
diff --git a/rm-cfg.c b/rm-cfg.c
index e63ee34c4..ac72f87fa 100644
--- a/rm-cfg.c
+++ b/rm-cfg.c
@@ -35,7 +35,7 @@
35 35
36#include "common.h" 36#include "common.h"
37 37
38const struct am65_boardcfg_rm_local am65_boardcfg_rm_data = { 38const struct boardcfg_rm_local am65_boardcfg_rm_data = {
39 .rm_boardcfg = { 39 .rm_boardcfg = {
40 /* boardcfg_abi_rev */ 40 /* boardcfg_abi_rev */
41 .rev = { 41 .rev = {
@@ -61,7 +61,7 @@ const struct am65_boardcfg_rm_local am65_boardcfg_rm_data = {
61 .resasg_entries_size = BOARDCFG_RM_RESASG_ENTRIES * 61 .resasg_entries_size = BOARDCFG_RM_RESASG_ENTRIES *
62 sizeof(struct boardcfg_rm_resasg_entry), 62 sizeof(struct boardcfg_rm_resasg_entry),
63 .reserved = 0, 63 .reserved = 0,
64 /* .resasg_entries is set via k3_boardcfg_rm_local */ 64 /* .resasg_entries is set via boardcfg_rm_local */
65 }, 65 },
66 }, 66 },
67 67
diff --git a/sec-cfg.c b/sec-cfg.c
index 8541e8fca..055eb8eda 100644
--- a/sec-cfg.c
+++ b/sec-cfg.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * K3 System Firmware Security Configuration Data 2 * K3 System Firmware Security Configuration Data
3 * 3 *
4 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 4 * Copyright (C) 2018-2019 Texas Instruments Incorporated - http://www.ti.com/
5 * Andreas Dannenberg <dannenberg@ti.com> 5 * Andreas Dannenberg <dannenberg@ti.com>
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
@@ -35,7 +35,7 @@
35 35
36#include "common.h" 36#include "common.h"
37 37
38const struct k3_boardcfg_security am65_boardcfg_security_data = { 38const struct boardcfg_security am65_boardcfg_security_data = {
39 /* boardcfg_abi_rev */ 39 /* boardcfg_abi_rev */
40 .rev = { 40 .rev = {
41 .boardcfg_abi_maj = 0x0, 41 .boardcfg_abi_maj = 0x0,