diff options
author | Skylar Chang <chiaweic@codeaurora.org> | 2016-04-07 10:45:48 -0700 |
---|---|---|
committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-04-19 19:43:53 -0700 |
commit | fe52a162c9ca0b5943968bb7447285411d11cc9f (patch) | |
tree | f09e6acf33d90654356859de6ccb10d20710b541 /include | |
parent | 811bda58c5181000544aeb73ab1a314195a4aba5 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/msm_gsi.h | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/include/linux/msm_gsi.h b/include/linux/msm_gsi.h index d83cb701bf1b..c95a529b029b 100644 --- a/include/linux/msm_gsi.h +++ b/include/linux/msm_gsi.h @@ -412,6 +412,33 @@ struct gsi_xfer_elem { }; /** + * 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 { |