#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/of.h>
#include <linux/pm_runtime.h>
#include "slimbus.h"
#define MGR_CFG …
#define MGR_STATUS …
#define MGR_INT_EN …
#define MGR_INT_STAT …
#define MGR_INT_CLR …
#define MGR_TX_MSG …
#define MGR_RX_MSG …
#define MGR_IE_STAT …
#define MGR_VE_STAT …
#define MGR_CFG_ENABLE …
#define FRM_CFG …
#define FRM_STAT …
#define FRM_INT_EN …
#define FRM_INT_STAT …
#define FRM_INT_CLR …
#define FRM_WAKEUP …
#define FRM_CLKCTL_DONE …
#define FRM_IE_STAT …
#define FRM_VE_STAT …
#define INTF_CFG …
#define INTF_STAT …
#define INTF_INT_EN …
#define INTF_INT_STAT …
#define INTF_INT_CLR …
#define INTF_IE_STAT …
#define INTF_VE_STAT …
#define MGR_INT_TX_NACKED_2 …
#define MGR_INT_MSG_BUF_CONTE …
#define MGR_INT_RX_MSG_RCVD …
#define MGR_INT_TX_MSG_SENT …
#define FRM_ACTIVE …
#define CLK_GEAR …
#define ROOT_FREQ …
#define REF_CLK_GEAR …
#define INTR_WAKE …
#define SLIM_MSG_ASM_FIRST_WORD(l, mt, mc, dt, ad) …
#define SLIM_ROOT_FREQ …
#define QCOM_SLIM_AUTOSUSPEND …
#define SLIM_MSGQ_BUF_LEN …
#define QCOM_TX_MSGS …
#define QCOM_RX_MSGS …
#define QCOM_BUF_ALLOC_RETRIES …
#define CFG_PORT(r, v) …
#define CFG_PORT_V2(r) …
#define COMP_CFG_V2 …
#define COMP_TRUST_CFG_V2 …
#define CFG_PORT_V1(r) …
#define COMP_CFG_V1 …
#define COMP_TRUST_CFG_V1 …
#define EE_MGR_RSC_GRP …
#define EE_NGD_2 …
#define EE_NGD_1 …
struct slim_ctrl_buf { … };
struct qcom_slim_ctrl { … };
static void qcom_slim_queue_tx(struct qcom_slim_ctrl *ctrl, void *buf,
u8 len, u32 tx_reg)
{ … }
static void *slim_alloc_rxbuf(struct qcom_slim_ctrl *ctrl)
{ … }
static void slim_ack_txn(struct qcom_slim_ctrl *ctrl, int err)
{ … }
static irqreturn_t qcom_slim_handle_tx_irq(struct qcom_slim_ctrl *ctrl,
u32 stat)
{ … }
static irqreturn_t qcom_slim_handle_rx_irq(struct qcom_slim_ctrl *ctrl,
u32 stat)
{ … }
static irqreturn_t qcom_slim_interrupt(int irq, void *d)
{ … }
static int qcom_clk_pause_wakeup(struct slim_controller *sctrl)
{ … }
static void *slim_alloc_txbuf(struct qcom_slim_ctrl *ctrl,
struct slim_msg_txn *txn,
struct completion *done)
{ … }
static int qcom_xfer_msg(struct slim_controller *sctrl,
struct slim_msg_txn *txn)
{ … }
static int qcom_set_laddr(struct slim_controller *sctrl,
struct slim_eaddr *ead, u8 laddr)
{ … }
static int slim_get_current_rxbuf(struct qcom_slim_ctrl *ctrl, void *buf)
{ … }
static void qcom_slim_rxwq(struct work_struct *work)
{ … }
static void qcom_slim_prg_slew(struct platform_device *pdev,
struct qcom_slim_ctrl *ctrl)
{ … }
static int qcom_slim_probe(struct platform_device *pdev)
{ … }
static void qcom_slim_remove(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM
static int qcom_slim_runtime_suspend(struct device *device)
{ … }
static int qcom_slim_runtime_resume(struct device *device)
{ … }
#endif
#ifdef CONFIG_PM_SLEEP
static int qcom_slim_suspend(struct device *dev)
{ … }
static int qcom_slim_resume(struct device *dev)
{ … }
#endif
static const struct dev_pm_ops qcom_slim_dev_pm_ops = …;
static const struct of_device_id qcom_slim_dt_match[] = …;
MODULE_DEVICE_TABLE(of, qcom_slim_dt_match);
static struct platform_driver qcom_slim_driver = …;
module_platform_driver(…) …;
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;