From: gabriel.fernandez@st.com (gabriel.fernandez at st.com)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 12/12] clk: stm32mp1: add Debug clocks
Date: Thu, 8 Mar 2018 17:54:05 +0100 [thread overview]
Message-ID: <1520528045-18330-13-git-send-email-gabriel.fernandez@st.com> (raw)
In-Reply-To: <1520528045-18330-1-git-send-email-gabriel.fernandez@st.com>
From: Gabriel Fernandez <gabriel.fernandez@st.com>
RCC manages clock for debug and trace.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
---
drivers/clk/clk-stm32mp1.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/clk/clk-stm32mp1.c b/drivers/clk/clk-stm32mp1.c
index b3a6ec4..f1d5967 100644
--- a/drivers/clk/clk-stm32mp1.c
+++ b/drivers/clk/clk-stm32mp1.c
@@ -260,6 +260,10 @@
"ck_mpu", "ck_axi", "ck_mcu", "pll4_p", "ck_hse", "ck_hsi"
};
+static const char * const ck_trace_src[] = {
+ "ck_axi"
+};
+
static const struct clk_div_table axi_div_table[] = {
{ 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 4 },
{ 4, 4 }, { 5, 4 }, { 6, 4 }, { 7, 4 },
@@ -280,6 +284,12 @@
{ 0 },
};
+static const struct clk_div_table ck_trace_div_table[] = {
+ { 0, 1 }, { 1, 2 }, { 2, 4 }, { 3, 8 },
+ { 4, 16 }, { 5, 16 }, { 6, 16 }, { 7, 16 },
+ { 0 },
+};
+
#define MAX_MUX_CLK 2
struct stm32_mmux {
@@ -1980,6 +1990,18 @@ enum {
_GATE(RCC_MCO2CFGR, 12, 0),
_MUX(RCC_MCO2CFGR, 0, 3, 0),
_DIV(RCC_MCO2CFGR, 4, 4, 0, NULL)),
+
+ /* Debug clocks */
+ FIXED_FACTOR(NO_ID, "ck_axi_div2", "ck_axi", 0, 1, 2),
+
+ GATE(DBG, "ck_apb_dbg", "ck_axi_div2", 0, RCC_DBGCFGR, 8, 0),
+
+ GATE(CK_DBG, "ck_sys_dbg", "ck_axi", 0, RCC_DBGCFGR, 8, 0),
+
+ COMPOSITE(CK_TRACE, "ck_trace", ck_trace_src, CLK_OPS_PARENT_ENABLE,
+ _GATE(RCC_DBGCFGR, 9, 0),
+ _NO_MUX,
+ _DIV(RCC_DBGCFGR, 0, 3, 0, ck_trace_div_table)),
};
struct stm32_clock_match_data {
--
1.9.1
next prev parent reply other threads:[~2018-03-08 16:54 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-08 16:53 [PATCH v2 00/12] Introduce STM32MP1 clock driver gabriel.fernandez at st.com
2018-03-08 16:53 ` [PATCH v2 01/12] dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings gabriel.fernandez at st.com
2018-03-09 23:53 ` Rob Herring
2018-03-12 9:06 ` Gabriel FERNANDEZ
2018-03-08 16:53 ` [PATCH v2 02/12] clk: stm32mp1: Introduce STM32MP1 clock driver gabriel.fernandez at st.com
2018-03-09 23:57 ` Rob Herring
2018-03-08 16:53 ` [PATCH v2 03/12] clk: stm32mp1: add MP1 gate for hse/hsi/csi oscillators gabriel.fernandez at st.com
2018-03-08 16:53 ` [PATCH v2 04/12] clk: stm32mp1: add Source Clocks for PLLs gabriel.fernandez at st.com
2018-03-08 16:53 ` [PATCH v2 05/12] clk: stm32mp1: add PLL clocks gabriel.fernandez at st.com
2018-03-08 16:53 ` [PATCH v2 06/12] clk: stm32mp1: add Post-dividers for PLL gabriel.fernandez at st.com
2018-03-08 16:54 ` [PATCH v2 07/12] clk: stm32mp1: add Sub System clocks gabriel.fernandez at st.com
2018-03-08 16:54 ` [PATCH v2 08/12] clk: stm32mp1: add Kernel timers gabriel.fernandez at st.com
2018-03-08 16:54 ` [PATCH v2 09/12] clk: stm32mp1: add Peripheral & Kernel Clocks gabriel.fernandez at st.com
2018-03-08 16:54 ` [PATCH v2 10/12] clk: stm32mp1: add RTC clock gabriel.fernandez at st.com
2018-03-08 16:54 ` [PATCH v2 11/12] clk: stm32mp1: add MCO clocks gabriel.fernandez at st.com
2018-03-08 16:54 ` gabriel.fernandez at st.com [this message]
2018-03-11 22:42 ` [PATCH v2 00/12] Introduce STM32MP1 clock driver Michael Turquette
2018-03-12 8:34 ` Gabriel FERNANDEZ
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1520528045-18330-13-git-send-email-gabriel.fernandez@st.com \
--to=gabriel.fernandez@st.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).