linux/drivers/slimbus/qcom-ctrl.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2011-2017, The Linux Foundation
 */

#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"

/* Manager registers */
#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

/* Framer registers */
#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

/* Interface registers */
#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

/* Interrupt status bits */
#define MGR_INT_TX_NACKED_2
#define MGR_INT_MSG_BUF_CONTE
#define MGR_INT_RX_MSG_RCVD
#define MGR_INT_TX_MSG_SENT

/* Framer config register settings */
#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

/* MAX message size over control channel */
#define SLIM_MSGQ_BUF_LEN
#define QCOM_TX_MSGS
#define QCOM_RX_MSGS
#define QCOM_BUF_ALLOC_RETRIES

#define CFG_PORT(r, v)

/* V2 Component registers */
#define CFG_PORT_V2(r)
#define COMP_CFG_V2
#define COMP_TRUST_CFG_V2

/* V1 Component registers */
#define CFG_PORT_V1(r)
#define COMP_CFG_V1
#define COMP_TRUST_CFG_V1

/* Resource group info for manager, and non-ported generic device-components */
#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)
{}

/*
 * If PM_RUNTIME is not defined, these 2 functions become helper
 * functions to be called from system suspend/resume.
 */
#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 /* CONFIG_PM_SLEEP */

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();