Skip to contentSkip to conversation

firmware: ti_sci_static_data: Make file board agnostic

PATCH In review Vignesh Raghavendra 3 participants 3 messages Jun 15, 2022 – Jul 7, 2022 Texas instruments' system control interface (TISCI) protocol driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firmware: ti_sci_static_data: Make file board agnostic

Static DMA channel data for R5 SPL is mostly board agnostic so use SOC configs instead of EVM specific config to ease adding new board support.

Drop J7200 EVM specific settings as its same as J721e

---
 drivers/firmware/ti_sci_static_data.h | 42 +++------------------------
 1 file changed, 4 insertions(+), 38 deletions(-)
drivers/firmware/ti_sci_static_data.h +4 -38
index 8529ef2900..5ae0556a9a 100644
@@ -16,7 +16,7 @@ struct ti_sci_resource_static_data {
 
 #if IS_ENABLED(CONFIG_K3_DM_FW)
 
-#if IS_ENABLED(CONFIG_TARGET_J721E_R5_EVM)
+#if IS_ENABLED(CONFIG_SOC_K3_J721E)
 static struct ti_sci_resource_static_data rm_static_data[] = {
 	/* Free rings */
 	{
@@ -48,43 +48,9 @@ static struct ti_sci_resource_static_data rm_static_data[] = {
 	},
 	{ },
 };
-#endif /* CONFIG_TARGET_J721E_R5_EVM */
+#endif /* CONFIG_SOC_K3_J721E */
 
-#if IS_ENABLED(CONFIG_TARGET_J7200_R5_EVM)
-static struct ti_sci_resource_static_data rm_static_data[] = {
-	/* Free rings */
-	{
-		.dev_id = 235,
-		.subtype = 1,
-		.range_start = 124,
-		.range_num = 32,
-	},
-	/* TX channels */
-	{
-		.dev_id = 236,
-		.subtype = 13,
-		.range_start = 6,
-		.range_num = 2,
-	},
-	/* RX channels */
-	{
-		.dev_id = 236,
-		.subtype = 10,
-		.range_start = 6,
-		.range_num = 2,
-	},
-	/* RX Free flows */
-	{
-		.dev_id = 236,
-		.subtype = 0,
-		.range_start = 60,
-		.range_num = 8,
-	},
-	{ },
-};
-#endif /* CONFIG_TARGET_J7200_R5_EVM */
-
-#if IS_ENABLED(CONFIG_TARGET_J721S2_R5_EVM)
+#if IS_ENABLED(CONFIG_SOC_K3_J721S2)
 static struct ti_sci_resource_static_data rm_static_data[] = {
 	/* Free rings */
 	{
@@ -116,7 +82,7 @@ static struct ti_sci_resource_static_data rm_static_data[] = {
 	},
 	{ },
 };
-#endif /* CONFIG_TARGET_J721S2_R5_EVM */
+#endif /* CONFIG_SOC_K3_J721S2 */
 
 #if IS_ENABLED(CONFIG_SOC_K3_AM625)
 static struct ti_sci_resource_static_data rm_static_data[] = {
Signature · 1 line
2.36.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Vignesh Raghavendra

Static DMA channel data for R5 SPL is mostly board agnostic so use SOC configs instead of EVM specific config to ease adding new board support.

Drop J7200 EVM specific settings as its same as J721e

Gee thanks.

Quoted 75 lines
---
 drivers/firmware/ti_sci_static_data.h | 42 +++------------------------
 1 file changed, 4 insertions(+), 38 deletions(-)
drivers/firmware/ti_sci_static_data.h +4 -38
index 8529ef2900..5ae0556a9a 100644
@@ -16,7 +16,7 @@ struct ti_sci_resource_static_data {
 
 #if IS_ENABLED(CONFIG_K3_DM_FW)
 
-#if IS_ENABLED(CONFIG_TARGET_J721E_R5_EVM)
+#if IS_ENABLED(CONFIG_SOC_K3_J721E)
 static struct ti_sci_resource_static_data rm_static_data[] = {
 	/* Free rings */
 	{
@@ -48,43 +48,9 @@ static struct ti_sci_resource_static_data rm_static_data[] = {
 	},
 	{ },
 };
-#endif /* CONFIG_TARGET_J721E_R5_EVM */
+#endif /* CONFIG_SOC_K3_J721E */
 
-#if IS_ENABLED(CONFIG_TARGET_J7200_R5_EVM)
-static struct ti_sci_resource_static_data rm_static_data[] = {
-	/* Free rings */
-	{
-		.dev_id = 235,
-		.subtype = 1,
-		.range_start = 124,
-		.range_num = 32,
-	},
-	/* TX channels */
-	{
-		.dev_id = 236,
-		.subtype = 13,
-		.range_start = 6,
-		.range_num = 2,
-	},
-	/* RX channels */
-	{
-		.dev_id = 236,
-		.subtype = 10,
-		.range_start = 6,
-		.range_num = 2,
-	},
-	/* RX Free flows */
-	{
-		.dev_id = 236,
-		.subtype = 0,
-		.range_start = 60,
-		.range_num = 8,
-	},
-	{ },
-};
-#endif /* CONFIG_TARGET_J7200_R5_EVM */
-
-#if IS_ENABLED(CONFIG_TARGET_J721S2_R5_EVM)
+#if IS_ENABLED(CONFIG_SOC_K3_J721S2)
 static struct ti_sci_resource_static_data rm_static_data[] = {
 	/* Free rings */
 	{
@@ -116,7 +82,7 @@ static struct ti_sci_resource_static_data rm_static_data[] = {
 	},
 	{ },
 };
-#endif /* CONFIG_TARGET_J721S2_R5_EVM */
+#endif /* CONFIG_SOC_K3_J721S2 */
 
 #if IS_ENABLED(CONFIG_SOC_K3_AM625)
 static struct ti_sci_resource_static_data rm_static_data[] = {
Signature · 1 line
2.36.1
Signature · 3 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D