mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:24:47 +01:00
The hardware mailboxes are used by the driver to submit requests to firmware and receive the completion notices from hardware. Initially, a management mailbox channel is up and running. The driver may request firmware to create/destroy more channels dynamically through management channel. Add driver internal mailbox interfaces. - create/destroy a mailbox channel instance - send a message to the firmware through a specific channel - wait for a notification from the specific channel Co-developed-by: George Yang <George.Yang@amd.com> Signed-off-by: George Yang <George.Yang@amd.com> Co-developed-by: Min Ma <min.ma@amd.com> Signed-off-by: Min Ma <min.ma@amd.com> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241118172942.2014541-4-lizhi.hou@amd.com
60 lines
1.5 KiB
C
60 lines
1.5 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/*
|
|
* Copyright (C) 2023-2024, Advanced Micro Devices, Inc.
|
|
*/
|
|
|
|
#undef TRACE_SYSTEM
|
|
#define TRACE_SYSTEM amdxdna
|
|
|
|
#if !defined(_TRACE_AMDXDNA_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
#define _TRACE_AMDXDNA_H
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
DECLARE_EVENT_CLASS(xdna_mbox_msg,
|
|
TP_PROTO(char *name, u8 chann_id, u32 opcode, u32 msg_id),
|
|
|
|
TP_ARGS(name, chann_id, opcode, msg_id),
|
|
|
|
TP_STRUCT__entry(__string(name, name)
|
|
__field(u32, chann_id)
|
|
__field(u32, opcode)
|
|
__field(u32, msg_id)),
|
|
|
|
TP_fast_assign(__assign_str(name);
|
|
__entry->chann_id = chann_id;
|
|
__entry->opcode = opcode;
|
|
__entry->msg_id = msg_id;),
|
|
|
|
TP_printk("%s.%d id 0x%x opcode 0x%x", __get_str(name),
|
|
__entry->chann_id, __entry->msg_id, __entry->opcode)
|
|
);
|
|
|
|
DEFINE_EVENT(xdna_mbox_msg, mbox_set_tail,
|
|
TP_PROTO(char *name, u8 chann_id, u32 opcode, u32 id),
|
|
TP_ARGS(name, chann_id, opcode, id)
|
|
);
|
|
|
|
DEFINE_EVENT(xdna_mbox_msg, mbox_set_head,
|
|
TP_PROTO(char *name, u8 chann_id, u32 opcode, u32 id),
|
|
TP_ARGS(name, chann_id, opcode, id)
|
|
);
|
|
|
|
TRACE_EVENT(mbox_irq_handle,
|
|
TP_PROTO(char *name, int irq),
|
|
|
|
TP_ARGS(name, irq),
|
|
|
|
TP_STRUCT__entry(__string(name, name)
|
|
__field(int, irq)),
|
|
|
|
TP_fast_assign(__assign_str(name);
|
|
__entry->irq = irq;),
|
|
|
|
TP_printk("%s.%d", __get_str(name), __entry->irq)
|
|
);
|
|
|
|
#endif /* !defined(_TRACE_AMDXDNA_H) || defined(TRACE_HEADER_MULTI_READ) */
|
|
|
|
/* This part must be outside protection */
|
|
#include <trace/define_trace.h>
|