blob: 7d70a8df0e0de315ede9599be4dcab268db99fe9 (
plain)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#ifndef _LINUX_DEBUG_LOG_H
#define _LINUX_DEBUG_LOG_H
/*
* LGE_CHANGE_S
* Date : 2014.03.19
* Author : bohyun.jung@lge.com
* Comment : Dynamic MMC log
* set mmc log level by accessing '/sys/module/mmc_core/parameters/debug_level' through adb shell.
*/
#if defined(CONFIG_LGE_MMC_DYNAMIC_LOG)
extern uint32_t mmc_debug_level;
#define mmc_print(level, x...) \
do { \
if (mmc_debug_level >= (level)) \
printk(x); \
} while (0)
#define mmc_debug_print(level, x...) \
do { \
if (mmc_debug_level >= (level)) \
pr_info(x); \
} while (0)
#undef pr_emerg
#undef pr_alert
#undef pr_crit
#undef pr_err
#undef pr_warning
#undef pr_warn
#undef pr_notice
#undef pr_info
#undef pr_debug
#undef pr_devel
#define pr_emerg(x...) mmc_print(0, x) /* system is unusable */
#define pr_alert(x...) mmc_print(1, x) /* action must be taken immediately */
#define pr_crit(x...) mmc_print(2, x) /* critical conditions */
#define pr_err(x...) mmc_print(3, x) /* error conditions */
#define pr_warn(x...) pr_warning(x)
#define pr_warning(x...) mmc_print(4, x) /* warning conditions */
#define pr_notice(x...) mmc_print(5, x) /* normal but significant condition */
#define pr_info(x...) mmc_print(6, x) /* informational */
#define pr_devel(x...) pr_debug(x)
#define pr_debug(x...) mmc_debug_print(7, x) /* debug-level message */
#else
#define mmc_print(level, x...) // map to empty
#endif /* end of LGE_CHANGE_E */
#endif /* _LINUX_DEBUG_LOG_H */
|