mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v2 07/10] clk: socfpga: add agilex5 clock support
Date: Wed, 19 Feb 2025 13:21:04 +0100	[thread overview]
Message-ID: <Z7XMsHmKuUrCL3o2@pengutronix.de> (raw)
In-Reply-To: <20250218-v2024-10-0-topic-socfpga-agilex5-v2-7-30b6f507810b@pengutronix.de>

On Tue, Feb 18, 2025 at 10:21:32AM +0100, Steffen Trumtrar wrote:
> Add support for the Stratix10 and Agilex5 pll,gate and periph clocks.
> 
> Only tested on Agilex5.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  drivers/clk/socfpga/Makefile         |   4 +-
>  drivers/clk/socfpga/clk-agilex5.c    | 833 +++++++++++++++++++++++++++++++++++
>  drivers/clk/socfpga/clk-gate-s10.c   | 184 ++++++++
>  drivers/clk/socfpga/clk-periph-s10.c | 163 +++++++
>  drivers/clk/socfpga/clk-pll-s10.c    | 140 ++++++
>  drivers/clk/socfpga/clk.h            |   9 +
>  drivers/clk/socfpga/stratix10-clk.h  |  73 +++
>  7 files changed, 1405 insertions(+), 1 deletion(-)
> 
> +
> +static int socfpga_gate_get_parent(struct clk_hw *hwclk)
> +{
> +	struct socfpga_gate_clk *socfpgaclk = to_socfpga_gate_clk(hwclk);
> +	u32 mask, second_bypass;
> +	u8 parent = 0;
> +	const char *name = clk_hw_get_name(hwclk);
> +
> +printk("%s: %s\n", __func__, name);
> +
> +	if (socfpgaclk->bypass_reg) {
> +		mask = (0x1 << socfpgaclk->bypass_shift);
> +		parent = ((readl(socfpgaclk->bypass_reg) & mask) >>
> +			  socfpgaclk->bypass_shift);
> +printk("%s: parent %d\n", __func__, parent);

Debugging leftovers.

Sascha


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2025-02-19 12:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-18  9:21 [PATCH v2 00/10] ARM: SoCFPGA: Add initial support for Agilex5 Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 01/10] ARM: socfpga: kconfig: sort entries Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 02/10] mach: socfpga: debug_ll: rework putc_ll Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 03/10] reset: reset-socfpga: build only for 32-bit socfpga Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 04/10] arm: socfgpa: add support for SoCFPGA Agilex5 Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 05/10] linux: clk: add clk_parent_data Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 06/10] clk: support init->parent_data Steffen Trumtrar
2025-02-18  9:21 ` [PATCH v2 07/10] clk: socfpga: add agilex5 clock support Steffen Trumtrar
2025-02-19 12:21   ` Sascha Hauer [this message]
2025-02-18  9:21 ` [PATCH v2 08/10] net: phy: add Analog Devices ADIN1300 Steffen Trumtrar
2025-02-19 12:20   ` Sascha Hauer
2025-02-18  9:21 ` [PATCH v2 09/10] net: add support for Designware XGMAC (10gb) ethernet Steffen Trumtrar
2025-02-19 13:47   ` Sascha Hauer
2025-02-18  9:21 ` [PATCH v2 10/10] ARM: socfpga: add Arrow AXE5 Agilex5 board Steffen Trumtrar
2025-02-19 13:54   ` Sascha Hauer

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=Z7XMsHmKuUrCL3o2@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@pengutronix.de \
    /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