kernel-brax3-ubuntu-touch/drivers/misc/mediatek/ccci_util/ccci_util_log.h
erascape f319b992b1 kernel-5.15: Initial import brax3 UT kernel
* halium configs enabled

Signed-off-by: erascape <erascape@proton.me>
2025-09-23 15:17:10 +00:00

54 lines
1.7 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2015 MediaTek Inc.
*/
#ifndef __CCCI_UTIL_LOG_H__
#define __CCCI_UTIL_LOG_H__
#if IS_ENABLED(CONFIG_MTK_AEE_IPANIC)
extern int mrdump_mini_add_extra_file(unsigned long vaddr, unsigned long paddr,
unsigned long size, const char *name);
#endif
/* #define BRING_UP_LOG_MODE */
#ifndef BRING_UP_LOG_MODE
/* ------------------------------------------------------------------------- */
/* For normal stage log */
/* ------------------------------------------------------------------------- */
/* No MD id message part */
#define CCCI_UTIL_DBG_MSG(fmt, args...) \
do {\
ccci_dump_write(CCCI_DUMP_INIT,\
CCCI_DUMP_TIME_FLAG, "[0/util]" fmt, ##args);\
ccci_dump_write(CCCI_DUMP_NORMAL,\
CCCI_DUMP_TIME_FLAG, "[0/util]" fmt, ##args);\
} while (0)
#define CCCI_UTIL_INF_MSG(fmt, args...) \
do {\
ccci_dump_write(CCCI_DUMP_INIT,\
CCCI_DUMP_TIME_FLAG, "[0/util]" fmt, ##args);\
ccci_dump_write(CCCI_DUMP_NORMAL,\
CCCI_DUMP_TIME_FLAG, "[0/util]" fmt, ##args);\
} while (0)
#define CCCI_UTIL_ERR_MSG(fmt, args...) \
do {\
ccci_dump_write(CCCI_DUMP_INIT,\
CCCI_DUMP_TIME_FLAG, "[0/util]" fmt, ##args);\
pr_notice("[ccci0/util]" fmt, ##args);\
} while (0)
#else
/* ------------------------------------------------------------------------- */
/* For bring up stage log */
/* ------------------------------------------------------------------------- */
/* No MD id message part */
#define CCCI_UTIL_DBG_MSG(fmt, args...) pr_notice("[ccci0/util]" fmt, ##args)
#define CCCI_UTIL_INF_MSG(fmt, args...) pr_notice("[ccci0/util]" fmt, ##args)
#define CCCI_UTIL_ERR_MSG(fmt, args...) pr_notice("[ccci0/util]" fmt, ##args)
#endif /* end of #ifndef BRING_UP_LOG_MODE */
#endif /*__CCCI_UTIL_LOG_H__ */