#include <linux/dmaengine.h>
#include <linux/dma-mapping.h>
#include <linux/list.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/property.h>
#include <linux/delay.h>
#include <linux/acpi.h>
#include <linux/irq.h>
#include <linux/atomic.h>
#include <linux/pm_runtime.h>
#include <linux/msi.h>
#include "../dmaengine.h"
#include "hidma.h"
#define HIDMA_AUTOSUSPEND_TIMEOUT …
#define HIDMA_ERR_INFO_SW …
#define HIDMA_ERR_CODE_UNEXPECTED_TERMINATE …
#define HIDMA_NR_DEFAULT_DESC …
#define HIDMA_MSI_INTS …
static inline struct hidma_dev *to_hidma_dev(struct dma_device *dmadev)
{ … }
static inline
struct hidma_dev *to_hidma_dev_from_lldev(struct hidma_lldev **_lldevp)
{ … }
static inline struct hidma_chan *to_hidma_chan(struct dma_chan *dmach)
{ … }
static void hidma_free(struct hidma_dev *dmadev)
{ … }
static unsigned int nr_desc_prm;
module_param(nr_desc_prm, uint, 0644);
MODULE_PARM_DESC(…) …;
enum hidma_cap { … };
static void hidma_process_completed(struct hidma_chan *mchan)
{ … }
static void hidma_callback(void *data)
{ … }
static int hidma_chan_init(struct hidma_dev *dmadev, u32 dma_sig)
{ … }
static void hidma_issue_task(struct tasklet_struct *t)
{ … }
static void hidma_issue_pending(struct dma_chan *dmach)
{ … }
static inline bool hidma_txn_is_success(dma_cookie_t cookie,
dma_cookie_t last_success, dma_cookie_t last_used)
{ … }
static enum dma_status hidma_tx_status(struct dma_chan *dmach,
dma_cookie_t cookie,
struct dma_tx_state *txstate)
{ … }
static dma_cookie_t hidma_tx_submit(struct dma_async_tx_descriptor *txd)
{ … }
static int hidma_alloc_chan_resources(struct dma_chan *dmach)
{ … }
static struct dma_async_tx_descriptor *
hidma_prep_dma_memcpy(struct dma_chan *dmach, dma_addr_t dest, dma_addr_t src,
size_t len, unsigned long flags)
{ … }
static struct dma_async_tx_descriptor *
hidma_prep_dma_memset(struct dma_chan *dmach, dma_addr_t dest, int value,
size_t len, unsigned long flags)
{ … }
static int hidma_terminate_channel(struct dma_chan *chan)
{ … }
static int hidma_terminate_all(struct dma_chan *chan)
{ … }
static void hidma_free_chan_resources(struct dma_chan *dmach)
{ … }
static int hidma_pause(struct dma_chan *chan)
{ … }
static int hidma_resume(struct dma_chan *chan)
{ … }
static irqreturn_t hidma_chirq_handler(int chirq, void *arg)
{ … }
#ifdef CONFIG_GENERIC_MSI_IRQ
static irqreturn_t hidma_chirq_handler_msi(int chirq, void *arg)
{ … }
#endif
static ssize_t hidma_show_values(struct device *dev,
struct device_attribute *attr, char *buf)
{ … }
static inline void hidma_sysfs_uninit(struct hidma_dev *dev)
{ … }
static struct device_attribute*
hidma_create_sysfs_entry(struct hidma_dev *dev, char *name, int mode)
{ … }
static int hidma_sysfs_init(struct hidma_dev *dev)
{ … }
#ifdef CONFIG_GENERIC_MSI_IRQ
static void hidma_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
{ … }
#endif
static void hidma_free_msis(struct hidma_dev *dmadev)
{ … }
static int hidma_request_msi(struct hidma_dev *dmadev,
struct platform_device *pdev)
{ … }
static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
{ … }
static int hidma_probe(struct platform_device *pdev)
{ … }
static void hidma_shutdown(struct platform_device *pdev)
{ … }
static void hidma_remove(struct platform_device *pdev)
{ … }
#if IS_ENABLED(CONFIG_ACPI)
static const struct acpi_device_id hidma_acpi_ids[] = …;
MODULE_DEVICE_TABLE(acpi, hidma_acpi_ids);
#endif
static struct platform_driver hidma_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;