From: "Sascha Hauer" <s.hauer@pengutronix.de>
To: "Oleksij Rempel" <o.rempel@pengutronix.de>
Cc: barebox@lists.infradead.org, "Oleksij Rempel" <o.rempel@pengutronix.de>
Subject: Re: [PATCH v1 03/10] clk: add Microchip LAN966X / LAN969X generic clock controller driver
Date: Mon, 15 Jun 2026 07:46:20 +0000 [thread overview]
Message-ID: <E1wZ21U-00000006G4m-2Squ@pty.whiteo.stw.pengutronix.de> (raw)
In-Reply-To: <20260612055930.635833-3-o.rempel@pengutronix.de>
On 2026-06-12 07:59, Oleksij Rempel wrote:
> Port the Microchip LAN966X Generic Clock Controller (GCK) driver from
> the Linux kernel. GCK generates and supplies clocks to peripherals on
> the LAN966X and LAN969X switch SoCs (UART, SDHCI, QSPI, SGPIO, ...).
>
> Ported from Linux drivers/clk/clk-lan966x.c at tag v7.1-rc7
> Barebox-specific deltas:
> - probe() takes `struct device *` instead of `platform_device`
> - no devm_* - explicit kfree on probe failure
> - clk_parent_data carries both `.fw_name` (for Linux source-compat) and
> `.name` (used by barebox at register time, since barebox's clk
> framework does not resolve `fw_name` via clock-names).
> - Linux's `.determine_rate` is implemented here as `.round_rate`.
>
> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> ---
> drivers/clk/Kconfig | 9 ++
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-lan966x.c | 325 ++++++++++++++++++++++++++++++++++++++
> 3 files changed, 335 insertions(+)
> create mode 100644 drivers/clk/clk-lan966x.c
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index d2a61329e125..fe7056f8971b 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -84,4 +84,13 @@ config COMMON_CLK_GPIO
>
> source "drivers/clk/sifive/Kconfig"
>
> +config COMMON_CLK_LAN966X
> + bool "Generic Clock Controller driver for LAN966X SoC"
> + depends on OFDEVICE
> + depends on COMMON_CLK
> + help
> + Microchip LAN966X and LAN969X SoC Generic Clock Controller (GCK).
> + GCK generates and supplies clocks to various peripherals within the
> + SoC.
> +
> endif
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index 4fda2c1e0dd3..d7e06de04230 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -33,3 +33,4 @@ obj-$(CONFIG_COMMON_CLK_SCMI) += clk-scmi.o
> obj-$(CONFIG_COMMON_CLK_GPIO) += clk-gpio.o
> obj-$(CONFIG_TI_SCI_CLK) += ti-sci-clk.o
> obj-$(CONFIG_ARCH_K3) += k3/
> +obj-$(CONFIG_COMMON_CLK_LAN966X) += clk-lan966x.o
> diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c
> new file mode 100644
> index 000000000000..a2f43b2f8dce
> --- /dev/null
> +++ b/drivers/clk/clk-lan966x.c
> @@ -0,0 +1,325 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Microchip LAN966x SoC Clock driver.
> + *
> + * Copyright (C) 2021 Microchip Technology, Inc. and its subsidiaries
> + *
> + * Author: Kavyasree Kotagiri <kavyasree.kotagiri@microchip.com>
> + *
> + * Ported from Linux drivers/clk/clk-lan966x.c. Structure and identifiers
> + * are kept aligned with Linux so future fixes can be backported with
> + * minimal context churn.
We have a new // SPDX-Comment: Origin-URL: tag which you could use here
and other code you are adding from Linux.
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 |
next prev parent reply other threads:[~2026-06-15 7:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 5:59 [PATCH v1 01/10] ARM: introduce ARCH_MICROCHIP for ARM64 Microchip SoCs Oleksij Rempel
2026-06-12 5:59 ` [PATCH v1 02/10] serial: atmel: add lan9696 (Microchip LAN969X) support Oleksij Rempel
2026-06-12 12:49 ` Marco Felsch
2026-06-12 5:59 ` [PATCH v1 03/10] clk: add Microchip LAN966X / LAN969X generic clock controller driver Oleksij Rempel
2026-06-12 12:58 ` Marco Felsch
2026-06-15 7:02 ` Sascha Hauer
2026-06-15 7:46 ` Sascha Hauer [this message]
2026-06-12 5:59 ` [PATCH v1 04/10] clk: tolerate clocks registered without a name Oleksij Rempel
2026-06-12 5:59 ` [PATCH v1 05/10] pinctrl: ocelot: port Microsemi/Microchip Ocelot pinctrl from Linux Oleksij Rempel
2026-06-12 5:59 ` [PATCH v1 06/10] mci: atmel-sdhci: add Microchip LAN9691 / LAN969X SDHCI support Oleksij Rempel
2026-06-15 6:17 ` Marco Felsch
2026-06-15 7:25 ` Sascha Hauer
2026-06-12 5:59 ` [PATCH v1 07/10] gpio: add Microchip SGPIO (serial GPIO) driver Oleksij Rempel
2026-06-15 7:32 ` Sascha Hauer
2026-06-12 5:59 ` [PATCH v1 08/10] reset: add Microchip sparx5 / LAN969X / LAN966X switch reset driver Oleksij Rempel
2026-06-12 5:59 ` [PATCH v1 09/10] spi: atmel-quadspi: add Microchip LAN966X / LAN969X support Oleksij Rempel
2026-06-12 5:59 ` [PATCH v1 10/10] ARM: add Microchip LAN9696 (LAN969X) SoC and EV23X71A board Oleksij Rempel
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=E1wZ21U-00000006G4m-2Squ@pty.whiteo.stw.pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=o.rempel@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