]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
remoteproc/pru: Add pru_rproc_set_ctable() function
authorRoger Quadros <rogerq@ti.com>
Tue, 19 Feb 2019 01:05:32 +0000 (19:05 -0600)
committerSuman Anna <s-anna@ti.com>
Sun, 24 Feb 2019 01:20:51 +0000 (19:20 -0600)
commit524b115473f165b41172e8a6983c765124698d77
treebdf08f4b0a34851f77e4dada245d6df96a3cbf21
parentf21ae007405457dc0b6fec6c4506561c96c30410
remoteproc/pru: Add pru_rproc_set_ctable() function

Some firmwares expect the OS drivers to configure the CTABLE
entries publishing dynamically allocated memory regions. For
example, the PRU Ethernet firmwares use the C28 and C30 entries
for retrieving the Shared RAM and System SRAM (OCMC) areas
allocated by the PRU Ethernet client driver.

Provide a way for users to do that through a new API,
pru_rproc_set_ctable(). The API returns 0 on success and
a negative value on error.

NOTE:
The programmable CTABLE entries are typically re-programmed by
the PRU firmwares when dealing with a certain block of memory
during block processing. This API provides an interface to the
PRU client drivers to publish a dynamically allocated memory
block with the PRU firmware using a CTABLE entry instead of a
negotiated address in shared memory. Additional synchronization
may be needed between the PRU client drivers and firmwares if
different addresses needs to be published at run-time reusing
the same CTABLE entry.

Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Andrew F. Davis <afd@ti.com>
[s-anna@ti.com: add the NOTE: on patch description, minor cleanups]
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/remoteproc/pru_rproc.c
include/linux/pruss.h