#include <linux/dmaengine.h>
#include <linux/mhi_ep.h>
#include <linux/module.h>
#include <linux/of_dma.h>
#include <linux/platform_device.h>
#include <linux/pci-epc.h>
#include <linux/pci-epf.h>
#define MHI_VERSION_1_0 …
#define to_epf_mhi(cntrl) …
#define MHI_EPF_USE_DMA …
struct pci_epf_mhi_dma_transfer { … };
struct pci_epf_mhi_ep_info { … };
#define MHI_EP_CHANNEL_CONFIG(ch_num, ch_name, direction) …
#define MHI_EP_CHANNEL_CONFIG_UL(ch_num, ch_name) …
#define MHI_EP_CHANNEL_CONFIG_DL(ch_num, ch_name) …
static const struct mhi_ep_channel_config mhi_v1_channels[] = …;
static const struct mhi_ep_cntrl_config mhi_v1_config = …;
static struct pci_epf_header sdx55_header = …;
static const struct pci_epf_mhi_ep_info sdx55_info = …;
static struct pci_epf_header sm8450_header = …;
static const struct pci_epf_mhi_ep_info sm8450_info = …;
static struct pci_epf_header sa8775p_header = …;
static const struct pci_epf_mhi_ep_info sa8775p_info = …;
struct pci_epf_mhi { … };
static size_t get_align_offset(struct pci_epf_mhi *epf_mhi, u64 addr)
{ … }
static int __pci_epf_mhi_alloc_map(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr,
phys_addr_t *paddr, void __iomem **vaddr,
size_t offset, size_t size)
{ … }
static int pci_epf_mhi_alloc_map(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr,
phys_addr_t *paddr, void __iomem **vaddr,
size_t size)
{ … }
static void __pci_epf_mhi_unmap_free(struct mhi_ep_cntrl *mhi_cntrl,
u64 pci_addr, phys_addr_t paddr,
void __iomem *vaddr, size_t offset,
size_t size)
{ … }
static void pci_epf_mhi_unmap_free(struct mhi_ep_cntrl *mhi_cntrl, u64 pci_addr,
phys_addr_t paddr, void __iomem *vaddr,
size_t size)
{ … }
static void pci_epf_mhi_raise_irq(struct mhi_ep_cntrl *mhi_cntrl, u32 vector)
{ … }
static int pci_epf_mhi_iatu_read(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
static int pci_epf_mhi_iatu_write(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
static void pci_epf_mhi_dma_callback(void *param)
{ … }
static int pci_epf_mhi_edma_read(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
static int pci_epf_mhi_edma_write(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
static void pci_epf_mhi_dma_worker(struct work_struct *work)
{ … }
static void pci_epf_mhi_dma_async_callback(void *param)
{ … }
static int pci_epf_mhi_edma_read_async(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
static int pci_epf_mhi_edma_write_async(struct mhi_ep_cntrl *mhi_cntrl,
struct mhi_ep_buf_info *buf_info)
{ … }
struct epf_dma_filter { … };
static bool pci_epf_mhi_filter(struct dma_chan *chan, void *node)
{ … }
static int pci_epf_mhi_dma_init(struct pci_epf_mhi *epf_mhi)
{ … }
static void pci_epf_mhi_dma_deinit(struct pci_epf_mhi *epf_mhi)
{ … }
static int pci_epf_mhi_epc_init(struct pci_epf *epf)
{ … }
static void pci_epf_mhi_epc_deinit(struct pci_epf *epf)
{ … }
static int pci_epf_mhi_link_up(struct pci_epf *epf)
{ … }
static int pci_epf_mhi_link_down(struct pci_epf *epf)
{ … }
static int pci_epf_mhi_bus_master_enable(struct pci_epf *epf)
{ … }
static int pci_epf_mhi_bind(struct pci_epf *epf)
{ … }
static void pci_epf_mhi_unbind(struct pci_epf *epf)
{ … }
static const struct pci_epc_event_ops pci_epf_mhi_event_ops = …;
static int pci_epf_mhi_probe(struct pci_epf *epf,
const struct pci_epf_device_id *id)
{ … }
static const struct pci_epf_device_id pci_epf_mhi_ids[] = …;
static const struct pci_epf_ops pci_epf_mhi_ops = …;
static struct pci_epf_driver pci_epf_mhi_driver = …;
static int __init pci_epf_mhi_init(void)
{ … }
module_init(…) …;
static void __exit pci_epf_mhi_exit(void)
{ … }
module_exit(pci_epf_mhi_exit);
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;