linux/drivers/mailbox/qcom-ipcc.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
 */

#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqdomain.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/platform_device.h>

#include <dt-bindings/mailbox/qcom-ipcc.h>

/* IPCC Register offsets */
#define IPCC_REG_SEND_ID
#define IPCC_REG_RECV_ID
#define IPCC_REG_RECV_SIGNAL_ENABLE
#define IPCC_REG_RECV_SIGNAL_DISABLE
#define IPCC_REG_RECV_SIGNAL_CLEAR
#define IPCC_REG_CLIENT_CLEAR

#define IPCC_SIGNAL_ID_MASK
#define IPCC_CLIENT_ID_MASK

#define IPCC_NO_PENDING_IRQ

/**
 * struct qcom_ipcc_chan_info - Per-mailbox-channel info
 * @client_id:	The client-id to which the interrupt has to be triggered
 * @signal_id:	The signal-id to which the interrupt has to be triggered
 */
struct qcom_ipcc_chan_info {};

/**
 * struct qcom_ipcc - Holder for the mailbox driver
 * @dev:		Device associated with this instance
 * @base:		Base address of the IPCC frame associated to APSS
 * @irq_domain:		The irq_domain associated with this instance
 * @chans:		The mailbox channels array
 * @mchan:		The per-mailbox channel info array
 * @mbox:		The mailbox controller
 * @num_chans:		Number of @chans elements
 * @irq:		Summary irq
 */
struct qcom_ipcc {};

static inline struct qcom_ipcc *to_qcom_ipcc(struct mbox_controller *mbox)
{}

static inline u32 qcom_ipcc_get_hwirq(u16 client_id, u16 signal_id)
{}

static irqreturn_t qcom_ipcc_irq_fn(int irq, void *data)
{}

static void qcom_ipcc_mask_irq(struct irq_data *irqd)
{}

static void qcom_ipcc_unmask_irq(struct irq_data *irqd)
{}

static struct irq_chip qcom_ipcc_irq_chip =;

static int qcom_ipcc_domain_map(struct irq_domain *d, unsigned int irq,
				irq_hw_number_t hw)
{}

static int qcom_ipcc_domain_xlate(struct irq_domain *d,
				  struct device_node *node, const u32 *intspec,
				  unsigned int intsize,
				  unsigned long *out_hwirq,
				  unsigned int *out_type)
{}

static const struct irq_domain_ops qcom_ipcc_irq_ops =;

static int qcom_ipcc_mbox_send_data(struct mbox_chan *chan, void *data)
{}

static void qcom_ipcc_mbox_shutdown(struct mbox_chan *chan)
{}

static struct mbox_chan *qcom_ipcc_mbox_xlate(struct mbox_controller *mbox,
					const struct of_phandle_args *ph)
{}

static const struct mbox_chan_ops ipcc_mbox_chan_ops =;

static int qcom_ipcc_setup_mbox(struct qcom_ipcc *ipcc,
				struct device_node *controller_dn)
{}

static int qcom_ipcc_pm_resume(struct device *dev)
{}

static int qcom_ipcc_probe(struct platform_device *pdev)
{}

static void qcom_ipcc_remove(struct platform_device *pdev)
{}

static const struct of_device_id qcom_ipcc_of_match[] =;
MODULE_DEVICE_TABLE(of, qcom_ipcc_of_match);

static const struct dev_pm_ops qcom_ipcc_dev_pm_ops =;

static struct platform_driver qcom_ipcc_driver =;

static int __init qcom_ipcc_init(void)
{}
arch_initcall(qcom_ipcc_init);

MODULE_AUTHOR();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();