summaryrefslogtreecommitdiffstats
path: root/drivers/clk/zynqmp/clk-gate-zynqmp.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: Zynqmp: Move mach header files to include/mach/zynqmpSascha Hauer2023-03-061-1/+1
| | | | | | | | | | Currently arch specific headers can be included with possible as there won't be a single mach anymore. Move all Zynqmp specific header files to include/mach/zynqmp/ to prepare for multi-arch support. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* drivers: migrate "GPL-2.0" license identifiers to SPDX 2.0Roland Hieber2021-11-221-1/+1
| | | | | | | | | | "GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier "GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>. Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier") Signed-off-by: Roland Hieber <rhi@pengutronix.de> Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: zynqmp: do not enable already enabled clocksMichael Tretter2021-06-251-0/+3
| | | | | | | | | | | | | | | | The pmu fw manages the permissions who can enable/disable the clocks. There are a few clocks (TOPSW_LSBUS and LSBUS) which are exposed to Barebox and Barebox assumes that is has to enable the clocks. However, the pmu fw considers the clocks under its control and returns a permission denied for the clock enable request. Assume that clocks that are already enabled don't need to be enable by Barebox to avoid the permission denied errors. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Link: https://lore.barebox.org/20210624150054.1205422-3-m.tretter@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* clk: introduce struct clk_hwSascha Hauer2021-06-071-15/+15
| | | | | | | | | | | | | | | | | | | 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>
* clk: add ZynqMP clock driverMichael Tretter2019-03-181-0/+93
The ZynqMP has a platform management unit (PMU) that is responsible for managing the clocks. Therefore, the clock driver uses the firmware driver to control the clocks. The Barebox driver is based on the Linux driver, but contains deviations to make the driver more readable and more consistent. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>