qcacmn: Control path support for Spectral DMA debug

All gen III chipsets use Direct-DMA mechanism to copy Spectral reports to
the Host for further processing. This mechanism involves ring and buffer
management in the Host, FW, and uCode, where improper/incomplete DMA and
improper tail update issues are seen. DBR framework provides support to
debug such issues. Add Spectral control path support to facilitate the
configuration of these debug options.

CRs-Fixed: 2478596 2478595
Change-Id: I094616c4137145389b6984ccab933e5ebd0aa1ab
This commit is contained in:
Shwetha G K
2019-10-24 11:58:01 +05:30
committad av nshrivas
förälder 85d32ab984
incheckning 8db4b4ac32
12 ändrade filer med 502 tillägg och 22 borttagningar

Visa fil

@@ -232,6 +232,16 @@ enum spectral_cp_error_code {
SPECTRAL_SCAN_ERR_PARAM_NOT_INITIALIZED,
};
/**
* enum spectral_dma_debug - Spectral DMA debug
* @SPECTRAL_DMA_RING_DEBUG: Spectral DMA ring debug
* @SPECTRAL_DMA_BUFFER_DEBUG: Spectral DMA buffer debug
*/
enum spectral_dma_debug {
SPECTRAL_DMA_RING_DEBUG,
SPECTRAL_DMA_BUFFER_DEBUG,
};
/**
* struct spectral_chan_stats - channel status info
* @cycle_count: Cycle count
@@ -378,12 +388,25 @@ struct spectral_scan_debug_request {
enum spectral_cp_error_code sscan_err_code;
};
/**
* struct spectral_scan_dma_debug_request - DMA debug request
* @dma_debug_enable: Enable/disable @dma_debug_type
* @dma_debug_type: Type of Spectral DMA debug i.e., ring or buffer debug
* @sscan_err_code: Spectral scan error code
*/
struct spectral_scan_dma_debug_request {
bool dma_debug_enable;
enum spectral_dma_debug dma_debug_type;
enum spectral_cp_error_code sscan_err_code;
};
/**
* struct spectral_cp_request - Spectral control path request
* Creating request and extracting response has to
* be atomic.
* @ss_mode: Spectral scan mode
* @req_id: Request identifier
* @dma_debug_req: Spectral DMA debug request
*/
struct spectral_cp_request {
enum spectral_scan_mode ss_mode;
@@ -396,6 +419,7 @@ struct spectral_cp_request {
struct spectral_scan_get_chan_width_request chan_width_req;
struct spectral_scan_get_status_request status_req;
struct spectral_scan_debug_request debug_req;
struct spectral_scan_dma_debug_request dma_debug_req;
};
};