summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2015-09-23 21:35:39 +0800
committerZhenhua Luo <zhenhua.luo@freescale.com>2015-09-24 10:13:23 +0800
commit59fc0c33d2de5db65af4c09c4d28fd78fa0f7b4f (patch)
tree6242145f4740d66a5f986069d6a5575aa7498770 /recipes-extended
parentafd057b4492beab1f6884b007a0a877e3a673fe9 (diff)
downloadmeta-fsl-ppc-59fc0c33d2de5db65af4c09c4d28fd78fa0f7b4f.tar.gz
skmm-ep: fix the inline function definition with gcc 5.x
There are different semantics for inline functions for gcc-5.x compared to previous gcc. Fix the following build error. | skmm.c:(.text.startup+0xfc): undefined reference to `va_to_pa' | skmm.c:(.text.startup+0x10c): undefined reference to `va_to_pa' Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/skmm-ep/skmm-ep/skmm-ep-fix-the-inline-function-definition-with-gcc-.patch67
-rw-r--r--recipes-extended/skmm-ep/skmm-ep_git.bb1
2 files changed, 68 insertions, 0 deletions
diff --git a/recipes-extended/skmm-ep/skmm-ep/skmm-ep-fix-the-inline-function-definition-with-gcc-.patch b/recipes-extended/skmm-ep/skmm-ep/skmm-ep-fix-the-inline-function-definition-with-gcc-.patch
new file mode 100644
index 0000000..7acac8c
--- /dev/null
+++ b/recipes-extended/skmm-ep/skmm-ep/skmm-ep-fix-the-inline-function-definition-with-gcc-.patch
@@ -0,0 +1,67 @@
1From 3293321112174ff3247c0ba5c8b9ba9349e0e623 Mon Sep 17 00:00:00 2001
2From: Zhenhua Luo <zhenhua.luo@freescale.com>
3Date: Mon, 21 Sep 2015 20:38:52 +0800
4Subject: [PATCH] skmm-ep: fix the inline function definition with gcc 5.x
5
6There are different semantics for inline functions for gcc-5.x compared to
7previous gcc. Fix the following build error.
8| skmm.c:(.text.startup+0xfc): undefined reference to `va_to_pa'
9| skmm.c:(.text.startup+0x10c): undefined reference to `va_to_pa'
10
11Upstream-Status: Pending
12
13Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
14---
15 apps/skmm/include/skmm_sram.h | 13 +++++++++++--
16 apps/skmm/lib/skmm_ddr.c | 10 ----------
17 2 files changed, 11 insertions(+), 12 deletions(-)
18
19diff --git a/apps/skmm/include/skmm_sram.h b/apps/skmm/include/skmm_sram.h
20index 4c96874..6208761 100644
21--- a/apps/skmm/include/skmm_sram.h
22+++ b/apps/skmm/include/skmm_sram.h
23@@ -33,9 +33,18 @@
24 #define __SKMM_SRAM_H__
25
26 #include "common.h"
27+#include <usdpaa/dma_mem.h>
28+
29+static inline va_addr_t pa_to_va(phys_addr_t addr)
30+{
31+ return (va_addr_t)__dma_mem_ptov(addr);
32+}
33+
34+static inline phys_addr_t va_to_pa(va_addr_t addr)
35+{
36+ return (phys_addr_t)__dma_mem_vtop((void *)addr);
37+}
38
39-inline phys_addr_t va_to_pa(va_addr_t addr);
40-inline va_addr_t pa_to_va(phys_addr_t addr);
41 va_addr_t *fsl_mem_init(phys_addr_t l2_sram_addr);
42
43 #endif /* __SKMM_SRAM_H__ */
44diff --git a/apps/skmm/lib/skmm_ddr.c b/apps/skmm/lib/skmm_ddr.c
45index d5a66ce..f1cef89 100644
46--- a/apps/skmm/lib/skmm_ddr.c
47+++ b/apps/skmm/lib/skmm_ddr.c
48@@ -35,16 +35,6 @@
49 #define SKMM_TOTAL_DMA_SIZE (64 * 1024 * 1024)
50 #define SKMM_DMA_MAP_SIZE (1*1024*1024)
51
52-inline va_addr_t pa_to_va(phys_addr_t addr)
53-{
54- return (va_addr_t)__dma_mem_ptov(addr);
55-}
56-
57-inline phys_addr_t va_to_pa(va_addr_t addr)
58-{
59- return (phys_addr_t)__dma_mem_vtop((void *)addr);
60-}
61-
62 va_addr_t *fsl_mem_init(phys_addr_t l2_sram_addr)
63 {
64 /* - map DMA mem */
65--
661.9.2
67
diff --git a/recipes-extended/skmm-ep/skmm-ep_git.bb b/recipes-extended/skmm-ep/skmm-ep_git.bb
index ca5d673..9446a74 100644
--- a/recipes-extended/skmm-ep/skmm-ep_git.bb
+++ b/recipes-extended/skmm-ep/skmm-ep_git.bb
@@ -9,6 +9,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
9 9
10SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1 \ 10SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1 \
11 file://add-two-missing-header-files.patch \ 11 file://add-two-missing-header-files.patch \
12 file://skmm-ep-fix-the-inline-function-definition-with-gcc-.patch \
12" 13"
13SRCREV = "27156a6621c8f6d7f98210b1ca5cd97bde926875" 14SRCREV = "27156a6621c8f6d7f98210b1ca5cd97bde926875"
14 15