-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix remoteproc to work with the PRU GNU Binutils port
merge: beagleboard/linux#47 fixes: dinuxbg/pru-gcc-examples#2 Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
- Loading branch information
1 parent
5c0a6aa
commit 4f93274
Showing
3 changed files
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
patches/fixes/0001-Fix-remoteproc-to-work-with-the-PRU-GNU-Binutils-por.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 848d67b7b9810319f60f589e9dc4aa002824c14d Mon Sep 17 00:00:00 2001 | ||
From: Dimitar Dimitrov <dinuxbg@gmail.com> | ||
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 <dinuxbg@gmail.com> | ||
--- | ||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters