aboutsummaryrefslogtreecommitdiffstats
path: root/meta-xilinx-standalone/recipes-bsp/embeddedsw/embeddedsw/0001-zynqmp_pmufw-Fix-reset-ops-for-assert.patch
blob: a0e67dfda192d04e04334229aa1c3763bad85599 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
From 57a5a13ef730c5c46d9db159ed9b7a466cc70388 Mon Sep 17 00:00:00 2001
From: Rajan Vaja <rajan.vaja@xilinx.com>
Date: Wed, 27 Jan 2021 22:19:51 -0800
Subject: [PATCH] zynqmp_pmufw: Fix reset ops for assert()

New compiler toolchain treats "assert" as a macro always. So rename
the existing "assert" variable to "resetAssert" in the codebase.

Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Acked-by: Ravi Patel <ravi.patel@xilinx.com>
Acked-by: Tejas Patel <tejas.patel@xilinx.com>
---
 lib/sw_apps/zynqmp_pmufw/src/pm_reset.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c
index c66aae4a0c..bcd8aa73db 100644
--- a/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c
+++ b/lib/sw_apps/zynqmp_pmufw/src/pm_reset.c
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2014 - 2020 Xilinx, Inc.  All rights reserved.
+* Copyright (c) 2014 - 2021 Xilinx, Inc.  All rights reserved.
 * SPDX-License-Identifier: MIT
  */
 
@@ -34,7 +34,7 @@
  * @pulse	Function performing reset pulse operation
  */
 typedef struct PmResetOps {
-	void (*const assert)(const PmReset* const rst, const u32 action);
+	void (*const resetAssert)(const PmReset* const rst, const u32 action);
 	u32 (*const getStatus)(const PmReset* const s);
 	u32 (*const pulse)(const PmReset* const rst);
 } PmResetOps;
@@ -399,37 +399,37 @@ static u32 PmResetPulsePl(const PmReset* const rst)
 }
 
 static const PmResetOps pmResetOpsGeneric = {
-	.assert = PmResetAssertGen,
+	.resetAssert = PmResetAssertGen,
 	.getStatus = PmResetGetStatusGen,
 	.pulse = PmResetPulseGen,
 };
 
 static const PmResetOps pmResetOpsGpo = {
-	.assert = PmResetAssertGpo,
+	.resetAssert = PmResetAssertGpo,
 	.getStatus = PmResetGetStatusGpo,
 	.pulse = PmResetPulseGpo,
 };
 
 static const PmResetOps pmResetOpsRom = {
-	.assert = PmResetAssertRom,
+	.resetAssert = PmResetAssertRom,
 	.getStatus = PmResetGetStatusRom,
 	.pulse = PmResetPulseRom,
 };
 
 static const PmResetOps pmResetOpsNoAssert = {
-	.assert = NULL,
+	.resetAssert = NULL,
 	.getStatus = PmResetGetStatusRom,
 	.pulse = PmResetPulseRom,
 };
 
 static const PmResetOps pmResetOpsPl = {
-	.assert = PmResetAssertPl,
+	.resetAssert = PmResetAssertPl,
 	.getStatus = PmResetGetStatusPl,
 	.pulse = PmResetPulsePl,
 };
 
 static const PmResetOps pmResetOpsGpioBankIO = {
-	.assert = NULL,
+	.resetAssert = NULL,
 	.getStatus = PmResetGetStatusGpioBankIOs,
 	.pulse = PmResetPulseGpioBankIOs,
 };
@@ -1885,8 +1885,8 @@ s32 PmResetDoAssert(const PmReset *reset, u32 action)
 	switch (action) {
 	case PM_RESET_ACTION_RELEASE:
 	case PM_RESET_ACTION_ASSERT:
-		if (NULL != reset->ops->assert) {
-			reset->ops->assert(reset, action);
+		if (NULL != reset->ops->resetAssert) {
+			reset->ops->resetAssert(reset, action);
 		} else {
 			status = XST_INVALID_PARAM;
 		}
-- 
2.17.1