mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
Merge branch 'pci/switchtec'
- Remove status check after submitting Switchtec MRPC Firmware Download
commands to avoid Completion Timeouts (Kelvin Cao)
- Set Switchtec coherent DMA mask to allow 64-bit DMA (Boris Glimcher)
- Fix Switchtec SWITCHTEC_IOCTL_EVENT_IDX_ALL flag overwrite issue (Joey
Zhang)
- Enable write combining for Switchtec MRPC Input buffers (Kelvin Cao)
- Add Switchtec MRPC DMA mode support (Wesley Sheng)
* pci/switchtec:
switchtec: Add MRPC DMA mode support
switchtec: Improve MRPC efficiency by enabling write combining
switchtec: Fix SWITCHTEC_IOCTL_EVENT_IDX_ALL flags overwrite
switchtec: Set DMA coherent mask
switchtec: Remove immediate status check after submitting MRPC command
This commit is contained in:
commit
54aed1909d
2 changed files with 153 additions and 17 deletions
|
|
@ -29,6 +29,7 @@
|
|||
#define SWITCHTEC_EVENT_EN_IRQ BIT(3)
|
||||
#define SWITCHTEC_EVENT_FATAL BIT(4)
|
||||
|
||||
#define SWITCHTEC_DMA_MRPC_EN BIT(0)
|
||||
enum {
|
||||
SWITCHTEC_GAS_MRPC_OFFSET = 0x0000,
|
||||
SWITCHTEC_GAS_TOP_CFG_OFFSET = 0x1000,
|
||||
|
|
@ -46,6 +47,10 @@ struct mrpc_regs {
|
|||
u32 cmd;
|
||||
u32 status;
|
||||
u32 ret_value;
|
||||
u32 dma_en;
|
||||
u64 dma_addr;
|
||||
u32 dma_vector;
|
||||
u32 dma_ver;
|
||||
} __packed;
|
||||
|
||||
enum mrpc_status {
|
||||
|
|
@ -342,6 +347,14 @@ struct pff_csr_regs {
|
|||
|
||||
struct switchtec_ntb;
|
||||
|
||||
struct dma_mrpc_output {
|
||||
u32 status;
|
||||
u32 cmd_id;
|
||||
u32 rtn_code;
|
||||
u32 output_size;
|
||||
u8 data[SWITCHTEC_MRPC_PAYLOAD_SIZE];
|
||||
};
|
||||
|
||||
struct switchtec_dev {
|
||||
struct pci_dev *pdev;
|
||||
struct device dev;
|
||||
|
|
@ -381,6 +394,9 @@ struct switchtec_dev {
|
|||
u8 link_event_count[SWITCHTEC_MAX_PFF_CSR];
|
||||
|
||||
struct switchtec_ntb *sndev;
|
||||
|
||||
struct dma_mrpc_output *dma_mrpc;
|
||||
dma_addr_t dma_mrpc_dma_addr;
|
||||
};
|
||||
|
||||
static inline struct switchtec_dev *to_stdev(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue