linux/drivers/soc/mediatek/mtk-devapc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2020 MediaTek Inc.
 */

#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/of_address.h>

#define VIO_MOD_TO_REG_IND(m)
#define VIO_MOD_TO_REG_OFF(m)

struct mtk_devapc_vio_dbgs {};

struct mtk_devapc_regs_ofs {};

struct mtk_devapc_data {};

struct mtk_devapc_context {};

static void clear_vio_status(struct mtk_devapc_context *ctx)
{}

static void mask_module_irq(struct mtk_devapc_context *ctx, bool mask)
{}

#define PHY_DEVAPC_TIMEOUT

/*
 * devapc_sync_vio_dbg - do "shift" mechansim" to get full violation information.
 *                       shift mechanism is depends on devapc hardware design.
 *                       Mediatek devapc set multiple slaves as a group.
 *                       When violation is triggered, violation info is kept
 *                       inside devapc hardware.
 *                       Driver should do shift mechansim to sync full violation
 *                       info to VIO_DBGs registers.
 *
 */
static int devapc_sync_vio_dbg(struct mtk_devapc_context *ctx)
{}

/*
 * devapc_extract_vio_dbg - extract full violation information after doing
 *                          shift mechanism.
 */
static void devapc_extract_vio_dbg(struct mtk_devapc_context *ctx)
{}

/*
 * devapc_violation_irq - the devapc Interrupt Service Routine (ISR) will dump
 *                        violation information including which master violates
 *                        access slave.
 */
static irqreturn_t devapc_violation_irq(int irq_number, void *data)
{}

/*
 * start_devapc - unmask slave's irq to start receiving devapc violation.
 */
static void start_devapc(struct mtk_devapc_context *ctx)
{}

/*
 * stop_devapc - mask slave's irq to stop service.
 */
static void stop_devapc(struct mtk_devapc_context *ctx)
{}

static const struct mtk_devapc_regs_ofs devapc_regs_ofs_mt6779 =;

static const struct mtk_devapc_data devapc_mt6779 =;

static const struct mtk_devapc_data devapc_mt8186 =;

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

static int mtk_devapc_probe(struct platform_device *pdev)
{}

static void mtk_devapc_remove(struct platform_device *pdev)
{}

static struct platform_driver mtk_devapc_driver =;

module_platform_driver();

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