summaryrefslogtreecommitdiffstats
path: root/drivers/clk/imx/clk-frac-pll.c
Commit message (Collapse)AuthorAgeFilesLines
* clk: introduce struct clk_hwSascha Hauer2021-06-071-19/+19
| | | | | | | | | | | | | | | | | | | In Linux the ops in struct clk_ops take a struct clk_hw * argument instead of a struct clk * argument as in barebox. With this taking new clk drivers from Linux requires a lot of mechanical conversions. Instead of doing this over and over again swallow the pill once and convert the existing barebox code over to clk_hw. The implementation is a little different from Linux. In Linux struct clk is only known to the core clock code. In barebox struct clk is publically known and it is embedded into struct clk_hw. This allows us to still use struct clk members in the clock drivers which we currently still need, because otherwise this patch would be even bigger. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.barebox.org/20210602095507.24609-5-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: rename clk_register() to bclk_register()Sascha Hauer2021-06-071-1/+1
| | | | | | | | | | | | Linux has a clk_register() function with a different semantics than barebox. Rename this function to bclk_register() so that we later can introduce a clk_register() function with the same semantics as Linux. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210602095507.24609-4-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: include <linux/math64.h> wrapper instead of <asm-generic/div64.h>Ahmad Fatoum2021-02-191-1/+1
| | | | | | | | | | | <asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may override this on a per-architecture basis. We don't do that currently, but in the future we might. Include the <linux/math64.h> instead. No functional change. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: imx: clk-frac-pll: Use do_div for 64bit divisionSascha Hauer2020-09-181-1/+1
| | | | | | Use do_div() to avoid undefined references to `__aeabi_uldivmod' Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: migrate to SPDX-License-Identifier useAhmad Fatoum2020-04-151-7/+1
| | | | | | | | | | | | Some of these are a product of source sync with Linux, the other were done with macro assistance by searching for /later/, deleting license text, adding appropriate SPDX-License-Identifier and manual post-review. Devices without a license indicated where assumed GPL-2.0-only according with the project's license. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clock: Add i.MX8MQ clock driverSascha Hauer2018-06-111-0/+226
This is based on Lucas' patch sent as "[PATCH v2 4/4] clk: imx: add clock driver for i.MX8MQ CCM" to the mailing list. It will likely need some rework before it is finally merged, so apply the reworks here before merging into barebox. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> [andrew.smirnov@gmail.com: Fix pll type for IMX8MQ_VIDEO2_PLL1] Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>