soc: ti: pruss: Add pruss_get()/put() API
authorTero Kristo <t-kristo@ti.com>
Fri, 14 Apr 2023 04:55:39 +0000 (10:25 +0530)
committerNishanth Menon <nm@ti.com>
Wed, 17 May 2023 14:15:39 +0000 (09:15 -0500)
commit67d1b0a1030fb20d54b720df6e976c06b893fb00
tree099e482baf2147992009e7356c4d48f1ea5d18f4
parente752f9b924a1fd1afcf36e51b03dfa9c3096a3bd
soc: ti: pruss: Add pruss_get()/put() API

Add two new get and put API, pruss_get() and pruss_put() to the
PRUSS platform driver to allow client drivers to request a handle
to a PRUSS device. This handle will be used by client drivers to
request various operations of the PRUSS platform driver through
additional API that will be added in the following patches.

The pruss_get() function returns the pruss handle corresponding
to a PRUSS device referenced by a PRU remoteproc instance. The
pruss_put() is the complimentary function to pruss_get().

Co-developed-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Co-developed-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Grzegorz Jaszczyk <grzegorz.jaszczyk@linaro.org>
Signed-off-by: Puranjay Mohan <p-mohan@ti.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
Link: https://lore.kernel.org/r/20230414045542.3249939-2-danishanwar@ti.com
Signed-off-by: Nishanth Menon <nm@ti.com>
drivers/soc/ti/pruss.c
include/linux/pruss_driver.h