hc
2024-08-12 233ab1bd4c5697f5cdec94e60206e8c6ac609b4c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/* SPDX-License-Identifier: GPL-2.0 */
 
/* Copyright (c) 2018 Rockchip Electronics Co. Ltd. */
 
#ifndef _RKFLASH_DEBUG_H
#define _RKFLASH_DEBUG_H
 
#include <linux/kernel.h>
 
/*
 * Debug control center
 * 1. Set Printing-adding-macro to 1 to allow print code being compiled in.
 * 2. Set variable 'rkflash_debug' to control debug print to enable print.
 */
 
/*
 * Printing-adding
 */
#define    PRINT_SWI_INFO        0
#define    PRINT_SWI_ERROR        1
#define PRINT_SWI_HEX        1
 
#define    PRINT_SWI_CON_IO    1
#define    PRINT_SWI_BLK_IO    1
 
/*
 * Print switch, set var rkflash_debug corresponding bit to 1 if needed.
 * I - info
 * IO - IO request about
 */
#define    PRINT_BIT_CON_IO    BIT(0)
#define    PRINT_BIT_BLK_IO    BIT(4)
 
__printf(1, 2) int rkflash_print_info(const char *fmt, ...);
__printf(1, 2) int rkflash_print_error(const char *fmt, ...);
void rkflash_print_hex(const char *s, const void *buf, int w, size_t len);
 
__printf(1, 2) int rkflash_print_dio(const char *fmt, ...);
__printf(1, 2) int rkflash_print_bio(const char *fmt, ...);
 
#endif