diff options
author | Xi Chen <xixi.chen@mediatek.com> | 2021-03-12 16:53:58 +0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-03-16 11:19:42 +0000 |
commit | 16b9bee9a900ff1231f062a19091067044367102 (patch) | |
tree | 66904f664c384f2788b8b2668814eee4fe9f5bbc /src/vendorcode/mediatek/mt8192/include | |
parent | 7c7d0b108480be9eec5d2fd9b0f18e8ee1c343b9 (diff) | |
download | coreboot-16b9bee9a900ff1231f062a19091067044367102.tar.gz coreboot-16b9bee9a900ff1231f062a19091067044367102.tar.bz2 coreboot-16b9bee9a900ff1231f062a19091067044367102.zip |
vendorcode/mt8192: change to short log macro names
Originally, log macro names are too long, and they use
double parentheses style: ((...)), which causes compile
or runtime error easily.
Now, change them to single parenthesis mode (...), and
use shorter name.
Signed-off-by: Xi Chen <xixi.chen@mediatek.com>
Change-Id: I2959dc1ba0dd40a8fb954406072f31cf14c26667
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/vendorcode/mediatek/mt8192/include')
-rw-r--r-- | src/vendorcode/mediatek/mt8192/include/dramc_common.h | 46 | ||||
-rw-r--r-- | src/vendorcode/mediatek/mt8192/include/sv_c_data_traffic.h | 2 |
2 files changed, 25 insertions, 23 deletions
diff --git a/src/vendorcode/mediatek/mt8192/include/dramc_common.h b/src/vendorcode/mediatek/mt8192/include/dramc_common.h index 04d07a025c53..599ebe935f4b 100644 --- a/src/vendorcode/mediatek/mt8192/include/dramc_common.h +++ b/src/vendorcode/mediatek/mt8192/include/dramc_common.h @@ -45,47 +45,49 @@ /**********************************************/ /* Priority of debug log */ /*--------------------------------------------*/ -/* mcSHOW_DBG_MSG: High */ -/* mcSHOW_DBG_MSG2: Medium High */ -/* mcSHOW_DBG_MSG3: Medium Low */ -/* mcSHOW_DBG_MSG4: Low */ +/* msg: High */ +/* msg2: Medium High */ +/* msg3: Medium Low */ +/* msg4: Low */ /**********************************************/ #define CALIBRATION_LOG 1 #if CALIBRATION_LOG -#define mcSHOW_DBG_MSG(_x_) {print _x_;} -#define mcSHOW_DBG_MSG2(_x_) //{print _x_;} -#define mcSHOW_ERR_MSG(_x_) {print _x_;} +#define msg(_x_...) { print(_x_); } +#define msg2(_x_...) // { print(_x_); } +#define err(_x_...) { print(_x_); } #else -#define mcSHOW_DBG_MSG(_x_) -#define mcSHOW_DBG_MSG2(_x_) -#define mcSHOW_ERR_MSG(_x_) +#define msg(_x_...) +#define msg2(_x_...) +#define err(_x_...) #endif -#define mcSHOW_DBG_MSG3(_x_) // {print _x_;} -#define mcSHOW_DBG_MSG4(_x_) -#define mcSHOW_DBG_MSG5(_x_) -#define mcSHOW_JV_LOG_MSG(_x_) +#define info(_x_...) msg(_x_) + +#define msg3(_x_...) // { print(_x_); } +#define msg4(_x_...) +#define msg5(_x_...) +#define jv_msg(_x_...) #if EYESCAN_LOG -#define mcSHOW_EYESCAN_MSG(_x_) {print _x_;} +#define eye_msg(_x_...) { print(_x_); } #else -#define mcSHOW_EYESCAN_MSG(_x_) //{print _x_;} +#define eye_msg(_x_...) //{ print(_x_); } #endif -#define mcSHOW_DBG_MSG5(_x_) -#define mcSHOW_TIME_MSG(_x_) -#define mcDUMP_REG_MSG(_x_) -#define mcFPRINTF(_x_) + +#define time_msg(_x_...) +#define reg_msg(_x_...) +#define mcFPRINTF(_x_...) #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof (x) / sizeof (x[0])) #endif #define enter_function() \ - ({mcSHOW_DBG_MSG(("enter %s\n", __FUNCTION__));}) + ( { msg("enter %s\n", __FUNCTION__); } ) #define exit_function() \ - ({mcSHOW_DBG_MSG(("exit %s\n", __FUNCTION__));}) + ( { msg("exit %s\n", __FUNCTION__); } ) extern int dump_log; #endif // _DRAMC_COMMON_H_ diff --git a/src/vendorcode/mediatek/mt8192/include/sv_c_data_traffic.h b/src/vendorcode/mediatek/mt8192/include/sv_c_data_traffic.h index 5f48baeb5f89..b1ec3ae9aa30 100644 --- a/src/vendorcode/mediatek/mt8192/include/sv_c_data_traffic.h +++ b/src/vendorcode/mediatek/mt8192/include/sv_c_data_traffic.h @@ -8,7 +8,7 @@ #define print_svarg(arg) \ ({ \ - mcSHOW_DBG_MSG((TOSTRING(arg) "=0x%x\n", psra->arg)); \ + msg(TOSTRING(arg) "=0x%x\n", psra->arg); \ }) /* |