luckfox-pico-sdk/sysdrv/source/kernel/include/trace/events/spmi.h
luckfox-eng29 8f34c2760d project:build.sh: Added fastboot support; custom modifications to U-Boot and kernel implemented using patches.
project:cfg:BoardConfig_IPC: Added fastboot BoardConfig file and firmware post-scripts, distinguishing between
the BoardConfigs for Luckfox Pico Pro and Luckfox Pico Max. project:app: Added fastboot_client and rk_smart_door
for quick boot applications; updated rkipc app to adapt to the latest media library. media:samples: Added more
usage examples. media:rockit: Fixed bugs; removed support for retrieving data frames from VPSS. media:isp:
Updated rkaiq library and related tools to support connection to RKISP_Tuner. sysdrv:Makefile: Added support for
compiling drv_ko on Luckfox Pico Ultra W using Ubuntu; added support for custom root filesystem.
sysdrv:tools:board: Updated Buildroot optional mirror sources, updated some software versions, and stored device
tree files and configuration files that undergo multiple modifications for U-Boot and kernel separately.
sysdrv:source:mcu: Used RISC-V MCU SDK with RT-Thread system, mainly for initializing camera AE during quick
boot. sysdrv:source:uboot: Added support for fastboot; added high baud rate DDR bin for serial firmware upgrades.
sysdrv:source:kernel: Upgraded to version 5.10.160; increased NPU frequency for RV1106G3; added support for
fastboot.

Signed-off-by: luckfox-eng29 <eng29@luckfox.com>
2024-10-14 09:47:04 +08:00

137 lines
3.2 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#undef TRACE_SYSTEM
#define TRACE_SYSTEM spmi
#if !defined(_TRACE_SPMI_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SPMI_H
#include <linux/spmi.h>
#include <linux/tracepoint.h>
/*
* drivers/spmi/spmi.c
*/
TRACE_EVENT(spmi_write_begin,
TP_PROTO(u8 opcode, u8 sid, u16 addr, u8 len, const u8 *buf),
TP_ARGS(opcode, sid, addr, len, buf),
TP_STRUCT__entry(
__field ( u8, opcode )
__field ( u8, sid )
__field ( u16, addr )
__field ( u8, len )
__dynamic_array ( u8, buf, len )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->addr = addr;
__entry->len = len;
memcpy(__get_dynamic_array(buf), buf, len);
),
TP_printk("opc=%d sid=%02d addr=0x%04x len=%d buf=0x[%*phD]",
(int)__entry->opcode, (int)__entry->sid,
(int)__entry->addr, (int)__entry->len,
(int)__entry->len, __get_dynamic_array(buf))
);
TRACE_EVENT(spmi_write_end,
TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret),
TP_ARGS(opcode, sid, addr, ret),
TP_STRUCT__entry(
__field ( u8, opcode )
__field ( u8, sid )
__field ( u16, addr )
__field ( int, ret )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->addr = addr;
__entry->ret = ret;
),
TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d",
(int)__entry->opcode, (int)__entry->sid,
(int)__entry->addr, __entry->ret)
);
TRACE_EVENT(spmi_read_begin,
TP_PROTO(u8 opcode, u8 sid, u16 addr),
TP_ARGS(opcode, sid, addr),
TP_STRUCT__entry(
__field ( u8, opcode )
__field ( u8, sid )
__field ( u16, addr )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->addr = addr;
),
TP_printk("opc=%d sid=%02d addr=0x%04x",
(int)__entry->opcode, (int)__entry->sid,
(int)__entry->addr)
);
TRACE_EVENT(spmi_read_end,
TP_PROTO(u8 opcode, u8 sid, u16 addr, int ret, u8 len, const u8 *buf),
TP_ARGS(opcode, sid, addr, ret, len, buf),
TP_STRUCT__entry(
__field ( u8, opcode )
__field ( u8, sid )
__field ( u16, addr )
__field ( int, ret )
__field ( u8, len )
__dynamic_array ( u8, buf, len )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->addr = addr;
__entry->ret = ret;
__entry->len = len;
memcpy(__get_dynamic_array(buf), buf, len);
),
TP_printk("opc=%d sid=%02d addr=0x%04x ret=%d len=%02d buf=0x[%*phD]",
(int)__entry->opcode, (int)__entry->sid,
(int)__entry->addr, __entry->ret, (int)__entry->len,
(int)__entry->len, __get_dynamic_array(buf))
);
TRACE_EVENT(spmi_cmd,
TP_PROTO(u8 opcode, u8 sid, int ret),
TP_ARGS(opcode, sid, ret),
TP_STRUCT__entry(
__field ( u8, opcode )
__field ( u8, sid )
__field ( int, ret )
),
TP_fast_assign(
__entry->opcode = opcode;
__entry->sid = sid;
__entry->ret = ret;
),
TP_printk("opc=%d sid=%02d ret=%d", (int)__entry->opcode,
(int)__entry->sid, ret)
);
#endif /* _TRACE_SPMI_H */
/* This part must be outside protection */
#include <trace/define_trace.h>