aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-bsp/imx-atf/imx-atf/0001-imx-Fix-multiple-definition-of-ipc_handle.patch
blob: 000eff41c58bcb22ce32a65a8b0b61742a99687a (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
From 8c433aa6c6b2eaed4084233beea99ee3fb0b652f Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 4 Dec 2019 02:45:58 -0600
Subject: [PATCH] imx: Fix multiple definition of ipc_handle

This is not conforming C and does not compile with -fno-common.

Upstream-Status: Backport

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: I6535954cc567d6efa06919069b91e3f50975b073
---
 plat/imx/common/include/sci/sci_ipc.h | 2 +-
 plat/imx/common/sci/ipc.c             | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/plat/imx/common/include/sci/sci_ipc.h b/plat/imx/common/include/sci/sci_ipc.h
index 7cb109206..d2c3bba1c 100644
--- a/plat/imx/common/include/sci/sci_ipc.h
+++ b/plat/imx/common/include/sci/sci_ipc.h
@@ -63,7 +63,7 @@ void sc_ipc_read(sc_ipc_t ipc, void *data);
  */
 void sc_ipc_write(sc_ipc_t ipc, const void *data);
 
-sc_ipc_t ipc_handle;
+extern sc_ipc_t ipc_handle;
 
 #endif /* SC_IPC_H */
 
diff --git a/plat/imx/common/sci/ipc.c b/plat/imx/common/sci/ipc.c
index 68b0b8ef0..3169b7e0b 100644
--- a/plat/imx/common/sci/ipc.c
+++ b/plat/imx/common/sci/ipc.c
@@ -11,6 +11,8 @@
 
 #include "imx8_mu.h"
 
+sc_ipc_t ipc_handle;
+
 #include <bakery_lock.h>
 DEFINE_BAKERY_LOCK(sc_ipc_bakery_lock);
 #define sc_ipc_lock_init()	bakery_lock_init(&sc_ipc_bakery_lock)
-- 
2.28.0