From 4f9327432f456e290e427ee4ac7241479f2ecb12 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Fri, 16 Oct 2015 15:56:33 -0500 Subject: [PATCH] Fix remoteproc to work with the PRU GNU Binutils port merge: https://github.com/beagleboard/linux/pull/47 fixes: https://github.com/dinuxbg/pru-gcc-examples/issues/2 Signed-off-by: Robert Nelson --- patch.sh | 2 ++ ...o-work-with-the-PRU-GNU-Binutils-por.patch | 36 +++++++++++++++++++ version.sh | 2 +- 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch diff --git a/patch.sh b/patch.sh index ba4975219..be5fdf994 100644 --- a/patch.sh +++ b/patch.sh @@ -210,6 +210,8 @@ fixes () { start_cleanup fi + ${git} "${DIR}/patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch" + if [ "x${regenerate}" = "xenable" ] ; then number=1 cleanup diff --git a/patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch b/patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch new file mode 100644 index 000000000..6471978f2 --- /dev/null +++ b/patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch @@ -0,0 +1,36 @@ +From 848d67b7b9810319f60f589e9dc4aa002824c14d Mon Sep 17 00:00:00 2001 +From: Dimitar Dimitrov +Date: Sun, 11 Oct 2015 10:22:42 +0300 +Subject: [PATCH] Fix remoteproc to work with the PRU GNU Binutils port + +PRU IRAM addresses need to be masked before being handled to +remoteproc. This is due to PRU Binutils' lack of separate address +spaces for IRAM and DRAM. + +Signed-off-by: Dimitar Dimitrov +--- + drivers/remoteproc/pruss_remoteproc.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/drivers/remoteproc/pruss_remoteproc.c b/drivers/remoteproc/pruss_remoteproc.c +index c465dea..3752378 100644 +--- a/drivers/remoteproc/pruss_remoteproc.c ++++ b/drivers/remoteproc/pruss_remoteproc.c +@@ -313,6 +313,14 @@ static void *pru_i_da_to_va(struct pru_rproc *pru, u32 da, int len) + { + u32 offset; + ++ /* GNU binutils do not support multiple address spaces. The ++ * default linker script from the unofficial GNU pru-ld places ++ * IRAM at an arbitrary high offset, in order to differentiate it ++ * from DRAM. Hence we need to strip the artificial offset ++ * from the IRAM address. ++ */ ++ da &= ~0xf0000000u; ++ + if (len > 0 && da >= pru->iram_da && + da + len <= pru->iram_da + pru->mem_size[PRU_MEM_IRAM]) { + offset = da - pru->iram_da; +-- +2.6.1 + diff --git a/version.sh b/version.sh index dfe2a3ea3..b6331d4b8 100644 --- a/version.sh +++ b/version.sh @@ -19,7 +19,7 @@ toolchain="gcc_linaro_gnueabihf_4_9" #Kernel/Build KERNEL_REL=4.1 KERNEL_TAG=${KERNEL_REL}.10 -BUILD=${build_prefix}-r23 +BUILD=${build_prefix}-r23.1 kernel_rt=".7-rt8" #v4.X-rcX + upto SHA