Skip to content

Commit dd74749

Browse files
quic-lxu5gregkh
authored andcommitted
misc: fastrpc: Add support for cdsp1 remoteproc
The fastrpc supports 4 remoteproc. There are some products which support cdsp1 remoteproc. Add changes to support cdsp1 remoteproc. Signed-off-by: Ling Xu <[email protected]> [Bartosz: ported to mainline] Signed-off-by: Bartosz Golaszewski <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9eb2c5f commit dd74749

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/misc/fastrpc.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
#define MDSP_DOMAIN_ID (1)
2828
#define SDSP_DOMAIN_ID (2)
2929
#define CDSP_DOMAIN_ID (3)
30-
#define FASTRPC_DEV_MAX 4 /* adsp, mdsp, slpi, cdsp*/
30+
#define CDSP1_DOMAIN_ID (4)
31+
#define FASTRPC_DEV_MAX 5 /* adsp, mdsp, slpi, cdsp, cdsp1 */
3132
#define FASTRPC_MAX_SESSIONS 14
3233
#define FASTRPC_MAX_VMIDS 16
3334
#define FASTRPC_ALIGN 128
@@ -106,7 +107,7 @@
106107
#define miscdev_to_fdevice(d) container_of(d, struct fastrpc_device, miscdev)
107108

108109
static const char *domains[FASTRPC_DEV_MAX] = { "adsp", "mdsp",
109-
"sdsp", "cdsp"};
110+
"sdsp", "cdsp", "cdsp1" };
110111
struct fastrpc_phy_page {
111112
u64 addr; /* physical address */
112113
u64 size; /* size of contiguous region */
@@ -2270,7 +2271,7 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
22702271
return err;
22712272
}
22722273

2273-
for (i = 0; i <= CDSP_DOMAIN_ID; i++) {
2274+
for (i = 0; i < FASTRPC_DEV_MAX; i++) {
22742275
if (!strcmp(domains[i], domain)) {
22752276
domain_id = i;
22762277
break;
@@ -2328,13 +2329,14 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev)
23282329
case ADSP_DOMAIN_ID:
23292330
case MDSP_DOMAIN_ID:
23302331
case SDSP_DOMAIN_ID:
2331-
/* Unsigned PD offloading is only supported on CDSP*/
2332+
/* Unsigned PD offloading is only supported on CDSP and CDSP1 */
23322333
data->unsigned_support = false;
23332334
err = fastrpc_device_register(rdev, data, secure_dsp, domains[domain_id]);
23342335
if (err)
23352336
goto fdev_error;
23362337
break;
23372338
case CDSP_DOMAIN_ID:
2339+
case CDSP1_DOMAIN_ID:
23382340
data->unsigned_support = true;
23392341
/* Create both device nodes so that we can allow both Signed and Unsigned PD */
23402342
err = fastrpc_device_register(rdev, data, true, domains[domain_id]);

0 commit comments

Comments
 (0)