From b34c8ada4ed243cd52e504bf2c6fb3451dc730f8 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Fri, 30 Oct 2015 11:37:13 -0500 Subject: [PATCH] Remoteproc: TCI66xx: Fix up resource tables The TCI6638/TCI6614 resource table structure definitions are incorrect - the offset variable was defined to be an array of 13, whereas the real valid entries are either 2 or 3, thereby mis-representing the offsets of the resources in the actual resource table when compared to the resource structure definition. Fix this properly by adjusting the array length. While at this, also remove the current TYPE_CARVEOUT entry as well, Keystone family of SoCs do not have an MMU, so can not really support dynamically allocated addresses for text or data sections. Signed-off-by: Suman Anna --- .../ti/ipc/remoteproc/rsc_table_tci6614.h | 12 ++---------- .../ti/ipc/remoteproc/rsc_table_tci6638.h | 19 ++++++++----------- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/packages/ti/ipc/remoteproc/rsc_table_tci6614.h b/packages/ti/ipc/remoteproc/rsc_table_tci6614.h index 7c6a03f..2d39d31 100644 --- a/packages/ti/ipc/remoteproc/rsc_table_tci6614.h +++ b/packages/ti/ipc/remoteproc/rsc_table_tci6614.h @@ -62,16 +62,13 @@ struct resource_table { UInt32 version; UInt32 num; UInt32 reserved[2]; - UInt32 offset[13]; + UInt32 offset[2]; /* rpmsg vdev entry */ struct fw_rsc_vdev rpmsg_vdev; struct fw_rsc_vdev_vring rpmsg_vring0; struct fw_rsc_vdev_vring rpmsg_vring1; - /* data carveout entry */ - struct fw_rsc_carveout data_cout; - /* trace entry */ struct fw_rsc_trace trace; }; @@ -88,12 +85,11 @@ struct resource_table { struct resource_table ti_ipc_remoteproc_ResourceTable = { 1, /* we're the first version that implements this */ - 3, /* number of entries in the table */ + 2, /* number of entries in the table */ 0, 0, /* reserved, must be zero */ /* offsets to entries */ { offsetof(struct resource_table, rpmsg_vdev), - offsetof(struct resource_table, data_cout), offsetof(struct resource_table, trace), }, @@ -107,10 +103,6 @@ struct resource_table ti_ipc_remoteproc_ResourceTable = { { RPMSG_VRING0_DA, 4096, RPMSG_VQ0_SIZE, 1, 0 }, { RPMSG_VRING1_DA, 4096, RPMSG_VQ1_SIZE, 2, 0 }, - { - TYPE_CARVEOUT, CARVEOUTADDR, CARVEOUTADDR, CARVEOUTSIZE, 0, 0, "carveout:dsp", - }, - { TYPE_TRACE, TRACEBUFADDR, TRACEBUFSIZE, 0, "trace:dsp", }, diff --git a/packages/ti/ipc/remoteproc/rsc_table_tci6638.h b/packages/ti/ipc/remoteproc/rsc_table_tci6638.h index 12c9b34..fecc7e2 100644 --- a/packages/ti/ipc/remoteproc/rsc_table_tci6638.h +++ b/packages/ti/ipc/remoteproc/rsc_table_tci6638.h @@ -61,7 +61,11 @@ struct my_resource_table { struct resource_table base; - UInt32 offset[13]; +#ifndef TRACE_RESOURCE_ONLY + UInt32 offset[2]; +#else + UInt32 offset[1]; +#endif #ifndef TRACE_RESOURCE_ONLY /* rpmsg vdev entry */ @@ -69,8 +73,6 @@ struct my_resource_table { struct fw_rsc_vdev_vring rpmsg_vring0; struct fw_rsc_vdev_vring rpmsg_vring1; #endif - /* data carveout entry */ - struct fw_rsc_carveout data_cout; /* trace entry */ struct fw_rsc_trace trace; @@ -89,9 +91,9 @@ struct my_resource_table { struct my_resource_table ti_ipc_remoteproc_ResourceTable = { 1, /* we're the first version that implements this */ #ifndef TRACE_RESOURCE_ONLY - 3, /* number of entries in the table */ + 2, /* number of entries in the table */ #else - 2, + 1, #endif 0, 0, /* reserved, must be zero */ /* offsets to entries */ @@ -99,7 +101,6 @@ struct my_resource_table ti_ipc_remoteproc_ResourceTable = { #ifndef TRACE_RESOURCE_ONLY offsetof(struct my_resource_table, rpmsg_vdev), #endif - offsetof(struct my_resource_table, data_cout), offsetof(struct my_resource_table, trace), }, @@ -116,11 +117,7 @@ struct my_resource_table ti_ipc_remoteproc_ResourceTable = { #endif { - TYPE_CARVEOUT, CARVEOUTADDR, CARVEOUTADDR, CARVEOUTSIZE, 0, 0, "carveout:dsp", - }, - - { - TYPE_TRACE, TRACEBUFADDR, TRACEBUFSIZE, 0, "trace:dsp", + TYPE_TRACE, TRACEBUFADDR, TRACEBUFSIZE, 0, "trace:dsp", }, }; -- 2.39.2