[meta-freescale] [meta-fsl-ppc][PATCH 3/3] skmm-ep: fix the build error caused by duplicated definition

Zhenhua Luo zhenhua.luo at nxp.com
Tue May 31 03:23:13 PDT 2016


Remove the duplicated definition to fix the following build errors:
| apps/skmm/lib/skmm_sram.c:42:18: error: redefinition of 'pa_to_va'
| apps/skmm/lib/skmm_sram.c:51:20: error: redefinition of 'va_to_pa'

Signed-off-by: Zhenhua Luo <zhenhua.luo at nxp.com>
---
 ...p-remove-duplicated-pa_to_va-and-va_to_pa.patch | 40 ++++++++++++++++++++++
 recipes-extended/skmm-ep/skmm-ep_git.bb            |  1 +
 2 files changed, 41 insertions(+)
 create mode 100644 recipes-extended/skmm-ep/skmm-ep/skmm-ep-remove-duplicated-pa_to_va-and-va_to_pa.patch

diff --git a/recipes-extended/skmm-ep/skmm-ep/skmm-ep-remove-duplicated-pa_to_va-and-va_to_pa.patch b/recipes-extended/skmm-ep/skmm-ep/skmm-ep-remove-duplicated-pa_to_va-and-va_to_pa.patch
new file mode 100644
index 0000000..afa7e89
--- /dev/null
+++ b/recipes-extended/skmm-ep/skmm-ep/skmm-ep-remove-duplicated-pa_to_va-and-va_to_pa.patch
@@ -0,0 +1,40 @@
+skmm-ep: remove duplicated definition
+
+Remove the duplicated definition to fix the following build errors:
+| apps/skmm/lib/skmm_sram.c:42:18: error: redefinition of 'pa_to_va'
+| apps/skmm/lib/skmm_sram.c:51:20: error: redefinition of 'va_to_pa'
+
+Upstream-Status: Pending
+
+Signed-off-by: Zhenhua Luo <zhenhua.luo at nxp.com>
+
+diff --git a/apps/skmm/lib/skmm_sram.c b/apps/skmm/lib/skmm_sram.c
+index 2d84d93..6ab0421 100644
+--- a/apps/skmm/lib/skmm_sram.c
++++ b/apps/skmm/lib/skmm_sram.c
+@@ -39,24 +39,6 @@
+ static phys_addr_t sram_phys_addr;
+ static va_addr_t sram_virt_addr;
+ 
+-inline va_addr_t pa_to_va(phys_addr_t addr)
+-{
+-	va_addr_t offset;
+-
+-	offset = (va_addr_t)(addr - sram_phys_addr);
+-
+-	return sram_virt_addr + offset;
+-}
+-
+-inline phys_addr_t va_to_pa(va_addr_t addr)
+-{
+-	phys_addr_t offset;
+-
+-	offset = (phys_addr_t)(addr - sram_virt_addr);
+-
+-	return sram_phys_addr + offset;
+-}
+-
+ static int setup_law_for_plt_sram(phys_addr_t l2sram, u32 *size)
+ {
+ 	int fd;
+-- 
diff --git a/recipes-extended/skmm-ep/skmm-ep_git.bb b/recipes-extended/skmm-ep/skmm-ep_git.bb
index 24e64c8..7fd2fc7 100644
--- a/recipes-extended/skmm-ep/skmm-ep_git.bb
+++ b/recipes-extended/skmm-ep/skmm-ep_git.bb
@@ -10,6 +10,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 SRC_URI = "git://git.freescale.com/ppc/sdk/skmm-ep.git;nobranch=1 \
     file://add-two-missing-header-files.patch \
     file://skmm-ep-fix-the-inline-function-definition-with-gcc-.patch \
+    file://skmm-ep-remove-duplicated-pa_to_va-and-va_to_pa.patch \
 "
 SRCREV = "27156a6621c8f6d7f98210b1ca5cd97bde926875"
 
-- 
2.4.11



More information about the meta-freescale mailing list