clk: at91: sync with Linux v5.6
Subsystems (22)
cover clk: at91: sync with Linux v5.6
During a bug hunt that ultimately turned out unrelated to the state of the barebox at91 clk driver, I synchronized its state with Linux v5.6.
This imports it, after cleanup. It refactors other code a bit to reduce the diff for the final port and future ones. What we gain from this:
- bug fixes that have been posted upstream in the meanwhile
- sam9x60 (new Microchip ARM926EJ-S) clock support
- sama5d2 audio PLL
- Some more helpers to make code porting slightly easier
- SPDX-License-Identifiers, not only for at91 clks, but for all of drivers/clk
Cheers,
Ahmad Fatoum (17):
mfd: syscon: enable specified clocks on syscon_base_lookup_by_phandle
mfd: syscon: refactor of_syscon_register compatible check
mfd: syscon: implement device_node_to_regmap
regmap: retire of_node_to_regmap in favor of device_node_to_regmap
ARM: include: remove unused <asm/processor.h>
treewide: use cpu_relax() where appropriate
of: port Linux of_get_compatible_child helper
clk: implement clk_register_fixed_rate
clk: add clk_unregister stub
include: linux/kernel.h: port DIV_ROUND_CLOSEST_ULL definition
clk: migrate to SPDX-License-Identifier use
clk: at91: delete no-longer required DT compat code
clk: at91: compile dt-compat for all platforms that require it
clk: at91: add __init marker where appropriate
clk: at91: add sama5d2 audio PLL support
clk: at91: port Linux v5.6 SAM9X60 (new ARM926EJ-S) clock support
clk: at91: sckc: fix off-by-1000 in udelay()
Alexandre Belloni (2):
clk: at91: fix masterck name
clk: at91: fix possible deadlock
Eugen Hristev (1):
clk: at91: allow 24 Mhz clock as input for PLL
Stephen Boyd (1):
clk: at91: Mark struct clk_range as const
arch/arm/include/asm/processor.h | 131 ------ arch/arm/mach-at91/Kconfig | 19 + arch/arm/mach-omap/omap4_rom_usb.c | 6 +- drivers/base/regmap/regmap-mmio.c | 5 +- drivers/base/regmap/regmap.c | 20 - drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/at91/Makefile | 15 +- drivers/clk/at91/at91sam9260.c | 16 +- drivers/clk/at91/at91sam9rl.c | 4 +- drivers/clk/at91/at91sam9x5.c | 18 +- drivers/clk/at91/clk-audio-pll.c | 512 ++++++++++++++++++++++++ drivers/clk/at91/clk-generated.c | 68 ++-- drivers/clk/at91/clk-h32mx.c | 9 +- drivers/clk/at91/clk-i2s-mux.c | 87 ++++ drivers/clk/at91/clk-main.c | 25 +- drivers/clk/at91/clk-master.c | 16 +- drivers/clk/at91/clk-peripheral.c | 54 +-- drivers/clk/at91/clk-pll.c | 21 +- drivers/clk/at91/clk-plldiv.c | 9 +- drivers/clk/at91/clk-programmable.c | 53 ++- drivers/clk/at91/clk-sam9x60-pll.c | 322 +++++++++++++++ drivers/clk/at91/clk-slow.c | 7 +- drivers/clk/at91/clk-smd.c | 9 +- drivers/clk/at91/clk-system.c | 9 +- drivers/clk/at91/clk-usb.c | 44 +- drivers/clk/at91/clk-utmi.c | 7 +- drivers/clk/at91/dt-compat.c | 140 +------ drivers/clk/at91/pmc.c | 19 +- drivers/clk/at91/pmc.h | 91 +++-- drivers/clk/at91/sam9x60.c | 313 +++++++++++++++ drivers/clk/at91/sama5d2.c | 79 +++- drivers/clk/at91/sama5d4.c | 14 +- drivers/clk/at91/sckc.c | 387 +++++++++++------- drivers/clk/clk-ar933x.c | 13 +- drivers/clk/clk-ar9344.c | 10 +- drivers/clk/clk-composite.c | 13 +- drivers/clk/clk-conf.c | 5 +- drivers/clk/clk-divider.c | 12 +- drivers/clk/clk-fixed-factor.c | 12 +- drivers/clk/clk-fixed.c | 28 +- drivers/clk/clk-fractional-divider.c | 5 +- drivers/clk/clk-gate-shared.c | 12 +- drivers/clk/clk-gate.c | 12 +- drivers/clk/clk-gpio.c | 12 +- drivers/clk/clk-mux.c | 12 +- drivers/clk/clk-qoric.c | 5 +- drivers/clk/clk.c | 12 +- drivers/clk/clkdev.c | 5 +- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-cpu.c | 8 +- drivers/clk/imx/clk-frac-pll.c | 8 +- drivers/clk/imx/clk-gate-exclusive.c | 5 +- drivers/clk/imx/clk-gate2.c | 12 +- drivers/clk/imx/clk-imx1.c | 14 +- drivers/clk/imx/clk-imx21.c | 15 +- drivers/clk/imx/clk-imx25.c | 15 +- drivers/clk/imx/clk-imx27.c | 1 + drivers/clk/imx/clk-imx31.c | 14 +- drivers/clk/imx/clk-imx35.c | 6 +- drivers/clk/imx/clk-imx5.c | 6 +- drivers/clk/imx/clk-imx6.c | 8 +- drivers/clk/imx/clk-imx6sl.c | 8 +- drivers/clk/imx/clk-imx6sx.c | 8 +- drivers/clk/imx/clk-imx6ul.c | 8 +- drivers/clk/imx/clk-imx7.c | 10 +- drivers/clk/imx/clk-pfd.c | 8 +- drivers/clk/imx/clk-pllv1.c | 14 +- drivers/clk/imx/clk-pllv2.c | 14 +- drivers/clk/imx/clk-pllv3.c | 14 +- drivers/clk/imx/clk-sccg-pll.c | 8 +- drivers/clk/imx/clk-vf610.c | 7 +- drivers/clk/imx/clk.c | 1 + drivers/clk/imx/clk.h | 1 + drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-370.c | 5 +- drivers/clk/mvebu/armada-38x.c | 5 +- drivers/clk/mvebu/armada-xp.c | 5 +- drivers/clk/mvebu/common.c | 5 +- drivers/clk/mvebu/common.h | 5 +- drivers/clk/mvebu/corediv.c | 5 +- drivers/clk/mvebu/dove.c | 5 +- drivers/clk/mvebu/kirkwood.c | 5 +- drivers/clk/mxs/Makefile | 1 + drivers/clk/mxs/clk-div.c | 8 +- drivers/clk/mxs/clk-frac.c | 8 +- drivers/clk/mxs/clk-imx23.c | 14 +- drivers/clk/mxs/clk-imx28.c | 14 +- drivers/clk/mxs/clk-lcdif.c | 1 + drivers/clk/mxs/clk-pll.c | 8 +- drivers/clk/mxs/clk-ref.c | 8 +- drivers/clk/mxs/clk.h | 1 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-cpu.c | 5 +- drivers/clk/rockchip/clk-pll.c | 11 +- drivers/clk/rockchip/clk-rk3188.c | 11 +- drivers/clk/rockchip/clk-rk3288.c | 11 +- drivers/clk/rockchip/clk.c | 11 +- drivers/clk/rockchip/clk.h | 11 +- drivers/clk/socfpga/Makefile | 1 + drivers/clk/socfpga/clk-gate-a10.c | 13 +- drivers/clk/socfpga/clk-periph-a10.c | 13 +- drivers/clk/socfpga/clk-pll-a10.c | 13 +- drivers/clk/socfpga/clk.c | 10 +- drivers/clk/socfpga/clk.h | 11 +- drivers/clk/tegra/Makefile | 1 + drivers/clk/tegra/clk-divider.c | 13 +- drivers/clk/tegra/clk-periph.c | 13 +- drivers/clk/tegra/clk-pll-out.c | 13 +- drivers/clk/tegra/clk-pll.c | 13 +- drivers/clk/tegra/clk-tegra124.c | 13 +- drivers/clk/tegra/clk-tegra20.c | 13 +- drivers/clk/tegra/clk-tegra30.c | 13 +- drivers/clk/tegra/clk.c | 13 +- drivers/clk/tegra/clk.h | 13 +- drivers/clk/vexpress/Makefile | 1 + drivers/clk/vexpress/clk-sp810.c | 10 +- drivers/clk/vexpress/clk-vexpress-osc.c | 11 +- drivers/clk/zynq/Makefile | 1 + drivers/clk/zynq/clkc.c | 13 +- drivers/clk/zynqmp/Makefile | 1 + drivers/mfd/syscon.c | 36 +- drivers/mtd/nand/nand_denali.c | 8 +- drivers/of/base.c | 25 ++ include/linux/barebox-wrapper.h | 2 + include/linux/clk.h | 13 +- include/linux/clk/at91_pmc.h | 59 ++- include/linux/kernel.h | 13 + include/mfd/syscon.h | 5 + include/of.h | 8 + include/regmap.h | 3 +- 131 files changed, 2110 insertions(+), 1356 deletions(-) delete mode 100644 arch/arm/include/asm/processor.h create mode 100644 drivers/clk/at91/clk-audio-pll.c create mode 100644 drivers/clk/at91/clk-i2s-mux.c create mode 100644 drivers/clk/at91/clk-sam9x60-pll.c create mode 100644 drivers/clk/at91/sam9x60.c
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/21 mfd: syscon: enable specified clocks on syscon_base_lookup_by_phandle
Since commit b36b7b72 ("mfd: syscon: clock peripheral if specified in device tree"), we now clock syscons during access if the device tree nodes indicate a clocks property. We haven't been doing this for syscon_base_lookup_by_phandle though, because we did this as part of the regmap access functions.
The best way forward is probably dropping the syscon_base API altogether and change users to the regmap API instead, but for now, make the behavior consistent, by detaching the clock and enabling it permanently, so:
- We are safe from breakage that results from upstream device trees moving a clocks property from the consumer to the syscon provider (like in [1])
- Another syscon consumer can't disable the clock for a syscon that's also shared via a syscon_base_lookup_by_phandle
I've reviewed the current driver code users of syscon_base_lookup_by_phandle and all upstream device trees that match against the drivers lack a clocks property, so this shouldn't alter behavior (for now).
[1]: c9322d4fe ("net: designware: eqos: stm32: drop no longer needed syscfg-clk")
--- drivers/base/regmap/regmap-mmio.c | 5 ++++- drivers/mfd/syscon.c | 4 ++++ include/regmap.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-)
drivers/base/regmap/regmap-mmio.c +4 -1
@@ -308,9 +308,12 @@ int regmap_mmio_attach_clk(struct regmap *map, struct clk *clk)return 0 ; } -void regmap_mmio_detach_clk (struct regmap *map) +struct clk *regmap_mmio_detach_clk (struct regmap *map) {struct regmap_mmio_context *ctx = map->bus_context; +struct clk *clk = ctx->clk; ctx->clk =NULL ; + +return clk; }
drivers/mfd/syscon.c +4 -0
@@ -128,10 +128,14 @@ static struct syscon *node_to_syscon(struct device_node *np)static void __iomem *syscon_node_to_base (struct device_node *np) {struct syscon *syscon =node_to_syscon (np); +struct clk *clk;if (IS_ERR (syscon))return ERR_CAST (syscon); + clk =regmap_mmio_detach_clk (syscon->regmap); +clk_enable (clk); +return syscon->base; }
include/regmap.h +1 -1
@@ -91,7 +91,7 @@ struct regmap *regmap_init_mmio_clk(struct device_d *dev, const char *clk_id,int regmap_mmio_attach_clk (struct regmap *map,struct clk *clk); -void regmap_mmio_detach_clk (struct regmap *map); +struct clk *regmap_mmio_detach_clk (struct regmap *map);void regmap_exit (struct regmap *map);
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 01/21] mfd: syscon: enable specified clocks on syscon_base_lookup_by_phandle
Hello Sascha,
Quoted 5 lines · Ahmad Fatoum
Since commit
b36b7b72("mfd: syscon: clock peripheral if specified in device tree"), we now clock syscons during access if the device tree nodes indicate a clocks property. We haven't been doing this forsyscon_base_lookup_by_phandlethough, because we did this as part of the regmap access functions.
I've sent a v2 of only this patch here. Please consider taking the other one and applying the rest of the series on top.
Cheers
Ahmad
Signature · 9 lines
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 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/21 mfd: syscon: refactor of_syscon_register compatible check
In reply to Ahmad FatoumLinux also provides a device_node_to_regmap function that doesn't do a compatible = "syscon" check. In preparation for having it in barebox, factor out the compatible check into the callers.
While at it make the clock checking explicit, so the diff clearly indicates, we touched all instances and to prepare for follow-up commits.
No functional change.
--- drivers/mfd/syscon.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
drivers/mfd/syscon.c +12 -7
@@ -46,9 +46,6 @@ static struct syscon *of_syscon_register(struct device_node *np, bool check_clk)int ret;struct resource res; -if (!of_device_is_compatible (np,"syscon" )) -return ERR_PTR (-EINVAL ); - syscon =xzalloc (sizeof (*syscon));if (of_address_to_resource (np,0 , &res)) {
@@ -106,7 +103,7 @@ err_map:return ERR_PTR (ret); } -static struct syscon *node_to_syscon (struct device_node *np) +static struct syscon *node_to_syscon (struct device_node *np,bool check_clk) {struct syscon *entry, *syscon =NULL ;
@@ -117,7 +114,7 @@ static struct syscon *node_to_syscon(struct device_node *np) }if (!syscon) - syscon =of_syscon_register (np, true); + syscon =of_syscon_register (np, check_clk);if (IS_ERR (syscon))return ERR_CAST (syscon);
@@ -127,9 +124,13 @@ static struct syscon *node_to_syscon(struct device_node *np)static void __iomem *syscon_node_to_base (struct device_node *np) { -struct syscon *syscon =node_to_syscon (np); +struct syscon *syscon;struct clk *clk; +if (!of_device_is_compatible (np,"syscon" )) +return ERR_PTR (-EINVAL ); + + syscon =node_to_syscon (np, true);if (IS_ERR (syscon))return ERR_CAST (syscon);
@@ -172,8 +173,12 @@ void __iomem *syscon_base_lookup_by_phandle(struct device_node *np,struct regmap *syscon_node_to_regmap (struct device_node *np) { -struct syscon *syscon =node_to_syscon (np); +struct syscon *syscon; + +if (!of_device_is_compatible (np,"syscon" )) +return ERR_PTR (-EINVAL ); + syscon =node_to_syscon (np, true);if (IS_ERR (syscon))return ERR_CAST (syscon);
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 3/21 mfd: syscon: implement device_node_to_regmap
In reply to Ahmad FatoumExtend our syscon API with a device_node_to_regmap function that has the same semantics as upstream:
__________________________________________________________________________
| Linux commit 39233b7c611248c0d05209b4854bc63e26485655 | CommitDate: Thu Aug 8 15:30:07 2019 -0700 | | mfd/syscon: Add device_node_to_regmap() | | device_node_to_regmap() is exactly like syscon_node_to_regmap(), but it | does not check that the node is compatible with "syscon", and won't | attach the first clock it finds to the regmap. | | The rationale behind this, is that one device node with a standard | compatible string "foo,bar" can be covered by multiple drivers sharing a | regmap, or by a single driver doing all the job without a regmap, but | these are implementation details which shouldn't reflect on the | devicetree. | | Signed-off-by: Paul Cercueil <[email protected]> | Acked-by: Arnd Bergmann <[email protected]> | Signed-off-by: Paul Burton <[email protected]> |__________________________________________________________________________
--- drivers/mfd/syscon.c | 21 ++++++++++++++++----- include/mfd/syscon.h | 5 +++++ 2 files changed, 21 insertions(+), 5 deletions(-)
drivers/mfd/syscon.c +16 -5
@@ -171,20 +171,31 @@ void __iomem *syscon_base_lookup_by_phandle(struct device_node *np,return syscon_node_to_base (syscon_np); } -struct regmap *syscon_node_to_regmap (struct device_node *np) +static struct regmap *__device_node_to_regmap (struct device_node *np, +bool check_clk) {struct syscon *syscon; -if (!of_device_is_compatible (np,"syscon" )) -return ERR_PTR (-EINVAL ); - - syscon =node_to_syscon (np, true); + syscon =node_to_syscon (np, check_clk);if (IS_ERR (syscon))return ERR_CAST (syscon);return syscon->regmap; } +struct regmap *device_node_to_regmap (struct device_node *np) +{ +return __device_node_to_regmap (np, false); +} + +struct regmap *syscon_node_to_regmap (struct device_node *np) +{ +if (!of_device_is_compatible (np,"syscon" )) +return ERR_PTR (-EINVAL ); + +return __device_node_to_regmap (np, true); +} +struct regmap *syscon_regmap_lookup_by_compatible (const char *s) {struct device_node *syscon_np;
include/mfd/syscon.h +5 -0
@@ -21,6 +21,7 @@ void __iomem *syscon_base_lookup_by_pdevname(const char *s);void __iomem *syscon_base_lookup_by_phandle (struct device_node *np,const char *property);struct regmap *syscon_node_to_regmap (struct device_node *np); +struct regmap *device_node_to_regmap (struct device_node *np);struct regmap *syscon_regmap_lookup_by_compatible (const char *s); extern struct regmap *syscon_regmap_lookup_by_phandle( struct device_node *np,
@@ -41,6 +42,10 @@ static inline struct regmap *syscon_node_to_regmap(struct device_node *np) {return ERR_PTR (-ENOSYS ); } +static inline struct regmap *device_node_to_regmap (struct device_node *np) +{ +return ERR_PTR (-ENOSYS ); +}static inline struct regmap *syscon_regmap_lookup_by_compatible (const char *s) {return ERR_PTR (-ENOSYS );
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 4/21 regmap: retire of_node_to_regmap in favor of device_node_to_regmap
In reply to Ahmad Fatoumdevice_node_to_regmap is the current upstream API for this and is more general, because it allocates a regmap on demand if none exists.
As of_node_to_regmap is unused anywhere, remove it.
--- drivers/base/regmap/regmap.c | 20 -------------------- include/regmap.h | 1 - 2 files changed, 21 deletions(-)
drivers/base/regmap/regmap.c +0 -20
@@ -132,26 +132,6 @@ struct regmap *dev_get_regmap(struct device_d *dev, const char *name)return ERR_PTR (-ENOENT ); } -/* -* of_node_to_regmap - get a regmap from a device node -* -* node: The device node -* -* Returns a pointer to the regmap or a ERR_PTR if the node has no -* regmap attached. -*/ -struct regmap *of_node_to_regmap (struct device_node *node) -{ -struct regmap *map; - -list_for_each_entry (map, ®maps, list) { -if (map->dev && map->dev->device_node == node) -return map; - } - -return ERR_PTR (-ENOENT ); -} -/* * regmap_write - write a register in a map *
include/regmap.h +0 -1
@@ -96,7 +96,6 @@ struct clk *regmap_mmio_detach_clk(struct regmap *map);void regmap_exit (struct regmap *map);struct regmap *dev_get_regmap (struct device_d *dev,const char *name); -struct regmap *of_node_to_regmap (struct device_node *node);int regmap_register_cdev (struct regmap *map,const char *name);
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 5/21 ARM: include: remove unused <asm/processor.h>
In reply to Ahmad FatoumFile has been in source tree for 17 years and is unused. Drop it. The only definition we might want out of the file is cpu_relax(), which we already open code as barrier() with a comment in a couple of places. Move the definition to <linux/barebox-wrapper.h> and drop the file altogether.
No functional change.
--- arch/arm/include/asm/processor.h | 131 ------------------------------- include/linux/barebox-wrapper.h | 2 + 2 files changed, 2 insertions(+), 131 deletions(-) delete mode 100644 arch/arm/include/asm/processor.h
arch/arm/include/asm/processor.h deleted +0 -131
@@ -1,131 +0,0 @@ -/* -* linux/include/asm-arm/processor.h -* -* Copyright (C) 1995-2002 Russell King -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARM_PROCESSOR_H -#define __ASM_ARM_PROCESSOR_H - -/* -* Default implementation of macro that returns current -* instruction pointer ("program counter"). -*/ -#define current_text_addr () ({ __label__ _l; _l: &&_l;}) - -#define FP_SIZE 35 - -struct fp_hard_struct { -unsigned int save[FP_SIZE ];/* as yet undefined */ -}; - -struct fp_soft_struct { -unsigned int save[FP_SIZE ];/* undefined information */ -}; - -union fp_state { -struct fp_hard_struct hard; -struct fp_soft_struct soft; -}; - -typedef unsigned long mm_segment_t ;/* domain register */ - -#ifdef __KERNEL__ - -#define EISA_bus 0 -#define MCA_bus 0 -#define MCA_bus__is_a_macro - -#include <asm/atomic.h> -#include <asm/ptrace.h> -#include <asm/proc/processor.h> -#include <asm/types.h> - -union debug_insn { -u32 arm; -u16 thumb; -}; - -struct debug_entry { -u32 address; -union debug_insn insn; -}; - -struct debug_info { -int nsaved; -struct debug_entry bp[2 ]; -}; - -struct thread_struct { -atomic_t refcount; -/* fault info */ -unsigned long address; -unsigned long trap_no; -unsigned long error_code; -/* floating point */ -union fp_state fpstate; -/* debugging */ -struct debug_info debug; -/* context info */ -struct context_save_struct *save; - EXTRA_THREAD_STRUCT -}; - -#define INIT_THREAD { \ - refcount: ATOMIC_INIT(1), \ - EXTRA_THREAD_STRUCT_INIT \ -} - -/* -* Return saved PC of a blocked thread. -*/ -static inline unsigned long thread_saved_pc (struct thread_struct *t) -{ -return t->save ?pc_pointer (t->save->pc) :0 ; -} - -static inline unsigned long thread_saved_fp (struct thread_struct *t) -{ -return t->save ? t->save->fp :0 ; -} - -/* Forward declaration, a strange C thing */ -struct task_struct ; - -/* Free all resources held by a thread. */ -extern void release_thread (struct task_struct *); - -/* Copy and release all segment info associated with a VM */ -#define copy_segments (tsk, mm) do { } while (0) -#define release_segments (mm) do { } while (0) - -unsigned long get_wchan (struct task_struct *p); - -#define THREAD_SIZE (8192) - -extern struct task_struct *alloc_task_struct (void ); -extern void __free_task_struct (struct task_struct *); -#define get_task_struct (p) atomic_inc(&(p)->thread.refcount) -#define free_task_struct (p) \ - do { \ - if (atomic_dec_and_test(&(p)->thread.refcount)) \ - __free_task_struct((p)); \ - } while (0) - -#define init_task (init_task_union.task) -#define init_stack (init_task_union.stack) - -#define cpu_relax () barrier() - -/* -* Create a new kernel thread -*/ -extern int arch_kernel_thread (int (*fn)(void *),void *arg,unsigned long flags); - -#endif - -#endif /* __ASM_ARM_PROCESSOR_H */
include/linux/barebox-wrapper.h +2 -0
@@ -52,4 +52,6 @@ typedef int irqreturn_t;#define __clk_get_rate clk_get_rate#define __clk_get_parent clk_get_parent +#define cpu_relax () barrier() +#endif /* __INCLUDE_LINUX_BAREBOX_WRAPPER_H */
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 6/21 treewide: use cpu_relax() where appropriate
In reply to Ahmad FatoumInstead of doing /* cpu_relax(); */ barrier(); on upstream uses of cpu_relax(), just use the new cpu_relax() #define directly.
--- arch/arm/mach-omap/omap4_rom_usb.c | 6 ++---- drivers/mtd/nand/nand_denali.c | 8 +++----- 2 files changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-omap/omap4_rom_usb.c +2 -4
@@ -111,8 +111,7 @@ int omap4_usbboot_wait_read(void) {int ret;while (omap4_usbboot_data.dread.status ==STATUS_WAITING ) -/* cpu_relax(); */ -barrier (); +cpu_relax (); ret = omap4_usbboot_data.dread.status; omap4_usbboot_data.dread.status =-1 ;return ret;
@@ -153,8 +152,7 @@ int omap4_usbboot_wait_write(void) {int ret;while (omap4_usbboot_data.dwrite.status ==STATUS_WAITING ) -/* cpu_relax(); */ -barrier (); +cpu_relax (); ret = omap4_usbboot_data.dwrite.status; omap4_usbboot_data.dwrite.status =-1 ;return ret;
drivers/mtd/nand/nand_denali.c +3 -5
@@ -171,7 +171,7 @@ static void reset_bank(struct denali_nand_info *denali)/* wait for completion */ while (ioread32 (denali->flash_reg +DEVICE_RESET ) & (1 << denali->flash_bank)) -barrier (); +cpu_relax (); }/* Reset the flash controller */
@@ -187,8 +187,7 @@ static uint16_t denali_nand_reset(struct denali_nand_info *denali)iowrite32 (1 << i, denali->flash_reg +DEVICE_RESET );while (!(ioread32 (denali->flash_reg +INTR_STATUS (i)) & (INTR_STATUS__RST_COMP |INTR_STATUS__TIME_OUT ))) -/* cpu_relax(); */ -barrier (); +cpu_relax ();if (ioread32 (denali->flash_reg +INTR_STATUS (i)) &INTR_STATUS__TIME_OUT ) dev_dbg(denali->dev,
@@ -953,8 +952,7 @@ static bool handle_ecc(struct denali_nand_info *denali, uint8_t *buf,*/ while (!(read_interrupt_status (denali) &INTR_STATUS__ECC_TRANSACTION_DONE )) -/* cpu_relax(); */ -barrier (); +cpu_relax ();clear_interrupts (denali);denali_set_intr_modes (denali, true); }
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 7/21 of: port Linux of_get_compatible_child helper
In reply to Ahmad FatoumIncoming Linux code port makes use of the helper. Add it now instead of having to open-code it later.
--- drivers/of/base.c | 25 +++++++++++++++++++++++++ include/of.h | 8 ++++++++ 2 files changed, 33 insertions(+)
drivers/of/base.c +25 -0
@@ -1712,6 +1712,31 @@ int of_get_available_child_count(const struct device_node *parent) }EXPORT_SYMBOL (of_get_available_child_count); +/** +* of_get_compatible_child - Find compatible child node +* @parent: parent node +* @compatible: compatible string +* +* Lookup child node whose compatible property contains the given compatible +* string. +* +* Returns a node pointer with refcount incremented, use of_node_put() on it +* when done; or NULL if not found. +*/ +struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +struct device_node *child; + +for_each_child_of_node (parent, child) { +if (of_device_is_compatible (child, compatible)) +break ; + } + +return child; +} +EXPORT_SYMBOL (of_get_compatible_child); +/** * of_get_child_by_name - Find the child node by name for a given parent * @node: parent node
include/of.h +8 -0
@@ -177,6 +177,8 @@ struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev);extern int of_get_child_count (const struct device_node *parent);extern int of_get_available_child_count (const struct device_node *parent); +extern struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible);extern struct device_node *of_get_child_by_name (const struct device_node *node,const char *name);extern char *of_get_reproducible_name (struct device_node *node);
@@ -380,6 +382,12 @@ static inline int of_get_available_child_count(const struct device_node *parent)return -ENOSYS ; } +static inline struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +return NULL ; +} +static inline struct device_node *of_get_child_by_name (const struct device_node *node,const char *name) {
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerRe: [PATCH 07/21] of: port Linux of_get_compatible_child helper
Quoted 27 lines · Ahmad Fatoum
Incoming Linux code port makes use of the helper. Add it now instead of having to open-code it later.
Signed-off-by Ahmad Fatoum <[email protected]>--- drivers/of/base.c | 25 +++++++++++++++++++++++++ include/of.h | 8 ++++++++ 2 files changed, 33 insertions(+)drivers/of/base.c +10
-0@@ -1712,6 +1712,31 @@ int of_get_available_child_count(const struct device_node *parent) }EXPORT_SYMBOL (of_get_available_child_count); +/** +* of_get_compatible_child - Find compatible child node +* @parent: parent node +* @compatible: compatible string +* +* Lookup child node whose compatible property contains the given compatible +* string. +* +* Returns a node pointer with refcount incremented, use of_node_put() on it +* when done; or NULL if not found.
drivers/of/base.c int of_get_available_child_count(const struct device_node *parent) · line 1734
Quoted 10 lines
drivers/of/base.c +10
-0+*/ +struct device_node *of_get_compatible_child (const struct device_node *parent, +const char *compatible) +{ +struct device_node *child; + +for_each_child_of_node (parent, child) { +if (of_device_is_compatible (child, compatible)) +break ; + }
for_each_child_of_node() goes down to list_for_each_entry(). On an empty list child will point to the list head after leaving the loop. Return child explicitly when it's compatible and NULL when leaving the loop which is better readable as well.
Sascha
Signature · 9 lines
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 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 07/21] of: port Linux of_get_compatible_child helper
Hello Sascha,
Quoted 4 lines · Sascha Hauer
for_each_child_of_node()goes down tolist_for_each_entry(). On an empty list child will point to the list head after leaving the loop. Return child explicitly when it's compatible and NULL when leaving the loop which is better readable as well.
argh, it looked fishy to me as well, but I didn't think about comparing Linux and barebox implementation. I just reviewed the 70 instances of for_each_child_of_node we have and it seems only one other instance in the overlay code has made the same assumption as I did:
- drivers/of/resolver.c: of_resolve_phandles (grep for /if (!overlay_child)/)
I can send a fixup to make it more readable but I'd want to change for_each_child_of_node to align it with Linux behavior as well.
Cheers
Ahmad
Signature · 9 lines
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 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 07/21] of: port Linux of_get_compatible_child helper
Hello Ahmad,
Quoted 8 lines · Ahmad Fatoum
Hello Sascha,
Quoted 4 lines · Sascha Hauer
for_each_child_of_node()goes down tolist_for_each_entry(). On an empty list child will point to the list head after leaving the loop. Return child explicitly when it's compatible and NULL when leaving the loop which is better readable as well.
Quoted 5 lines
argh, it looked fishy to me as well, but I didn't think about comparing Linux and barebox implementation. I just reviewed the 70 instances of
for_each_child_of_nodewe have and it seems only one other instance in the overlay code has made the same assumption as I did:
-drivers/of/resolver.c:of_resolve_phandles(grep for /if (!overlay_child)/)
Thanks for reporting. I sent a patch.
Michael
Quoted 6 lines
I can send a fixup to make it more readable but I'd want to change
for_each_child_of_nodeto align it with Linux behavior as well.Cheers
Ahmad
_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
PATCH 1/1 fixup! of: port Linux of_get_compatible_child helper
In reply to Sascha HauerThe barebox implementation of for_each_child_of_node doesn't set the iterator to NULL, when the list of children is empty.
Fix of_get_compatible_child to deal with this.
--- drivers/of/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/of/base.c +2 -2
@@ -1730,10 +1730,10 @@ struct device_node *of_get_compatible_child(const struct device_node *parent,for_each_child_of_node (parent, child) {if (of_device_is_compatible (child, compatible)) -break ; +return child; } -return child; +return NULL ; }EXPORT_SYMBOL (of_get_compatible_child);
Signature · 7 lines
2.20.1 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 8/21 clk: implement clk_register_fixed_rate
In reply to Ahmad FatoumWe lack a way to instantiate a fixed clock while specifying a parent. This is used in the at91 clock code sync with upstream in a later commit, so prepare by porting clk_register_fixed_rate.
It's based on the Linux commit of the same name with the difference that it doesn't use (and thus doesn't require) a struct device_d * as first parameter.
--- drivers/clk/clk-fixed.c | 16 +++++++++++++++- include/linux/clk.h | 9 ++++++++- 2 files changed, 23 insertions(+), 2 deletions(-)
drivers/clk/clk-fixed.c +15 -1
@@ -37,17 +37,31 @@ static struct clk_ops clk_fixed_ops = { .is_enabled = clk_is_enabled_always, }; -struct clk *clk_fixed (const char *name,int rate) +struct clk *clk_register_fixed_rate (const char *name, +const char *parent_name,unsigned long flags, +unsigned long rate) {struct clk_fixed *fix =xzalloc (sizeof *fix); +const char **parent_names =NULL ;int ret; fix->rate = rate; fix->clk.ops = &clk_fixed_ops; fix->clk.name = name; + fix->clk.flags = flags; + +if (parent_name) { + parent_names =kzalloc (sizeof (const char *),GFP_KERNEL ); +if (!parent_names) +return ERR_PTR (-ENOMEM ); + + fix->clk.parent_names = parent_names; + fix->clk.num_parents =1 ; + } ret =clk_register (&fix->clk);if (ret) { +free (parent_names);free (fix);return ERR_PTR (ret); }
include/linux/clk.h +8 -1
@@ -325,7 +325,14 @@ struct clk_div_table {unsigned int div; }; -struct clk *clk_fixed (const char *name,int rate); +struct clk *clk_register_fixed_rate (const char *name, +const char *parent_name,unsigned long flags, +unsigned long fixed_rate); + +static inline struct clk *clk_fixed (const char *name,int rate) +{ +return clk_register_fixed_rate (name,NULL ,0 , rate); +}struct clk_divider {struct clk clk;
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 9/21 clk: add clk_unregister stub
In reply to Ahmad FatoumMake kernel clk driver import a tiny bit more convenient by allowing clk_unregister calls and control flow to remain as is.
--- include/linux/clk.h | 4 ++++ 1 file changed, 4 insertions(+)
include/linux/clk.h +4 -0
@@ -558,4 +558,8 @@ int clk_name_complete(struct string_list *sl, char *instr);char *of_clk_get_parent_name (struct device_node *np,unsigned int index); +static inline void clk_unregister (struct clk *clk) +{ +} +#endif
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 10/21 include: linux/kernel.h: port DIV_ROUND_CLOSEST_ULL definition
In reply to Ahmad FatoumWe already have DIV_ROUND_CLOSEST, but no DIV_ROUND_CLOSEST_ULL. Import the latter for use by later commits.
--- include/linux/kernel.h | 13 +++++++++++++ 1 file changed, 13 insertions(+)
include/linux/kernel.h +13 -0
@@ -6,6 +6,7 @@#include <linux/bug.h> #include <linux/barebox-wrapper.h> #include <linux/limits.h> +#include <asm-generic/div64.h> #define ALIGN (x, a) __ALIGN_MASK(x, (typeof(x))(a) - 1)#define ALIGN_DOWN (x, a) ALIGN((x) - ((a) - 1), (a))
@@ -41,6 +42,18 @@ (((x) + ((__divisor) /2 )) / (__divisor)); \ } \ ) +/* +* Same as above but for u64 dividends. divisor must be a 32-bit +* number. +*/ +#define DIV_ROUND_CLOSEST_ULL (x, divisor)( \ +{ \ + typeof(divisor) __d = divisor; \ + unsigned long long _tmp = (x) + (__d) / 2; \ + do_div(_tmp, __d); \ + _tmp; \ +} \ +)/** * upper_32_bits - return bits 32-63 of a number
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 11/21 clk: migrate to SPDX-License-Identifier use
In reply to Ahmad FatoumSome 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.
--- drivers/clk/Kconfig | 1 + drivers/clk/Makefile | 1 + drivers/clk/at91/Makefile | 1 + drivers/clk/at91/clk-generated.c | 7 +------ drivers/clk/at91/clk-h32mx.c | 7 +------ drivers/clk/at91/clk-main.c | 7 +------ drivers/clk/at91/clk-master.c | 7 +------ drivers/clk/at91/clk-peripheral.c | 7 +------ drivers/clk/at91/clk-pll.c | 7 +------ drivers/clk/at91/clk-plldiv.c | 7 +------ drivers/clk/at91/clk-programmable.c | 7 +------ drivers/clk/at91/clk-slow.c | 7 +------ drivers/clk/at91/clk-smd.c | 7 +------ drivers/clk/at91/clk-system.c | 7 +------ drivers/clk/at91/clk-usb.c | 7 +------ drivers/clk/at91/clk-utmi.c | 7 +------ drivers/clk/at91/pmc.c | 7 +------ drivers/clk/at91/pmc.h | 6 +----- drivers/clk/at91/sckc.c | 7 +------ drivers/clk/clk-ar933x.c | 13 +------------ drivers/clk/clk-ar9344.c | 10 +--------- drivers/clk/clk-composite.c | 13 +------------ drivers/clk/clk-conf.c | 5 +---- drivers/clk/clk-divider.c | 12 +----------- drivers/clk/clk-fixed-factor.c | 12 +----------- drivers/clk/clk-fixed.c | 12 +----------- drivers/clk/clk-fractional-divider.c | 5 +---- drivers/clk/clk-gate-shared.c | 12 +----------- drivers/clk/clk-gate.c | 12 +----------- drivers/clk/clk-gpio.c | 12 +----------- drivers/clk/clk-mux.c | 12 +----------- drivers/clk/clk-qoric.c | 5 +---- drivers/clk/clk.c | 12 +----------- drivers/clk/clkdev.c | 5 +---- drivers/clk/imx/Makefile | 1 + drivers/clk/imx/clk-cpu.c | 8 +------- drivers/clk/imx/clk-frac-pll.c | 8 +------- drivers/clk/imx/clk-gate-exclusive.c | 5 +---- drivers/clk/imx/clk-gate2.c | 12 +----------- drivers/clk/imx/clk-imx1.c | 14 +------------- drivers/clk/imx/clk-imx21.c | 15 +-------------- drivers/clk/imx/clk-imx25.c | 15 +-------------- drivers/clk/imx/clk-imx27.c | 1 + drivers/clk/imx/clk-imx31.c | 14 +------------- drivers/clk/imx/clk-imx35.c | 6 +----- drivers/clk/imx/clk-imx5.c | 6 +----- drivers/clk/imx/clk-imx6.c | 8 +------- drivers/clk/imx/clk-imx6sl.c | 8 +------- drivers/clk/imx/clk-imx6sx.c | 8 +------- drivers/clk/imx/clk-imx6ul.c | 8 +------- drivers/clk/imx/clk-imx7.c | 10 ++-------- drivers/clk/imx/clk-pfd.c | 8 +------- drivers/clk/imx/clk-pllv1.c | 14 ++------------ drivers/clk/imx/clk-pllv2.c | 14 ++------------ drivers/clk/imx/clk-pllv3.c | 14 ++------------ drivers/clk/imx/clk-sccg-pll.c | 8 +------- drivers/clk/imx/clk-vf610.c | 7 +------ drivers/clk/imx/clk.c | 1 + drivers/clk/imx/clk.h | 1 + drivers/clk/mvebu/Makefile | 1 + drivers/clk/mvebu/armada-370.c | 5 +---- drivers/clk/mvebu/armada-38x.c | 5 +---- drivers/clk/mvebu/armada-xp.c | 5 +---- drivers/clk/mvebu/common.c | 5 +---- drivers/clk/mvebu/common.h | 5 +---- drivers/clk/mvebu/corediv.c | 5 +---- drivers/clk/mvebu/dove.c | 5 +---- drivers/clk/mvebu/kirkwood.c | 5 +---- drivers/clk/mxs/Makefile | 1 + drivers/clk/mxs/clk-div.c | 8 +------- drivers/clk/mxs/clk-frac.c | 8 +------- drivers/clk/mxs/clk-imx23.c | 14 +------------- drivers/clk/mxs/clk-imx28.c | 14 +------------- drivers/clk/mxs/clk-lcdif.c | 1 + drivers/clk/mxs/clk-pll.c | 8 +------- drivers/clk/mxs/clk-ref.c | 8 +------- drivers/clk/mxs/clk.h | 1 + drivers/clk/rockchip/Makefile | 1 + drivers/clk/rockchip/clk-cpu.c | 5 +---- drivers/clk/rockchip/clk-pll.c | 11 +---------- drivers/clk/rockchip/clk-rk3188.c | 11 +---------- drivers/clk/rockchip/clk-rk3288.c | 11 +---------- drivers/clk/rockchip/clk.c | 11 +---------- drivers/clk/rockchip/clk.h | 11 +---------- drivers/clk/socfpga/Makefile | 1 + drivers/clk/socfpga/clk-gate-a10.c | 13 +------------ drivers/clk/socfpga/clk-periph-a10.c | 13 +------------ drivers/clk/socfpga/clk-pll-a10.c | 13 +------------ drivers/clk/socfpga/clk.c | 10 +--------- drivers/clk/socfpga/clk.h | 11 +---------- drivers/clk/tegra/Makefile | 1 + drivers/clk/tegra/clk-divider.c | 13 +------------ drivers/clk/tegra/clk-periph.c | 13 +------------ drivers/clk/tegra/clk-pll-out.c | 13 +------------ drivers/clk/tegra/clk-pll.c | 13 +------------ drivers/clk/tegra/clk-tegra124.c | 13 +------------ drivers/clk/tegra/clk-tegra20.c | 13 +------------ drivers/clk/tegra/clk-tegra30.c | 13 +------------ drivers/clk/tegra/clk.c | 13 +------------ drivers/clk/tegra/clk.h | 13 +------------ drivers/clk/vexpress/Makefile | 1 + drivers/clk/vexpress/clk-sp810.c | 10 +--------- drivers/clk/vexpress/clk-vexpress-osc.c | 11 +---------- drivers/clk/zynq/Makefile | 1 + drivers/clk/zynq/clkc.c | 13 +------------ drivers/clk/zynqmp/Makefile | 1 + include/linux/clk/at91_pmc.h | 6 +----- 107 files changed, 111 insertions(+), 756 deletions(-)
drivers/clk/Kconfig +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only config HAVE_CLK bool
drivers/clk/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_COMMON_CLK) += clk.o clk-fixed.o clk-divider.o clk-fixed-factor.o \ clk-mux.o clk-gate.o clk-composite.o \ clk-fractional-divider.o clk-conf.o \
drivers/clk/at91/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only # # Makefile for at91 specific clk #
drivers/clk/at91/clk-generated.c +1 -6
@@ -1,14 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2015 Atmel Corporation, * Nicolas Ferre <[email protected]> * * Based on clk-programmable & clk-peripheral drivers by Boris BREZILLON. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-h32mx.c +1 -6
@@ -1,15 +1,10 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-h32mx.c * * Copyright (C) 2014 Atmel * * Alexandre Belloni <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-main.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h> #include <clock.h>
drivers/clk/at91/clk-master.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h> #include <clock.h>
drivers/clk/at91/clk-peripheral.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-pll.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-plldiv.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-programmable.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-slow.c +1 -6
@@ -1,13 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * drivers/clk/at91/clk-slow.c * * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-smd.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-system.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h> #include <clock.h>
drivers/clk/at91/clk-usb.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/clk-utmi.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/at91/pmc.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <module.h>
drivers/clk/at91/pmc.h +1 -5
@@ -1,12 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * drivers/clk/at91/pmc.h * * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. */ #ifndef __PMC_H_
drivers/clk/at91/sckc.c +1 -6
@@ -1,13 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * drivers/clk/at91/sckc.c * * Copyright (C) 2013 Boris BREZILLON <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/clk-ar933x.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Antony Pavlov <[email protected]> * * Based on the Linux ath79 clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/clk-ar9344.c +1 -9
@@ -1,14 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2017 Oleksij Rempel <[email protected]> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. */ #include <common.h>
drivers/clk/clk-composite.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Taken from linux/drivers/clk/ * * Copyright (c) 2013 NVIDIA CORPORATION. All rights reserved. -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/clk-conf.c +1 -4
@@ -1,10 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Samsung Electronics Co., Ltd. * Sylwester Nawrocki <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <common.h>
drivers/clk/clk-divider.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-divider.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <io.h>
drivers/clk/clk-fixed-factor.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-fixed-factor.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <io.h>
drivers/clk/clk-fixed.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-fixed.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <malloc.h>
drivers/clk/clk-fractional-divider.c +1 -4
@@ -1,10 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Intel Corporation * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* * Adjustable fractional divider clock implementation. * Output rate = (m / n) * parent_rate. */
drivers/clk/clk-gate-shared.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-gate-shared.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2017 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <io.h>
drivers/clk/clk-gate.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-gate.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <io.h>
drivers/clk/clk-gpio.c +1 -11
@@ -1,19 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-gpio.c - clock that can be enabled and disabled via GPIO output * Based on Linux clk support * * Copyright (c) 2018 Nikita Yushchenko <[email protected]> -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <malloc.h>
drivers/clk/clk-mux.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-mux.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <io.h>
drivers/clk/clk-qoric.c +1 -4
@@ -1,10 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2013 Freescale Semiconductor, Inc. * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* * clock driver for Freescale QorIQ SoCs. */
drivers/clk/clk.c +1 -11
@@ -1,18 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk.c - generic barebox clock support. Based on Linux clk support * * Copyright (c) 2012 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h> #include <errno.h>
drivers/clk/clkdev.c +1 -4
@@ -1,12 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * drivers/clk/lookup_clkdev.c * * Copyright (C) 2008 Russell King. * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* * Helper for the clk API to assist looking up a struct clk. */
drivers/clk/imx/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_COMMON_CLK) += \ clk-composite-8m.o \ clk-pllv1.o \
drivers/clk/imx/clk-cpu.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014 Lucas Stach <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-frac-pll.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2017 NXP. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-gate-exclusive.c +1 -4
@@ -1,9 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright 2014 Freescale Semiconductor, Inc. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. */ #include <common.h>
drivers/clk/imx/clk-gate2.c +1 -11
@@ -1,16 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * clk-gate2.c - barebox 2-bit clock support. Based on Linux clk support -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* */ #include <common.h>
drivers/clk/imx/clk-imx1.c +1 -13
@@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2008 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <common.h>
drivers/clk/imx/clk-imx21.c +1 -14
@@ -1,21 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. * Copyright 2008 Juergen Beisert, [email protected] * Copyright 2008 Martin Fuzzey, [email protected] -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -* MA 02110-1301, USA. */ #include <common.h>
drivers/clk/imx/clk-imx25.c +1 -14
@@ -1,19 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2009 by Sascha Hauer, Pengutronix -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -* MA 02110-1301, USA. */ #include <common.h>
drivers/clk/imx/clk-imx27.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only #include <common.h> #include <init.h> #include <driver.h>
drivers/clk/imx/clk-imx31.c +1 -13
@@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2012 Sascha Hauer <[email protected]> -* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License -* as published by the Free Software Foundation; either version 2 -* of the License, or (at your option) any later version. -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation. */ #include <common.h>
drivers/clk/imx/clk-imx35.c +1 -5
@@ -1,10 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2012 Sascha Hauer, Pengutronix <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* */ #include <common.h> #include <init.h>
drivers/clk/imx/clk-imx5.c +1 -5
@@ -1,10 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2011 Sascha Hauer, Pengutronix <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* */ #include <common.h> #include <init.h>
drivers/clk/imx/clk-imx6.c +1 -7
@@ -1,13 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2011 Freescale Semiconductor, Inc. * Copyright 2011 Linaro Ltd. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-imx6sl.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2014 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <dt-bindings/clock/imx6sl-clock.h>
drivers/clk/imx/clk-imx6sx.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2014 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <dt-bindings/clock/imx6sx-clock.h>
drivers/clk/imx/clk-imx6ul.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2015 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-imx7.c +2 -8
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (C) 2014-2015 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
@@ -866,4 +860,4 @@ static int imx7_ccm_init(void) {return platform_driver_register (&imx7_ccm_driver); } -core_initcall (imx7_ccm_init); +core_initcall (imx7_ccm_init);
drivers/clk/imx/clk-pfd.c +1 -7
@@ -1,13 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012 Freescale Semiconductor, Inc. * Copyright 2012 Linaro Ltd. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-pllv1.c +2 -12
@@ -1,15 +1,5 @@ -/* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0-or-later +#include <common.h> #include <init.h> #include <driver.h>
drivers/clk/imx/clk-pllv2.c +2 -12
@@ -1,15 +1,5 @@ -/* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0-or-later +#include <common.h> #include <init.h> #include <driver.h>
drivers/clk/imx/clk-pllv3.c +2 -12
@@ -1,15 +1,5 @@ -/* -* This program is free software; you can redistribute it and/or -* modify it under the terms of the GNU General Public License as -* published by the Free Software Foundation; either version 2 of -* the License, or (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -*/ +// SPDX-License-Identifier: GPL-2.0-or-later +#include <common.h> #include <init.h> #include <driver.h>
drivers/clk/imx/clk-sccg-pll.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2017 NXP. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/imx/clk-vf610.c +1 -6
@@ -1,11 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012-2013 Freescale Semiconductor, Inc. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* */ #include <common.h>
drivers/clk/imx/clk.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only #include <common.h> #include <init.h> #include <driver.h>
drivers/clk/imx/clk.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef __IMX_CLK_H#define __IMX_CLK_H
drivers/clk/mvebu/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += common.o obj-$(CONFIG_ARCH_ARMADA_370) += armada-370.o corediv.o obj-$(CONFIG_ARCH_ARMADA_XP) += armada-xp.o corediv.o
drivers/clk/mvebu/armada-370.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Armada 370 SoC clocks *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/armada-38x.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Armada 380/385 SoC clocks *
@@ -6,10 +7,6 @@* Gregory CLEMENT <[email protected]> * Sebastian Hesselbarth <[email protected]> * Andrew Lunn <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/armada-xp.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Armada XP SoC clocks *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/common.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell EBU SoC common clock handling *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/common.h +1 -4
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Marvell EBU SoC common clock handling *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #ifndef __CLK_MVEBU_COMMON_H_
drivers/clk/mvebu/corediv.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * MVEBU Core divider clock *
@@ -6,10 +7,6 @@* Based on Linux driver * Copyright (C) 2013 Marvell * Ezequiel Garcia <[email protected]> -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/dove.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Dove SoC clocks *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mvebu/kirkwood.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Marvell Kirkwood SoC clocks *
@@ -5,10 +6,6 @@* * Based on Linux Marvell MVEBU clock providers * Copyright (C) 2012 Marvell -* -* This file is licensed under the terms of the GNU General Public -* License version 2. This program is licensed "as is" without any -* warranty of any kind, whether express or implied. */ #include <common.h>
drivers/clk/mxs/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-$(CONFIG_ARCH_MXS) += clk-ref.o clk-pll.o clk-frac.o clk-div.o obj-$(CONFIG_DRIVER_VIDEO_STM) += clk-lcdif.o
drivers/clk/mxs/clk-div.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/mxs/clk-frac.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/mxs/clk-imx23.c +1 -13
@@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2008 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <common.h>
drivers/clk/mxs/clk-imx28.c +1 -13
@@ -1,18 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2008 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License along -* with this program; if not, write to the Free Software Foundation, Inc., -* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <common.h>
drivers/clk/mxs/clk-lcdif.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only #include <common.h> #include <io.h> #include <linux/clk.h>
drivers/clk/mxs/clk-pll.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/mxs/clk-ref.c +1 -7
@@ -1,12 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright 2012 Freescale Semiconductor, Inc. -* -* The code contained herein is licensed under the GNU General Public -* License. You may obtain a copy of the GNU General Public License -* Version 2 or later at the following locations: -* -* http://www.opensource.org/licenses/gpl-license.html -* http://www.gnu.org/copyleft/gpl.html */ #include <common.h>
drivers/clk/mxs/clk.h +1 -0
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #ifndef __MXS_CLK_H#define __MXS_CLK_H
drivers/clk/rockchip/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clk-cpu.o clk-pll.o clk.o obj-$(CONFIG_ARCH_RK3188) += clk-rk3188.o obj-$(CONFIG_ARCH_RK3288) += clk-rk3288.o
drivers/clk/rockchip/clk-cpu.c +1 -4
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]>
@@ -6,10 +7,6 @@* Copyright (c) 2014 Samsung Electronics Co., Ltd. * Author: Thomas Abraham <[email protected]> * -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* * A CPU clock is defined as a clock supplied to a CPU or a group of CPUs. * The CPU clock is typically derived from a hierarchy of clock * blocks which includes mux and divider blocks. There are a number of other
drivers/clk/rockchip/clk-pll.c +1 -10
@@ -1,16 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <asm-generic/div64.h>
drivers/clk/rockchip/clk-rk3188.c +1 -10
@@ -1,16 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <common.h>
drivers/clk/rockchip/clk-rk3288.c +1 -10
@@ -1,16 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <common.h>
drivers/clk/rockchip/clk.c +1 -10
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]>
@@ -8,16 +9,6 @@* Copyright (c) 2013 Samsung Electronics Co., Ltd. * Copyright (c) 2013 Linaro Ltd. * Author: Thomas Abraham <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <common.h>
drivers/clk/rockchip/clk.h +1 -10
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * Copyright (c) 2014 MundoReader S.L. * Author: Heiko Stuebner <[email protected]>
@@ -8,16 +9,6 @@* Copyright (c) 2013 Samsung Electronics Co., Ltd. * Copyright (c) 2013 Linaro Ltd. * Author: Thomas Abraham <[email protected]> -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #ifndef CLK_ROCKCHIP_CLK_H
drivers/clk/socfpga/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clk.o obj-$(CONFIG_ARCH_SOCFPGA_ARRIA10) += clk-gate-a10.o clk-periph-a10.o clk-pll-a10.o
drivers/clk/socfpga/clk-gate-a10.c +1 -12
@@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2015 Altera Corporation. All rights reserved -* -* This program is free software; you can redistribute it and/or modify -* it under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/socfpga/clk-periph-a10.c +1 -12
@@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2015 Altera Corporation. All rights reserved -* -* This program is free software; you can redistribute it and/or modify -* it under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/socfpga/clk-pll-a10.c +1 -12
@@ -1,17 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2015 Altera Corporation. All rights reserved -* -* This program is free software; you can redistribute it and/or modify -* it under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h> #include <io.h>
drivers/clk/socfpga/clk.c +1 -9
@@ -1,14 +1,6 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Sascha Hauer <[email protected]>, Pengutronix -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. */ #include <common.h>
drivers/clk/socfpga/clk.h +1 -10
@@ -1,17 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2013, Steffen Trumtrar <[email protected]> * * based on drivers/clk/tegra/clk.h -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* */ #ifndef __SOCFPGA_CLK_H
drivers/clk/tegra/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clk.o obj-y += clk-divider.o obj-y += clk-periph.o
drivers/clk/tegra/clk-divider.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-periph.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013-2014 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-pll-out.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-pll.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-tegra124.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-tegra20.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk-tegra30.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2014 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk.c +1 -12
@@ -1,19 +1,8 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2013-2014 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h>
drivers/clk/tegra/clk.h +1 -12
@@ -1,19 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2013 Lucas Stach <[email protected]> * * Based on the Linux Tegra clock code -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License -* along with this program. If not, see <http://www.gnu.org/licenses/>. */ /* struct tegra_clk_frac_div - fractional divider */
drivers/clk/vexpress/Makefile +1 -0
@@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clk-vexpress-osc.o clk-sp810.o
drivers/clk/vexpress/clk-sp810.c +1 -9
@@ -1,13 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0-only /* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* * Copyright (C) 2013 ARM Limited */
drivers/clk/vexpress/clk-vexpress-osc.c +1 -10
@@ -1,13 +1,4 @@ -/* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License version 2 as -* published by the Free Software Foundation. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -*/ +// SPDX-License-Identifier: GPL-2.0-only #include <common.h> #include <malloc.h>
drivers/clk/zynq/Makefile +1 -0
@@ -1 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clkc.o
drivers/clk/zynq/clkc.c +1 -12
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2013 Josh Cartwright <[email protected]> * Copyright (c) 2013 Steffen Trumtrar <[email protected]>
@@ -7,18 +8,6 @@* Copyright (c) 2012 National Instruments * * Josh Cartwright <[email protected]> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms and conditions of the GNU General Public License, -* version 2, as published by the Free Software Foundation. -* -* This program is distributed in the hope it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along with -* this program. If not, see <http://www.gnu.org/licenses/>. */ #include <common.h> #include <init.h>
drivers/clk/zynqmp/Makefile +1 -0
@@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0-only obj-y += clkc.o obj-y += clk-pll-zynqmp.o obj-y += clk-gate-zynqmp.o
include/linux/clk/at91_pmc.h +1 -5
@@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * include/linux/clk/at91_pmc.h *
@@ -6,11 +7,6 @@* * Power Management Controller (PMC) - System peripherals registers. * Based on AT91RM9200 datasheet revision E. -* -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. */ #ifndef AT91_PMC_H
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 12/21 clk: at91: fix masterck name
In reply to Ahmad FatoumFrom: Alexandre Belloni <[email protected]>
The master clock is actually named masterck earlier in the driver. Having "mck" in the parent list means that it can never be selected.
--- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/sama5d2.c | 4 ++-- drivers/clk/at91/sama5d4.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/clk/at91/at91sam9x5.c +1 -1
@@ -216,7 +216,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <2 ; i++) {char *name;
drivers/clk/at91/sama5d2.c +2 -2
@@ -227,7 +227,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <3 ; i++) {char *name;
@@ -278,7 +278,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <ARRAY_SIZE (sama5d2_gck); i++) { hw = at91_clk_register_generated(regmap, sama5d2_gck[i].n,
drivers/clk/at91/sama5d4.c +1 -1
@@ -213,7 +213,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) parent_names[1 ] ="mainck" ; parent_names[2 ] ="plladivck" ; parent_names[3 ] ="utmick" ; - parent_names[4 ] ="mck" ; + parent_names[4 ] ="masterck" ;for (i =0 ; i <3 ; i++) {char *name;
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 13/21 clk: at91: fix possible deadlock
In reply to Ahmad FatoumFrom: Alexandre Belloni <[email protected]>
Lockdep warns about a possible circular locking dependency because using syscon_node_to_regmap() will make the created regmap get and enable the first clock it can parse from the device tree. This clock is not needed to access the registers and should not be enabled at that time.
Use the recently introduced device_node_to_regmap to solve that as it looks up the regmap in the same list but doesn't care about the clocks.
--- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/pmc.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
drivers/clk/at91/at91sam9260.c +1 -1
@@ -354,7 +354,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,return ; mainxtal_name =of_clk_get_parent_name (np, i); - regmap =syscon_node_to_regmap (np); + regmap =device_node_to_regmap (np);if (IS_ERR (regmap))return ;
drivers/clk/at91/at91sam9rl.c +1 -1
@@ -89,7 +89,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)return ; mainxtal_name =of_clk_get_parent_name (np, i); - regmap =syscon_node_to_regmap (np); + regmap =device_node_to_regmap (np);if (IS_ERR (regmap))return ;
drivers/clk/at91/at91sam9x5.c +1 -1
@@ -145,7 +145,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,return ; mainxtal_name =of_clk_get_parent_name (np, i); - regmap =syscon_node_to_regmap (np); + regmap =device_node_to_regmap (np);if (IS_ERR (regmap))return ;
drivers/clk/at91/pmc.c +1 -1
@@ -269,7 +269,7 @@ static int __init pmc_register_ops(void) np =of_find_matching_node (NULL , sama5d2_pmc_dt_ids); - pmcreg =syscon_node_to_regmap (np); + pmcreg =device_node_to_regmap (np);if (IS_ERR (pmcreg))return PTR_ERR (pmcreg);
drivers/clk/at91/sama5d2.c +1 -1
@@ -149,7 +149,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)return ; mainxtal_name =of_clk_get_parent_name (np, i); - regmap =syscon_node_to_regmap (np); + regmap =device_node_to_regmap (np);if (IS_ERR (regmap))return ;
drivers/clk/at91/sama5d4.c +1 -1
@@ -136,7 +136,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)return ; mainxtal_name =of_clk_get_parent_name (np, i); - regmap =syscon_node_to_regmap (np); + regmap =device_node_to_regmap (np);if (IS_ERR (regmap))return ;
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 14/21 clk: at91: delete no-longer required DT compat code
In reply to Ahmad FatoumUnlike Linux, we don't require barebox drivers to support old device tree bindings. Following device tree compatibles are no longer present in barebox latest import of dts/:
* atmel,sama5d2-clk-generated
* atmel,sama5d4-clk-h32mx
* atmel,at91sam9g45-clk-pll
* atmel,at91sam9g20-clk-pllb
* atmel,at91sam9260-clk-slow
Drop their compat code.
--- drivers/clk/at91/dt-compat.c | 133 ----------------------------------- 1 file changed, 133 deletions(-)
drivers/clk/at91/dt-compat.c +0 -133
@@ -23,96 +23,6 @@#define SYSTEM_MAX_ID 31 -#ifdef CONFIG_HAVE_AT91_GENERATED_CLK -#define GENERATED_SOURCE_MAX 6 - -#define GCK_ID_I2S0 54 -#define GCK_ID_I2S1 55 -#define GCK_ID_CLASSD 59 - -static void __init of_sama5d2_clk_generated_setup (struct device_node *np) -{ -int num; -u32 id; -const char *name; -struct clk *hw; -unsigned int num_parents; -const char *parent_names[GENERATED_SOURCE_MAX ]; -struct device_node *gcknp; -struct clk_range range =CLK_RANGE (0 ,0 ); -struct regmap *regmap; - - num_parents =of_clk_get_parent_count (np); -if (num_parents ==0 || num_parents >GENERATED_SOURCE_MAX ) -return ; - -of_clk_parent_fill (np, parent_names, num_parents); - - num =of_get_child_count (np); -if (!num || num >PERIPHERAL_MAX ) -return ; - - regmap =syscon_node_to_regmap (of_get_parent (np)); -if (IS_ERR (regmap)) -return ; - -for_each_child_of_node (np, gcknp) { -bool pll_audio = false; - -if (of_property_read_u32 (gcknp,"reg" , &id)) -continue ; - -if (id <PERIPHERAL_ID_MIN || id >=PERIPHERAL_MAX ) -continue ; - -if (of_property_read_string (np,"clock-output-names" , &name)) - name = gcknp->name; - -of_at91_get_clk_range (gcknp,"atmel,clk-output-range" , - &range); - -if (of_device_is_compatible (np,"atmel,sama5d2-clk-generated" ) && - (id ==GCK_ID_I2S0 || id ==GCK_ID_I2S1 || - id ==GCK_ID_CLASSD )) - pll_audio = true; - - hw =at91_clk_register_generated (regmap, name, - parent_names, num_parents, - id, pll_audio, &range); -if (IS_ERR (hw)) -continue ; - -of_clk_add_provider (gcknp, of_clk_src_simple_get, hw); - } -} -CLK_OF_DECLARE (of_sama5d2_clk_generated_setup,"atmel,sama5d2-clk-generated" , - of_sama5d2_clk_generated_setup); -#endif /* CONFIG_HAVE_AT91_GENERATED_CLK */ - -#ifdef CONFIG_HAVE_AT91_H32MX -static void __init of_sama5d4_clk_h32mx_setup (struct device_node *np) -{ -struct clk *hw; -const char *name = np->name; -const char *parent_name; -struct regmap *regmap; - - regmap =syscon_node_to_regmap (of_get_parent (np)); -if (IS_ERR (regmap)) -return ; - - parent_name =of_clk_get_parent_name (np,0 ); - - hw =at91_clk_register_h32mx (regmap, name, parent_name); -if (IS_ERR (hw)) -return ; - -of_clk_add_provider (np, of_clk_src_simple_get, hw); -} -CLK_OF_DECLARE (of_sama5d4_clk_h32mx_setup,"atmel,sama5d4-clk-h32mx" , - of_sama5d4_clk_h32mx_setup); -#endif /* CONFIG_HAVE_AT91_H32MX */ -static void __init of_at91rm9200_clk_main_osc_setup (struct device_node *np) {struct clk *hw;
@@ -505,20 +415,6 @@ static void __init of_at91rm9200_clk_pll_setup(struct device_node *np)CLK_OF_DECLARE (at91rm9200_clk_pll,"atmel,at91rm9200-clk-pll" , of_at91rm9200_clk_pll_setup); -static void __init of_at91sam9g45_clk_pll_setup (struct device_node *np) -{ -of_at91_clk_pll_setup (np, &at91sam9g45_pll_layout); -} -CLK_OF_DECLARE (at91sam9g45_clk_pll,"atmel,at91sam9g45-clk-pll" , - of_at91sam9g45_clk_pll_setup); - -static void __init of_at91sam9g20_clk_pllb_setup (struct device_node *np) -{ -of_at91_clk_pll_setup (np, &at91sam9g20_pllb_layout); -} -CLK_OF_DECLARE (at91sam9g20_clk_pllb,"atmel,at91sam9g20-clk-pllb" , - of_at91sam9g20_clk_pllb_setup); -static void __init of_sama5d3_clk_pll_setup (struct device_node *np) {of_at91_clk_pll_setup (np, &sama5d3_pll_layout);
@@ -616,35 +512,6 @@ static void __init of_at91sam9x5_clk_prog_setup(struct device_node *np)CLK_OF_DECLARE (at91sam9x5_clk_prog,"atmel,at91sam9x5-clk-programmable" , of_at91sam9x5_clk_prog_setup); -static void __init of_at91sam9260_clk_slow_setup (struct device_node *np) -{ -struct clk *hw; -const char *parent_names[2 ]; -unsigned int num_parents; -const char *name = np->name; -struct regmap *regmap; - - num_parents =of_clk_get_parent_count (np); -if (num_parents !=2 ) -return ; - -of_clk_parent_fill (np, parent_names, num_parents); - regmap =syscon_node_to_regmap (of_get_parent (np)); -if (IS_ERR (regmap)) -return ; - -of_property_read_string (np,"clock-output-names" , &name); - - hw =at91_clk_register_sam9260_slow (regmap, name, parent_names, - num_parents); -if (IS_ERR (hw)) -return ; - -of_clk_add_provider (np, of_clk_src_simple_get, hw); -} -CLK_OF_DECLARE (at91sam9260_clk_slow,"atmel,at91sam9260-clk-slow" , - of_at91sam9260_clk_slow_setup); -#ifdef CONFIG_HAVE_AT91_SMD #define SMD_SOURCE_MAX 2
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 15/21 clk: at91: compile dt-compat for all platforms that require it
In reply to Ahmad FatoumWe have so far compiled in dt-compat only for CONFIG_SOC_SAMA5D3, but we require it for device tree support of CONFIG_SOC_AT91SAM9 as well. Fix this.
While at it move around the obj- rules a bit to minimize the diff to upstream.
--- drivers/clk/at91/Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/clk/at91/Makefile +4 -6
@@ -12,9 +12,7 @@ obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o obj-$(CONFIG_HAVE_AT91_H32MX) += clk-h32mx.o obj-$(CONFIG_HAVE_AT91_GENERATED_CLK) += clk-generated.o -obj-$(CONFIG_SOC_AT91SAM9) += at91sam9260.o -obj-$(CONFIG_SOC_AT91SAM9) += at91sam9rl.o -obj-$(CONFIG_SOC_AT91SAM9) += at91sam9x5.o -obj-$(CONFIG_SOC_SAMA5D2) += sama5d2.o -obj-$(CONFIG_SOC_SAMA5D3) += dt-compat.o -obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o +obj-$(CONFIG_SOC_AT91SAM9) += at91sam9260.o at91sam9rl.o at91sam9x5.o dt-compat.o +obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o +obj-$(CONFIG_SOC_SAMA5D3) += dt-compat.o +obj-$(CONFIG_SOC_SAMA5D2) += sama5d2.o
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 16/21 clk: at91: add __init marker where appropriate
In reply to Ahmad FatoumWhile redundant in barebox, it makes our diff to the upstream driver smaller when synchronizing, so add it back.
--- drivers/clk/at91/clk-h32mx.c | 2 +- drivers/clk/at91/clk-main.c | 8 +++--- drivers/clk/at91/clk-master.c | 2 +- drivers/clk/at91/clk-peripheral.c | 4 +-- drivers/clk/at91/clk-pll.c | 2 +- drivers/clk/at91/clk-plldiv.c | 2 +- drivers/clk/at91/clk-programmable.c | 2 +- drivers/clk/at91/clk-smd.c | 2 +- drivers/clk/at91/clk-system.c | 2 +- drivers/clk/at91/clk-usb.c | 6 ++--- drivers/clk/at91/pmc.h | 38 ++++++++++++++--------------- drivers/clk/at91/sckc.c | 6 ++--- 12 files changed, 38 insertions(+), 38 deletions(-)
drivers/clk/at91/clk-h32mx.c +1 -1
@@ -83,7 +83,7 @@ static const struct clk_ops h32mx_ops = { .set_rate = clk_sama5d4_h32mx_set_rate, }; -struct clk * +struct clk *__init at91_clk_register_h32mx (struct regmap *regmap,const char *name,const char *parent_name) {
drivers/clk/at91/clk-main.c +4 -4
@@ -123,7 +123,7 @@ static const struct clk_ops main_osc_ops = { .is_enabled = clk_main_osc_is_enabled, }; -struct clk * +struct clk *__init at91_clk_register_main_osc(struct regmap *regmap, const char *name, const char *parent_name,
@@ -229,7 +229,7 @@ static const struct clk_ops main_rc_osc_ops = { .recalc_rate = clk_main_rc_osc_recalc_rate, }; -struct clk * +struct clk *__init at91_clk_register_main_rc_osc (struct regmap *regmap,const char *name,u32 frequency,u32 accuracy)
@@ -320,7 +320,7 @@ static const struct clk_ops rm9200_main_ops = { .recalc_rate = clk_rm9200_main_recalc_rate, }; -struct clk * +struct clk *__init at91_clk_register_rm9200_main (struct regmap *regmap,const char *name,const char *parent_name)
@@ -428,7 +428,7 @@ static const struct clk_ops sam9x5_main_ops = { .get_parent = clk_sam9x5_main_get_parent, }; -struct clk * +struct clk *__init at91_clk_register_sam9x5_main(struct regmap *regmap, const char *name, const char **parent_names,
drivers/clk/at91/clk-master.c +1 -1
@@ -105,7 +105,7 @@ static const struct clk_ops master_ops = { .get_parent = clk_master_get_parent, }; -struct clk * +struct clk *__init at91_clk_register_master(struct regmap *regmap, const char *name, int num_parents, const char **parent_names,
drivers/clk/at91/clk-peripheral.c +2 -2
@@ -94,7 +94,7 @@ static const struct clk_ops peripheral_ops = { .is_enabled = clk_peripheral_is_enabled, }; -struct clk * +struct clk *__init at91_clk_register_peripheral (struct regmap *regmap,const char *name,const char *parent_name,u32 id) {
@@ -306,7 +306,7 @@ static const struct clk_ops sam9x5_peripheral_ops = { .set_rate = clk_sam9x5_peripheral_set_rate, }; -struct clk * +struct clk *__init at91_clk_register_sam9x5_peripheral (struct regmap *regmap,const char *name,const char *parent_name,u32 id,const struct clk_range *range)
drivers/clk/at91/clk-pll.c +1 -1
@@ -280,7 +280,7 @@ static const struct clk_ops pll_ops = { .set_rate = clk_pll_set_rate, }; -struct clk * +struct clk *__init at91_clk_register_pll(struct regmap *regmap, const char *name, const char *parent_name, u8 id, const struct clk_pll_layout *layout,
drivers/clk/at91/clk-plldiv.c +1 -1
@@ -73,7 +73,7 @@ static const struct clk_ops plldiv_ops = { .set_rate = clk_plldiv_set_rate, }; -struct clk * +struct clk *__init at91_clk_register_plldiv (struct regmap *regmap,const char *name,const char *parent_name) {
drivers/clk/at91/clk-programmable.c +1 -1
@@ -118,7 +118,7 @@ static const struct clk_ops programmable_ops = { .set_rate = clk_programmable_set_rate, }; -struct clk * +struct clk *__init at91_clk_register_programmable(struct regmap *regmap, const char *name, const char **parent_names, u8 num_parents, u8 id,
drivers/clk/at91/clk-smd.c +1 -1
@@ -109,7 +109,7 @@ static const struct clk_ops at91sam9x5_smd_ops = { .set_rate = at91sam9x5_clk_smd_set_rate, }; -struct clk * +struct clk *__init at91sam9x5_clk_register_smd (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents) {
drivers/clk/at91/clk-system.c +1 -1
@@ -85,7 +85,7 @@ static const struct clk_ops system_ops = { .is_enabled = clk_system_is_enabled, }; -struct clk * +struct clk *__init at91_clk_register_system (struct regmap *regmap,const char *name,const char *parent_name,u8 id) {
drivers/clk/at91/clk-usb.c +3 -3
@@ -138,7 +138,7 @@ static const struct clk_ops at91sam9n12_usb_ops = { .set_rate = at91sam9x5_clk_usb_set_rate, }; -struct clk * +struct clk *__init at91sam9x5_clk_register_usb (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents) {
@@ -166,7 +166,7 @@ at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,return &usb->clk; } -struct clk * +struct clk *__init at91sam9n12_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name) {
@@ -276,7 +276,7 @@ static const struct clk_ops at91rm9200_usb_ops = { .set_rate = at91rm9200_clk_usb_set_rate, }; -struct clk * +struct clk *__init at91rm9200_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name,const u32 *divisors) {
drivers/clk/at91/pmc.h +19 -19
@@ -84,83 +84,83 @@ int of_at91_get_clk_range(struct device_node *np, const char *propname,struct clk *of_clk_hw_pmc_get (struct of_phandle_args *clkspec,void *data); -struct clk * +struct clk *__init at91_clk_register_generated (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents,u8 id,bool pll_audio,const struct clk_range *range); -struct clk * +struct clk *__init at91_clk_register_h32mx (struct regmap *regmap,const char *name,const char *parent_name); -struct clk * +struct clk *__init at91_clk_register_main_rc_osc (struct regmap *regmap,const char *name,u32 frequency,u32 accuracy); -struct clk * +struct clk *__init at91_clk_register_main_osc (struct regmap *regmap,const char *name,const char *parent_name,bool bypass); -struct clk * +struct clk *__init at91_clk_register_rm9200_main (struct regmap *regmap,const char *name,const char *parent_name); -struct clk * +struct clk *__init at91_clk_register_sam9x5_main (struct regmap *regmap,const char *name,const char **parent_names,int num_parents); -struct clk * +struct clk *__init at91_clk_register_master (struct regmap *regmap,const char *name,int num_parents,const char **parent_names,const struct clk_master_layout *layout,const struct clk_master_characteristics *characteristics); -struct clk * +struct clk *__init at91_clk_register_peripheral (struct regmap *regmap,const char *name,const char *parent_name,u32 id); -struct clk * +struct clk *__init at91_clk_register_sam9x5_peripheral (struct regmap *regmap,const char *name,const char *parent_name,u32 id,const struct clk_range *range); -struct clk * +struct clk *__init at91_clk_register_pll (struct regmap *regmap,const char *name,const char *parent_name,u8 id,const struct clk_pll_layout *layout,const struct clk_pll_characteristics *characteristics); -struct clk * +struct clk *__init at91_clk_register_plldiv (struct regmap *regmap,const char *name,const char *parent_name); -struct clk * +struct clk *__init at91_clk_register_programmable (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents,u8 id,const struct clk_programmable_layout *layout); -struct clk * +struct clk *__init at91_clk_register_sam9260_slow (struct regmap *regmap,const char *name,const char **parent_names,int num_parents); -struct clk * +struct clk *__init at91sam9x5_clk_register_smd (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents); -struct clk * +struct clk *__init at91_clk_register_system (struct regmap *regmap,const char *name,const char *parent_name,u8 id); -struct clk * +struct clk *__init at91sam9x5_clk_register_usb (struct regmap *regmap,const char *name,const char **parent_names,u8 num_parents); -struct clk * +struct clk *__init at91sam9n12_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name); -struct clk * +struct clk *__init at91rm9200_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name,const u32 *divisors); -struct clk * +struct clk *__init at91_clk_register_utmi (struct regmap *regmap_pmc,struct regmap *regmap_sfr,const char *name,const char *parent_name);
drivers/clk/at91/sckc.c +3 -3
@@ -113,7 +113,7 @@ static const struct clk_ops slow_osc_ops = { .is_enabled = clk_slow_osc_is_enabled, }; -static struct clk * +static struct clk *__init at91_clk_register_slow_osc(void __iomem *sckcr, const char *name, const char *parent_name,
@@ -214,7 +214,7 @@ static const struct clk_ops slow_rc_osc_ops = { .recalc_rate = clk_slow_rc_osc_recalc_rate, }; -static struct clk * +static struct clk *__init at91_clk_register_slow_rc_osc(void __iomem *sckcr, const char *name, unsigned long frequency,
@@ -304,7 +304,7 @@ static const struct clk_ops sam9x5_slow_ops = { .get_parent = clk_sam9x5_slow_get_parent, }; -static struct clk * +static struct clk *__init at91_clk_register_sam9x5_slow(void __iomem *sckcr, const char *name, const char **parent_names,
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 17/21 clk: at91: Mark struct clk_range as const
In reply to Ahmad FatoumFrom: Stephen Boyd <[email protected]>
It's just some static data that doesn't get changed after being used. Mark it const everywhere.
--- drivers/clk/at91/at91sam9260.c | 14 +++++++------- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 2 +- drivers/clk/at91/pmc.h | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-)
drivers/clk/at91/at91sam9260.c +7 -7
@@ -47,7 +47,7 @@ static u8 sam9260_plla_out[] = { 0, 2 };static u16 sam9260_plla_icpll[] = {1 ,1 }; -static struct clk_range sam9260_plla_outputs[] = { +static const struct clk_range sam9260_plla_outputs[] = { { .min =80000000 , .max =160000000 }, { .min =150000000 , .max =240000000 }, };
@@ -64,7 +64,7 @@ static u8 sam9260_pllb_out[] = { 1 };static u16 sam9260_pllb_icpll[] = {1 }; -static struct clk_range sam9260_pllb_outputs[] = { +static const struct clk_range sam9260_pllb_outputs[] = { { .min =70000000 , .max =130000000 }, };
@@ -134,7 +134,7 @@ static u8 sam9g20_plla_out[] = { 0, 1, 2, 3, 0, 1, 2, 3 };static u16 sam9g20_plla_icpll[] = {0 ,0 ,0 ,0 ,1 ,1 ,1 ,1 }; -static struct clk_range sam9g20_plla_outputs[] = { +static const struct clk_range sam9g20_plla_outputs[] = { { .min =745000000 , .max =800000000 }, { .min =695000000 , .max =750000000 }, { .min =645000000 , .max =700000000 },
@@ -157,7 +157,7 @@ static u8 sam9g20_pllb_out[] = { 0 };static u16 sam9g20_pllb_icpll[] = {0 }; -static struct clk_range sam9g20_pllb_outputs[] = { +static const struct clk_range sam9g20_pllb_outputs[] = { { .min =30000000 , .max =100000000 }, };
@@ -188,7 +188,7 @@ static const struct clk_master_characteristics sam9261_mck_characteristics = { .divisors = { 1, 2, 4, 0 }, }; -static struct clk_range sam9261_plla_outputs[] = { +static const struct clk_range sam9261_plla_outputs[] = { { .min =80000000 , .max =200000000 }, { .min =190000000 , .max =240000000 }, };
@@ -205,7 +205,7 @@ static u8 sam9261_pllb_out[] = { 1 };static u16 sam9261_pllb_icpll[] = {1 }; -static struct clk_range sam9261_pllb_outputs[] = { +static const struct clk_range sam9261_pllb_outputs[] = { { .min =70000000 , .max =130000000 }, };
@@ -268,7 +268,7 @@ static const struct clk_master_characteristics sam9263_mck_characteristics = { .divisors = { 1, 2, 4, 0 }, }; -static struct clk_range sam9263_pll_outputs[] = { +static const struct clk_range sam9263_pll_outputs[] = { { .min =80000000 , .max =200000000 }, { .min =190000000 , .max =240000000 }, };
drivers/clk/at91/at91sam9rl.c +1 -1
@@ -20,7 +20,7 @@ static const struct clk_master_characteristics sam9rl_mck_characteristics = {static u8 sam9rl_plla_out[] = {0 ,2 }; -static struct clk_range sam9rl_plla_outputs[] = { +static const struct clk_range sam9rl_plla_outputs[] = { { .min =80000000 , .max =200000000 }, { .min =190000000 , .max =240000000 }, };
drivers/clk/at91/at91sam9x5.c +1 -1
@@ -23,7 +23,7 @@ static u8 plla_out[] = { 0, 1, 2, 3, 0, 1, 2, 3 };static u16 plla_icpll[] = {0 ,0 ,0 ,0 ,1 ,1 ,1 ,1 }; -static struct clk_range plla_outputs[] = { +static const struct clk_range plla_outputs[] = { { .min =745000000 , .max =800000000 }, { .min =695000000 , .max =750000000 }, { .min =645000000 , .max =700000000 },
drivers/clk/at91/pmc.h +1 -1
@@ -58,7 +58,7 @@ extern const struct clk_pll_layout sama5d3_pll_layout;struct clk_pll_characteristics {struct clk_range input;int num_output; -struct clk_range *output; +const struct clk_range *output;u16 *icpll;u8 *out; };
drivers/clk/at91/sama5d2.c +1 -1
@@ -22,7 +22,7 @@ static u8 plla_out[] = { 0 };static u16 plla_icpll[] = {0 }; -static struct clk_range plla_outputs[] = { +static const struct clk_range plla_outputs[] = { { .min =600000000 , .max =1200000000 }, };
drivers/clk/at91/sama5d4.c +1 -1
@@ -22,7 +22,7 @@ static u8 plla_out[] = { 0 };static u16 plla_icpll[] = {0 }; -static struct clk_range plla_outputs[] = { +static const struct clk_range plla_outputs[] = { { .min =600000000 , .max =1200000000 }, };
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 18/21 clk: at91: allow 24 Mhz clock as input for PLL
In reply to Ahmad FatoumFrom: Eugen Hristev <[email protected]>
The PLL input range needs to be able to allow 24 Mhz crystal as input Update the range accordingly in plla characteristics struct
--- drivers/clk/at91/sama5d2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/at91/sama5d2.c +1 -1
@@ -27,7 +27,7 @@ static const struct clk_range plla_outputs[] = { };static const struct clk_pll_characteristics plla_characteristics = { - .input = { .min =12000000 , .max =12000000 }, + .input = { .min =12000000 , .max =24000000 }, .num_output =ARRAY_SIZE (plla_outputs), .output = plla_outputs, .icpll = plla_icpll,
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 19/21 clk: at91: add sama5d2 audio PLL support
In reply to Ahmad FatoumCommit 7310b976 ("clk: at91: fix compilation errors in sama5d2.c") and follow-up commit ca3077068c ("clk: at91: delete dead i2s/audio code") had deleted the i2s/audio clock related parts of the upstream driver.
This was mostly due to unwillingness on my part to understand the code enough for porting them and because I deemed them unnecessary to support in barebox. The former has changed and the latter is not totally true as audio PLL derived clocks may be muxed as inputs for programmable and generated clocks.
Port them over and mimize the diff to upstream.
--- arch/arm/mach-at91/Kconfig | 8 + drivers/clk/at91/Makefile | 2 + drivers/clk/at91/clk-audio-pll.c | 512 +++++++++++++++++++++++++++++++ drivers/clk/at91/clk-generated.c | 5 +- drivers/clk/at91/clk-i2s-mux.c | 87 ++++++ drivers/clk/at91/pmc.c | 2 + drivers/clk/at91/pmc.h | 17 + drivers/clk/at91/sama5d2.c | 49 ++- include/linux/clk/at91_pmc.h | 25 ++ 9 files changed, 702 insertions(+), 5 deletions(-) create mode 100644 drivers/clk/at91/clk-audio-pll.c create mode 100644 drivers/clk/at91/clk-i2s-mux.c
arch/arm/mach-at91/Kconfig +8 -0
@@ -34,6 +34,12 @@ config HAVE_AT91_GENERATED_CLK config HAVE_AT91_BOOTSTRAP bool +config HAVE_AT91_AUDIO_PLL + bool + +config HAVE_AT91_I2S_MUX_CLK + bool + # Select if board uses the common at91sam926x_board_init config AT91SAM926X_BOARD_INIT bool
@@ -71,6 +77,8 @@ config SOC_SAMA5D2 select HAVE_AT91_USB_CLK select HAVE_AT91_GENERATED_CLK select PINCTRL + select HAVE_AT91_AUDIO_PLL + select HAVE_AT91_I2S_MUX_CLK select PINCTRL_AT91PIO4 select HAS_MACB select HAVE_MACH_ARM_HEAD
drivers/clk/at91/Makefile +2 -0
@@ -7,11 +7,13 @@ obj-y += pmc.o sckc.o obj-y += clk-slow.o clk-main.o clk-pll.o clk-plldiv.o clk-master.o obj-y += clk-system.o clk-peripheral.o clk-programmable.o +obj-$(CONFIG_HAVE_AT91_AUDIO_PLL) += clk-audio-pll.o obj-$(CONFIG_HAVE_AT91_UTMI) += clk-utmi.o obj-$(CONFIG_HAVE_AT91_USB_CLK) += clk-usb.o obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o obj-$(CONFIG_HAVE_AT91_H32MX) += clk-h32mx.o obj-$(CONFIG_HAVE_AT91_GENERATED_CLK) += clk-generated.o +obj-$(CONFIG_HAVE_AT91_I2S_MUX_CLK) += clk-i2s-mux.o obj-$(CONFIG_SOC_AT91SAM9) += at91sam9260.o at91sam9rl.o at91sam9x5.o dt-compat.o obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o obj-$(CONFIG_SOC_SAMA5D3) += dt-compat.o
drivers/clk/at91/clk-audio-pll.c new file +512 -0
512 lines not on this page · raw message
drivers/clk/at91/clk-generated.c +4 -1
@@ -19,6 +19,8 @@#define GENERATED_MAX_DIV 255 +#define GCK_INDEX_DT_AUDIO_PLL 5 +struct clk_generated {struct clk hw;struct regmap *regmap;
@@ -26,6 +28,7 @@ struct clk_generated {u32 id;u32 gckdiv;u8 parent_id; +bool audio_pll_allowed; };#define to_clk_generated (hw) \
@@ -182,7 +185,7 @@ at91_clk_register_generated(struct regmap *regmap,/* gck->hw.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE; */ gck->regmap = regmap; gck->range = *range; -/* gck->audio_pll_allowed = pll_audio; */ + gck->audio_pll_allowed = pll_audio; hw = &gck->hw; ret =clk_register (&gck->hw);
drivers/clk/at91/clk-i2s-mux.c new file +87 -0
87 lines not on this page · raw message
drivers/clk/at91/pmc.c +2 -0
@@ -135,6 +135,8 @@ static structu32 imr;u32 pcsr1;u32 pcr[PMC_MAX_IDS ]; +u32 audio_pll0; +u32 audio_pll1;u32 pckr[PMC_MAX_PCKS ]; } pmc_cache;
drivers/clk/at91/pmc.h +17 -0
@@ -84,6 +84,18 @@ int of_at91_get_clk_range(struct device_node *np, const char *propname,struct clk *of_clk_hw_pmc_get (struct of_phandle_args *clkspec,void *data); +struct clk *__init +at91_clk_register_audio_pll_frac (struct regmap *regmap,const char *name, +const char *parent_name); + +struct clk *__init +at91_clk_register_audio_pll_pad (struct regmap *regmap,const char *name, +const char *parent_name); + +struct clk *__init +at91_clk_register_audio_pll_pmc (struct regmap *regmap,const char *name, +const char *parent_name); +struct clk *__init at91_clk_register_generated(struct regmap *regmap, const char *name, const char **parent_names,
@@ -94,6 +106,11 @@ struct clk * __init at91_clk_register_h32mx(struct regmap *regmap, const char *name, const char *parent_name); +struct clk *__init +at91_clk_i2s_mux_register (struct regmap *regmap,const char *name, +const char *const *parent_names, +unsigned int num_parents,u8 bus_id); +struct clk *__init at91_clk_register_main_rc_osc (struct regmap *regmap,const char *name,u32 frequency,u32 accuracy);
drivers/clk/at91/sama5d2.c +45 -4
106 lines not on this page · raw message
include/linux/clk/at91_pmc.h +25 -0
@@ -181,4 +181,29 @@#define AT91_PMC_PCR_EN (0x1 << 28)/* Enable */ #define AT91_PMC_PCR_GCKEN (0x1 << 29)/* GCK Enable */ +#define AT91_PMC_AUDIO_PLL0 0x14c +#define AT91_PMC_AUDIO_PLL_PLLEN (1 << 0) +#define AT91_PMC_AUDIO_PLL_PADEN (1 << 1) +#define AT91_PMC_AUDIO_PLL_PMCEN (1 << 2) +#define AT91_PMC_AUDIO_PLL_RESETN (1 << 3) +#define AT91_PMC_AUDIO_PLL_ND_OFFSET 8 +#define AT91_PMC_AUDIO_PLL_ND_MASK (0x7f << AT91_PMC_AUDIO_PLL_ND_OFFSET) +#define AT91_PMC_AUDIO_PLL_ND (n) ((n) << AT91_PMC_AUDIO_PLL_ND_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPMC_OFFSET 16 +#define AT91_PMC_AUDIO_PLL_QDPMC_MASK (0x7f << AT91_PMC_AUDIO_PLL_QDPMC_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPMC (n) ((n) << AT91_PMC_AUDIO_PLL_QDPMC_OFFSET) + +#define AT91_PMC_AUDIO_PLL1 0x150 +#define AT91_PMC_AUDIO_PLL_FRACR_MASK 0x3fffff +#define AT91_PMC_AUDIO_PLL_QDPAD_OFFSET 24 +#define AT91_PMC_AUDIO_PLL_QDPAD_MASK (0x7f << AT91_PMC_AUDIO_PLL_QDPAD_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPAD (n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET AT91_PMC_AUDIO_PLL_QDPAD_OFFSET +#define AT91_PMC_AUDIO_PLL_QDPAD_DIV_MASK (0x3 << AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPAD_DIV (n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_DIV_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET 26 +#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MAX 0x1f +#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MASK (AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_MAX << AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET) +#define AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV (n) ((n) << AT91_PMC_AUDIO_PLL_QDPAD_EXTDIV_OFFSET) +#endif
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 20/21 clk: at91: port Linux v5.6 SAM9X60 (new ARM926EJ-S) clock support
In reply to Ahmad FatoumDuring a bug hunt that ultimately turned out unrelated to the state of the barebox at91 clk driver, I synchronized its state with Linux v5.6.
Bug fixes and clean up to minimize the diff were split out in separate prior commits. This last commit imports the rest, which is basically support for Microchip's new ARM926EJ-S SoC, the SAM9x60.
--- arch/arm/mach-at91/Kconfig | 11 + drivers/clk/at91/Makefile | 2 + drivers/clk/at91/at91sam9x5.c | 12 +- drivers/clk/at91/clk-generated.c | 56 +++-- drivers/clk/at91/clk-main.c | 10 +- drivers/clk/at91/clk-master.c | 7 +- drivers/clk/at91/clk-peripheral.c | 43 ++-- drivers/clk/at91/clk-pll.c | 12 +- drivers/clk/at91/clk-programmable.c | 44 +++- drivers/clk/at91/clk-sam9x60-pll.c | 322 ++++++++++++++++++++++++ drivers/clk/at91/clk-usb.c | 33 ++- drivers/clk/at91/dt-compat.c | 9 + drivers/clk/at91/pmc.c | 8 +- drivers/clk/at91/pmc.h | 28 ++- drivers/clk/at91/sam9x60.c | 313 +++++++++++++++++++++++ drivers/clk/at91/sama5d2.c | 20 +- drivers/clk/at91/sama5d4.c | 8 + drivers/clk/at91/sckc.c | 372 ++++++++++++++++++---------- include/linux/clk/at91_pmc.h | 28 ++- 19 files changed, 1115 insertions(+), 223 deletions(-) create mode 100644 drivers/clk/at91/clk-sam9x60-pll.c create mode 100644 drivers/clk/at91/sam9x60.c
arch/arm/mach-at91/Kconfig +11 -0
@@ -40,6 +40,9 @@ config HAVE_AT91_AUDIO_PLL config HAVE_AT91_I2S_MUX_CLK bool +config HAVE_AT91_SAM9X60_PLL + bool + # Select if board uses the common at91sam926x_board_init config AT91SAM926X_BOARD_INIT bool
@@ -108,6 +111,14 @@ config SOC_SAMA5D4 select HAS_MACB select HAVE_MACH_ARM_HEAD +config SOC_SAM9X60 + bool + select CPU_ARM926T + select HAVE_AT91_USB_CLK + select HAVE_AT91_GENERATED_CLK + select HAVE_AT91_SAM9X60_PLL + select PINCTRL_AT91 + config ARCH_TEXT_BASE hex default 0x73f00000 if SOC_AT91SAM9G45
drivers/clk/at91/Makefile +2 -0
@@ -14,7 +14,9 @@ obj-$(CONFIG_HAVE_AT91_SMD) += clk-smd.o obj-$(CONFIG_HAVE_AT91_H32MX) += clk-h32mx.o obj-$(CONFIG_HAVE_AT91_GENERATED_CLK) += clk-generated.o obj-$(CONFIG_HAVE_AT91_I2S_MUX_CLK) += clk-i2s-mux.o +obj-$(CONFIG_HAVE_AT91_SAM9X60_PLL) += clk-sam9x60-pll.o obj-$(CONFIG_SOC_AT91SAM9) += at91sam9260.o at91sam9rl.o at91sam9x5.o dt-compat.o +obj-$(CONFIG_SOC_SAM9X60) += sam9x60.o obj-$(CONFIG_SOC_SAMA5D4) += sama5d4.o obj-$(CONFIG_SOC_SAMA5D3) += dt-compat.o obj-$(CONFIG_SOC_SAMA5D2) += sama5d2.o
drivers/clk/at91/at91sam9x5.c +10 -2
@@ -55,6 +55,13 @@ static const struct { { .n = "pck1", .p = "prog1", .id = 9 }, }; +static const struct clk_pcr_layout at91sam9x5_pcr_layout = { + .offset =0x10c , + .cmd =BIT (12 ), + .pid_mask =GENMASK (5 ,0 ), + .div_mask =GENMASK (17 ,16 ), +}; + struct pck { char *n; u8 id;
@@ -150,8 +157,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,return ; at91sam9x5_pmc =pmc_data_allocate (PMC_MAIN +1 , -nck (at91sam9x5_systemck), -nck (at91sam9x35_periphck),0 ); +nck (at91sam9x5_systemck),31 ,0 );if (!at91sam9x5_pmc)return ;
@@ -249,6 +255,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,for (i =0 ; i <ARRAY_SIZE (at91sam9x5_periphck); i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &at91sam9x5_pcr_layout, at91sam9x5_periphck[i].n, "masterck", at91sam9x5_periphck[i].id,
@@ -261,6 +268,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np,for (i =0 ; extra_pcks[i].id; i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &at91sam9x5_pcr_layout, extra_pcks[i].n, "masterck", extra_pcks[i].id,
drivers/clk/at91/clk-generated.c +30 -26
112 lines not on this page · raw message
drivers/clk/at91/clk-main.c +7 -3
@@ -21,6 +21,10 @@#define MOR_KEY_MASK (0xff << 16) +#define clk_main_parent_select (s) (((s) & \ + (AT91_PMC_MOSCEN | \ + AT91_PMC_OSCBYPASS)) ? 1 : 0) +struct clk_main_osc {struct clk clk;struct regmap *regmap;
@@ -114,7 +118,7 @@ static int clk_main_osc_is_enabled(struct clk *clk)regmap_read (regmap,AT91_PMC_SR , &status); -return (status &AT91_PMC_MOSCS ) && (tmp &AT91_PMC_MOSCEN ); +return (status &AT91_PMC_MOSCS ) &&clk_main_parent_select (tmp); }static const struct clk_ops main_osc_ops = {
@@ -417,7 +421,7 @@ static int clk_sam9x5_main_get_parent(struct clk *clk)regmap_read (clkmain->regmap,AT91_CKGR_MOR , &status); -return status &AT91_PMC_MOSCEN ?1 :0 ; +return clk_main_parent_select (status); }static const struct clk_ops sam9x5_main_ops = {
@@ -457,7 +461,7 @@ at91_clk_register_sam9x5_main(struct regmap *regmap, clkmain->regmap = regmap;regmap_read (clkmain->regmap,AT91_CKGR_MOR , &status); - clkmain->parent = status &AT91_PMC_MOSCEN ?1 :0 ; + clkmain->parent =clk_main_parent_select (status); ret =clk_register (&clkmain->clk);if (ret) {
drivers/clk/at91/clk-master.c +5 -2
@@ -27,6 +27,7 @@ struct clk_master {const struct clk_master_layout *layout;const struct clk_master_characteristics *characteristics;const char *parents[MASTER_SOURCE_MAX ]; +u32 mckr; };static inline bool clk_master_ready (struct regmap *regmap)
@@ -67,7 +68,7 @@ static unsigned long clk_master_recalc_rate(struct clk *clk, master->characteristics;unsigned int mckr; -regmap_read (master->regmap,AT91_PMC_MCKR , &mckr); +regmap_read (master->regmap, master->layout->offset, &mckr); mckr &= layout->mask; pres = (mckr >> layout->pres_shift) &MASTER_PRES_MASK ;
@@ -93,7 +94,7 @@ static int clk_master_get_parent(struct clk *clk)struct clk_master *master =to_clk_master (clk);unsigned int mckr; -regmap_read (master->regmap,AT91_PMC_MCKR , &mckr); +regmap_read (master->regmap, master->layout->offset, &mckr);return mckr &AT91_PMC_CSS ; }
@@ -144,9 +145,11 @@ at91_clk_register_master(struct regmap *regmap,const struct clk_master_layout at91rm9200_master_layout = { .mask =0x31F , .pres_shift =2 , + .offset =AT91_PMC_MCKR , };const struct clk_master_layout at91sam9x5_master_layout = { .mask =0x373 , .pres_shift =4 , + .offset =AT91_PMC_MCKR , };
drivers/clk/at91/clk-peripheral.c +24 -19
94 lines not on this page · raw message
drivers/clk/at91/clk-pll.c +2 -10
@@ -116,19 +116,11 @@ static unsigned long clk_pll_recalc_rate(struct clk *clk, unsigned long parent_rate) {struct clk_pll *pll =to_clk_pll (clk); -unsigned int pllr; -u16 mul; -u8 div; - -regmap_read (pll->regmap,PLL_REG (pll->id), &pllr); - - div =PLL_DIV (pllr); - mul =PLL_MUL (pllr, pll->layout); -if (!div || !mul) +if (!pll->div || !pll->mul)return 0 ; -return (parent_rate / div) * (mul +1 ); +return (parent_rate / pll->div) * (pll->mul +1 ); } static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
drivers/clk/at91/clk-programmable.c +31 -13
98 lines not on this page · raw message
drivers/clk/at91/clk-sam9x60-pll.c new file +322 -0
322 lines not on this page · raw message
drivers/clk/at91/clk-usb.c +27 -6
@@ -22,10 +22,14 @@#define RM9200_USB_DIV_SHIFT 28#define RM9200_USB_DIV_TAB_SIZE 4 +#define SAM9X5_USBS_MASK GENMASK(0, 0) +#define SAM9X60_USBS_MASK GENMASK(1, 0) +struct at91sam9x5_clk_usb {struct clk clk;struct regmap *regmap;const char *parent_names[USB_SOURCE_MAX ]; +u32 usbs_mask; };#define to_at91sam9x5_clk_usb (clk) \
@@ -61,8 +65,7 @@ static int at91sam9x5_clk_usb_set_parent(struct clk *clk, u8 index)if (index >1 )return -EINVAL ; -regmap_write_bits (usb->regmap,AT91_PMC_USB ,AT91_PMC_USBS , - index ?AT91_PMC_USBS :0 ); +regmap_write_bits (usb->regmap,AT91_PMC_USB , usb->usbs_mask, index);return 0 ; }
@@ -74,7 +77,7 @@ static int at91sam9x5_clk_usb_get_parent(struct clk *clk)regmap_read (usb->regmap,AT91_PMC_USB , &usbr); -return usbr &AT91_PMC_USBS ; +return usbr & usb->usbs_mask; } static int at91sam9x5_clk_usb_set_rate(struct clk *clk, unsigned long rate,
@@ -138,9 +141,10 @@ static const struct clk_ops at91sam9n12_usb_ops = { .set_rate = at91sam9x5_clk_usb_set_rate, }; -struct clk *__init -at91sam9x5_clk_register_usb (struct regmap *regmap,const char *name, -const char **parent_names,u8 num_parents) +static struct clk *__init +_at91sam9x5_clk_register_usb (struct regmap *regmap,const char *name, +const char **parent_names,u8 num_parents, +u32 usbs_mask) {struct at91sam9x5_clk_usb *usb;int ret;
@@ -156,6 +160,7 @@ at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,/* init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE | */ /* CLK_SET_RATE_PARENT; */ usb->regmap = regmap; + usb->usbs_mask =SAM9X5_USBS_MASK ; ret =clk_register (&usb->clk);if (ret) {
@@ -166,6 +171,22 @@ at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name,return &usb->clk; } +struct clk *__init +at91sam9x5_clk_register_usb (struct regmap *regmap,const char *name, +const char **parent_names,u8 num_parents) +{ +return _at91sam9x5_clk_register_usb (regmap, name, parent_names, + num_parents,SAM9X5_USBS_MASK ); +} + +struct clk *__init +sam9x60_clk_register_usb (struct regmap *regmap,const char *name, +const char **parent_names,u8 num_parents) +{ +return _at91sam9x5_clk_register_usb (regmap, name, parent_names, + num_parents,SAM9X60_USBS_MASK ); +} +struct clk *__init at91sam9n12_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name)
drivers/clk/at91/dt-compat.c +9 -0
@@ -23,6 +23,14 @@#define SYSTEM_MAX_ID 31 +static const struct clk_pcr_layout dt_pcr_layout = { + .offset =0x10c , + .cmd =BIT (12 ), + .pid_mask =GENMASK (5 ,0 ), + .div_mask =GENMASK (17 ,16 ), + .gckcss_mask =GENMASK (10 ,8 ), +}; +static void __init of_at91rm9200_clk_main_osc_setup (struct device_node *np) {struct clk *hw;
@@ -248,6 +256,7 @@ of_at91_clk_periph_setup(struct device_node *np, u8 type) &range); hw =at91_clk_register_sam9x5_peripheral (regmap, + &dt_pcr_layout, name, parent_name, id, &range);
drivers/clk/at91/pmc.c +4 -4
@@ -89,22 +89,22 @@ struct pmc_data *pmc_data_allocate(unsigned int ncore, unsigned int nsystem,return NULL ; pmc_data->ncore = ncore; - pmc_data->chws =kcalloc (ncore,sizeof (struct clk_hw *),GFP_KERNEL ); + pmc_data->chws =kcalloc (ncore,sizeof (struct clk *),GFP_KERNEL );if (!pmc_data->chws) goto err; pmc_data->nsystem = nsystem; - pmc_data->shws =kcalloc (nsystem,sizeof (struct clk_hw *),GFP_KERNEL ); + pmc_data->shws =kcalloc (nsystem,sizeof (struct clk *),GFP_KERNEL );if (!pmc_data->shws) goto err; pmc_data->nperiph = nperiph; - pmc_data->phws =kcalloc (nperiph,sizeof (struct clk_hw *),GFP_KERNEL ); + pmc_data->phws =kcalloc (nperiph,sizeof (struct clk *),GFP_KERNEL );if (!pmc_data->phws) goto err; pmc_data->ngck = ngck; - pmc_data->ghws =kcalloc (ngck,sizeof (struct clk_hw *),GFP_KERNEL ); + pmc_data->ghws =kcalloc (ngck,sizeof (struct clk *),GFP_KERNEL );if (!pmc_data->ghws) goto err;
drivers/clk/at91/pmc.h +27 -1
@@ -9,7 +9,7 @@#define __PMC_H_#include <io.h> -#include <linux/spinlock.h> +#include <linux/bitops.h> #include <printk.h> struct pmc_data {
@@ -31,6 +31,7 @@ struct clk_range {#define CLK_RANGE (MIN ,MAX ) {.min = MIN, .max = MAX,}struct clk_master_layout { +u32 offset;u32 mask;u8 pres_shift; };
@@ -61,18 +62,32 @@ struct clk_pll_characteristics {const struct clk_range *output;u16 *icpll;u8 *out; + u8 upll : 1; };struct clk_programmable_layout { +u8 pres_mask;u8 pres_shift;u8 css_mask;u8 have_slck_mck; +u8 is_pres_direct; };extern const struct clk_programmable_layout at91rm9200_programmable_layout;extern const struct clk_programmable_layout at91sam9g45_programmable_layout;extern const struct clk_programmable_layout at91sam9x5_programmable_layout; +struct clk_pcr_layout { +u32 offset; +u32 cmd; +u32 div_mask; +u32 gckcss_mask; +u32 pid_mask; +}; + +#define field_get (_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1)) +#define field_prep (_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask)) +#define ndck (a, s) (a[s - 1].id + 1)#define nck (a) (a[ARRAY_SIZE(a) - 1].id + 1) struct pmc_data *pmc_data_allocate(unsigned int ncore, unsigned int nsystem,
@@ -98,6 +113,7 @@ at91_clk_register_audio_pll_pmc(struct regmap *regmap, const char *name,struct clk *__init at91_clk_register_generated (struct regmap *regmap, +const struct clk_pcr_layout *layout,const char *name,const char **parent_names,u8 num_parents,u8 id,bool pll_audio,const struct clk_range *range);
@@ -136,6 +152,7 @@ at91_clk_register_peripheral(struct regmap *regmap, const char *name, const char *parent_name, u32 id);struct clk *__init at91_clk_register_sam9x5_peripheral (struct regmap *regmap, +const struct clk_pcr_layout *layout,const char *name,const char *parent_name,u32 id,const struct clk_range *range);
@@ -148,6 +165,11 @@ struct clk * __init at91_clk_register_plldiv(struct regmap *regmap, const char *name, const char *parent_name); +struct clk *__init +sam9x60_clk_register_pll (struct regmap *regmap, +const char *name,const char *parent_name,u8 id, +const struct clk_pll_characteristics *characteristics); +struct clk *__init at91_clk_register_programmable(struct regmap *regmap, const char *name, const char **parent_names, u8 num_parents, u8 id,
@@ -174,6 +196,10 @@ struct clk * __init at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name, const char *parent_name);struct clk *__init +sam9x60_clk_register_usb (struct regmap *regmap,const char *name, +const char **parent_names,u8 num_parents); + +struct clk *__init at91rm9200_clk_register_usb (struct regmap *regmap,const char *name,const char *parent_name,const u32 *divisors);
drivers/clk/at91/sam9x60.c new file +313 -0
313 lines not on this page · raw message
drivers/clk/at91/sama5d2.c +19 -1
@@ -34,6 +34,13 @@ static const struct clk_pll_characteristics plla_characteristics = { .out = plla_out, }; +static const struct clk_pcr_layout sama5d2_pcr_layout = { + .offset =0x10c , + .cmd =BIT (12 ), + .gckcss_mask =GENMASK (10 ,8 ), + .pid_mask =GENMASK (6 ,0 ), +}; + static const struct { char *n; char *p;
@@ -131,6 +138,14 @@ static const struct { .pll = true }, }; +static const struct clk_programmable_layout sama5d2_programmable_layout = { + .pres_mask =0xff , + .pres_shift =4 , + .css_mask =0x7 , + .have_slck_mck =0 , + .is_pres_direct =1 , +}; +static void __init sama5d2_pmc_setup (struct device_node *np) {struct clk_range range =CLK_RANGE (0 ,0 );
@@ -255,7 +270,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) hw =at91_clk_register_programmable (regmap, name, parent_names,6 , i, - &at91sam9x5_programmable_layout); + &sama5d2_programmable_layout);if (IS_ERR (hw)) goto err_free; }
@@ -272,6 +287,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)for (i =0 ; i <ARRAY_SIZE (sama5d2_periphck); i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &sama5d2_pcr_layout, sama5d2_periphck[i].n, "masterck", sama5d2_periphck[i].id,
@@ -284,6 +300,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np)for (i =0 ; i <ARRAY_SIZE (sama5d2_periph32ck); i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &sama5d2_pcr_layout, sama5d2_periph32ck[i].n, "h32mxck", sama5d2_periph32ck[i].id,
@@ -302,6 +319,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) parent_names[5 ] ="audiopll_pmcck" ;for (i =0 ; i <ARRAY_SIZE (sama5d2_gck); i++) { hw = at91_clk_register_generated(regmap, + &sama5d2_pcr_layout, sama5d2_gck[i].n, parent_names, 6, sama5d2_gck[i].id,
drivers/clk/at91/sama5d4.c +8 -0
@@ -34,6 +34,12 @@ static const struct clk_pll_characteristics plla_characteristics = { .out = plla_out, }; +static const struct clk_pcr_layout sama5d4_pcr_layout = { + .offset =0x10c , + .cmd =BIT (12 ), + .pid_mask =GENMASK (6 ,0 ), +}; + static const struct { char *n; char *p;
@@ -238,6 +244,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)for (i =0 ; i <ARRAY_SIZE (sama5d4_periphck); i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &sama5d4_pcr_layout, sama5d4_periphck[i].n, "masterck", sama5d4_periphck[i].id,
@@ -250,6 +257,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np)for (i =0 ; i <ARRAY_SIZE (sama5d4_periph32ck); i++) { hw = at91_clk_register_sam9x5_peripheral(regmap, + &sama5d4_pcr_layout, sama5d4_periph32ck[i].n, "h32mxck", sama5d4_periph32ck[i].id,
drivers/clk/at91/sckc.c +245 -127
567 lines not on this page · raw message
include/linux/clk/at91_pmc.h +19 -9
@@ -43,8 +43,10 @@#define AT91_CKGR_MOR 0x20/* Main Oscillator Register [not on SAM9RL] */ #define AT91_PMC_MOSCEN (1 << 0)/* Main Oscillator Enable */ #define AT91_PMC_OSCBYPASS (1 << 1)/* Oscillator Bypass */ +#define AT91_PMC_WAITMODE (1 << 2)/* Wait Mode Command */ #define AT91_PMC_MOSCRCEN (1 << 3)/* Main On-Chip RC Oscillator Enable [some SAM9] */ #define AT91_PMC_OSCOUNT (0xff << 8)/* Main Oscillator Start-up Time */ +#define AT91_PMC_KEY_MASK (0xff << 16)#define AT91_PMC_KEY (0x37 << 16)/* MOR Writing Key */ #define AT91_PMC_MOSCSEL (1 << 24)/* Main Oscillator Selection [some SAM9] */ #define AT91_PMC_CFDEN (1 << 25)/* Clock Failure Detector Enable [some SAM9] */
@@ -68,6 +70,8 @@#define AT91_PMC_USBDIV_4 (2 << 28)#define AT91_PMC_USB96M (1 << 28)/* Divider by 2 Enable (PLLB only) */ +#define AT91_PMC_CPU_CKR 0x28/* CPU Clock Register */ +#define AT91_PMC_MCKR 0x30/* Master Clock Register */ #define AT91_PMC_CSS (3 << 0)/* Master Clock Selection */ #define AT91_PMC_CSS_SLOW (0 << 0)
@@ -151,6 +155,20 @@#define AT91_PMC_GCKRDY (1 << 24)/* Generated Clocks */ #define AT91_PMC_IMR 0x6c/* Interrupt Mask Register */ +#define AT91_PMC_FSMR 0x70/* Fast Startup Mode Register */ +#define AT91_PMC_FSTT (n) BIT(n) +#define AT91_PMC_RTTAL BIT(16) +#define AT91_PMC_RTCAL BIT(17)/* RTC Alarm Enable */ +#define AT91_PMC_USBAL BIT(18)/* USB Resume Enable */ +#define AT91_PMC_SDMMC_CD BIT(19)/* SDMMC Card Detect Enable */ +#define AT91_PMC_LPM BIT(20)/* Low-power Mode */ +#define AT91_PMC_RXLP_MCE BIT(24)/* Backup UART Receive Enable */ +#define AT91_PMC_ACC_CE BIT(25)/* ACC Enable */ + +#define AT91_PMC_FSPR 0x74/* Fast Startup Polarity Reg */ + +#define AT91_PMC_FS_INPUT_MASK 0x7ff +#define AT91_PMC_PLLICPR 0x80/* PLL Charge Pump Current Register */ #define AT91_PMC_PROT 0xe4/* Write Protect Mode Register [some SAM9] */
@@ -168,16 +186,8 @@#define AT91_PMC_PCR 0x10c/* Peripheral Control Register [some SAM9 and SAMA5] */ #define AT91_PMC_PCR_PID_MASK 0x3f -#define AT91_PMC_PCR_GCKCSS_OFFSET 8 -#define AT91_PMC_PCR_GCKCSS_MASK (0x7 << AT91_PMC_PCR_GCKCSS_OFFSET) -#define AT91_PMC_PCR_GCKCSS (n) ((n) << AT91_PMC_PCR_GCKCSS_OFFSET)/* GCK Clock Source Selection */ #define AT91_PMC_PCR_CMD (0x1 << 12)/* Command (read=0, write=1) */ -#define AT91_PMC_PCR_DIV_OFFSET 16 -#define AT91_PMC_PCR_DIV_MASK (0x3 << AT91_PMC_PCR_DIV_OFFSET) -#define AT91_PMC_PCR_DIV (n) ((n) << AT91_PMC_PCR_DIV_OFFSET)/* Divisor Value */ -#define AT91_PMC_PCR_GCKDIV_OFFSET 20 -#define AT91_PMC_PCR_GCKDIV_MASK (0xff << AT91_PMC_PCR_GCKDIV_OFFSET) -#define AT91_PMC_PCR_GCKDIV (n) ((n) << AT91_PMC_PCR_GCKDIV_OFFSET)/* Generated Clock Divisor Value */ +#define AT91_PMC_PCR_GCKDIV_MASK GENMASK(27, 20)#define AT91_PMC_PCR_EN (0x1 << 28)/* Enable */ #define AT91_PMC_PCR_GCKEN (0x1 << 29)/* GCK Enable */
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 21/21 clk: at91: sckc: fix off-by-1000 in udelay()
In reply to Ahmad FatoumSECOND is the number of nanoseconds in a second, but we need the number of microseconds for use in udelay. Use USEC_PER_SEC.
--- drivers/clk/at91/sckc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/at91/sckc.c +1 -1
@@ -20,7 +20,7 @@#define SLOW_CLOCK_FREQ 32768#define SLOWCK_SW_CYCLES 5 -#define SLOWCK_SW_TIME_USEC ((SLOWCK_SW_CYCLES * SECOND) / \ +#define SLOWCK_SW_TIME_USEC ((SLOWCK_SW_CYCLES * USEC_PER_SEC) / \ SLOW_CLOCK_FREQ)#define AT91_SCKC_CR 0x00
Signature · 7 lines
2.26.0.rc2 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Sascha Hauer
maintainerQuoted 6 lines · Ahmad Fatoum
During a bug hunt that ultimately turned out unrelated to the state of the barebox at91 clk driver, I synchronized its state with Linux v5.6.
This imports it, after cleanup. It refactors other code a bit to reduce the diff for the final port and future ones. What we gain from this:
Quoted 6 lines
- bug fixes that have been posted upstream in the meanwhile
- sam9x60 (new Microchip ARM926EJ-S) clock support
- sama5d2 audio PLL
- Some more helpers to make code porting slightly easier
- SPDX-License-Identifiers, not only for at91 clks, but for all ofdrivers/clk
Applied with the fixup and v2 of the first patch.
Sascha
Signature · 9 lines
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 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox