msm: gsi: update channel scratch structures

Update channel scratch data structure according
to GSI ver 83.

CRs-Fixed: 1000819
Change-Id: I428963f9cd7885015e5185ef6c666bf26e0851bb
Acked-by: Ady Abraham <adya@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
This commit is contained in:
Skylar Chang 2016-04-07 10:45:48 -07:00 committed by Jeevan Shriram
parent 811bda58c5
commit fe52a162c9

View file

@ -411,6 +411,33 @@ struct gsi_xfer_elem {
void *xfer_user_data;
};
/**
* gsi_gpi_channel_scratch - GPI protocol SW config area of
* channel scratch
*
* @max_outstanding_tre: Used for the prefetch management sequence by the
* sequencer. Defines the maximum number of allowed
* outstanding TREs in IPA/GSI (in Bytes). RE engine
* prefetch will be limited by this configuration. It
* is suggested to configure this value to IPA_IF
* channel TLV queue size times element size. To disable
* the feature in doorbell mode (DB Mode=1). Maximum
* outstanding TREs should be set to 64KB
* (or any value larger or equal to ring length . RLEN)
* @outstanding_threshold: Used for the prefetch management sequence by the
* sequencer. Defines the threshold (in Bytes) as to when
* to update the channel doorbell. Should be smaller than
* Maximum outstanding TREs. value. It is suggested to
* configure this value to 2 * element size.
*/
struct __packed gsi_gpi_channel_scratch {
uint64_t resvd1;
uint32_t resvd2:16;
uint32_t max_outstanding_tre:16;
uint32_t resvd3:16;
uint32_t outstanding_threshold:16;
};
/**
* gsi_mhi_channel_scratch - MHI protocol SW config area of
* channel scratch
@ -443,15 +470,17 @@ struct gsi_xfer_elem {
* sequencer. Defines the maximum number of allowed
* outstanding TREs in IPA/GSI (in Bytes). RE engine
* prefetch will be limited by this configuration. It
* is suggested to configure this value with the IPA_IF
* channel AOS queue size. To disable the feature in
* doorbell mode (DB Mode=1) Maximum outstanding TREs
* should be set to 64KB (or any value larger or equal
* to ring length . RLEN)
* is suggested to configure this value to IPA_IF
* channel TLV queue size times element size.
* To disable the feature in doorbell mode (DB Mode=1).
* Maximum outstanding TREs should be set to 64KB
* (or any value larger or equal to ring length . RLEN)
* @outstanding_threshold: Used for the prefetch management sequence by the
* sequencer. Defines the threshold (in Bytes) as to when
* to update the channel doorbell. Should be smaller than
* Maximum outstanding TREs. value.
* Maximum outstanding TREs. value. It is suggested to
* configure this value to min(TLV_FIFO_SIZE/2,8) *
* element size.
*/
struct __packed gsi_mhi_channel_scratch {
uint64_t mhi_host_wp_addr;
@ -484,16 +513,18 @@ struct __packed gsi_mhi_channel_scratch {
* sequencer. Defines the maximum number of allowed
* outstanding TREs in IPA/GSI (in Bytes). RE engine
* prefetch will be limited by this configuration. It
* is suggested to configure this value with the IPA_IF
* channel AOS queue size. To disable the feature in
* doorbell mode (DB Mode=1) Maximum outstanding TREs
* should be set to 64KB (or any value larger or equal
* to ring length . RLEN)
* is suggested to configure this value to IPA_IF
* channel TLV queue size times element size.
* To disable the feature in doorbell mode (DB Mode=1)
* Maximum outstanding TREs should be set to 64KB
* (or any value larger or equal to ring length . RLEN)
* @depcmd_hi_addr: Used to generate "Update Transfer" command
* @outstanding_threshold: Used for the prefetch management sequence by the
* sequencer. Defines the threshold (in Bytes) as to when
* to update the channel doorbell. Should be smaller than
* Maximum outstanding TREs. value.
* Maximum outstanding TREs. value. It is suggested to
* configure this value to 2 * element size. for MBIM the
* suggested configuration is the element size.
*/
struct __packed gsi_xdci_channel_scratch {
uint32_t last_trb_addr:16;
@ -513,6 +544,7 @@ struct __packed gsi_xdci_channel_scratch {
*
*/
union __packed gsi_channel_scratch {
struct __packed gsi_gpi_channel_scratch gpi;
struct __packed gsi_mhi_channel_scratch mhi;
struct __packed gsi_xdci_channel_scratch xdci;
struct __packed {