diff options
author | Taniya Das <tdas@codeaurora.org> | 2017-01-27 16:48:48 +0530 |
---|---|---|
committer | Taniya Das <tdas@codeaurora.org> | 2017-02-14 09:56:09 +0530 |
commit | e2ff0d9bb2df29c908c8766115765355d55b1601 (patch) | |
tree | 518f97870df005f17d6e9ace0662c02896211458 /drivers/clk/qcom/common.h | |
parent | 2e47ba9a64f870431dd7709f454ba51dca0f89e9 (diff) |
clk: qcom: Add support to log PLL/RCGR values in case of failure
In case of PLL lock errors or the RCGR fails to update the new
configuration, add support to capture all the PLL and RCGR
configuration registers as part of kernel logs.
Change-Id: Ifb0cefafc30f8796ba17f2d388fb65ed41aae485
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Diffstat (limited to 'drivers/clk/qcom/common.h')
-rw-r--r-- | drivers/clk/qcom/common.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/clk/qcom/common.h b/drivers/clk/qcom/common.h index 76c010970b51..103959cd54a4 100644 --- a/drivers/clk/qcom/common.h +++ b/drivers/clk/qcom/common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2016, The Linux Foundation. All rights reserved. + * Copyright (c) 2014, 2016-2017, The Linux Foundation. All rights reserved. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -13,6 +13,8 @@ #ifndef __QCOM_CLK_COMMON_H__ #define __QCOM_CLK_COMMON_H__ +#include "../clk.h" + struct platform_device; struct regmap_config; struct clk_regmap; @@ -143,4 +145,19 @@ struct clk_debug_mux { extern const struct clk_ops clk_debug_mux_ops; +#define WARN_CLK(core, name, cond, fmt, ...) do { \ + clk_debug_print_hw(core, NULL); \ + WARN(cond, "%s: " fmt, name, ##__VA_ARGS__); \ +} while (0) + +#define clock_debug_output(m, c, fmt, ...) \ +do { \ + if (m) \ + seq_printf(m, fmt, ##__VA_ARGS__); \ + else if (c) \ + pr_cont(fmt, ##__VA_ARGS__); \ + else \ + pr_info(fmt, ##__VA_ARGS__); \ +} while (0) + #endif |