clk: qoriq: Move chip-specific knowledge into driver
Subsystems (9)
cover clk: qoriq: Move chip-specific knowledge into driver
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface rather than describing its individual registers.
For more detail, see the commit message of patch 4.
Scott Wood (8):
ARM: dts: ls1021a: Fix clockgen node
cpufreq: qoriq: Don't look at clock implementation details powerpc/fsl: Move fsl_guts.h out of arch/powerpc
clk: qoriq: Move chip-specific knowledge into driver
clk: qoriq: Redirect legacy clock nodes to new clocks
cpufreq: qoriq: Remove frequency masking and minimum
clk: qoriq: Expose OF clocks directly from the clockgen node powerpc/fsl: Use new clockgen binding
.../devicetree/bindings/clock/qoriq-clock.txt | 57 +- arch/arm/boot/dts/ls1021a.dtsi | 3 + arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/b4si-post.dtsi | 15 - arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 70 -- arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi | 16 +- arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi | 50 +- arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi | 33 +- arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 16 - arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 44 - arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 22 - arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 61 - arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi | 24 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- arch/powerpc/platforms/85xx/p1022_ds.c | 2 +- arch/powerpc/platforms/85xx/p1022_rdk.c | 2 +- arch/powerpc/platforms/85xx/smp.c | 2 +- arch/powerpc/platforms/85xx/twr_p102x.c | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 2 +- drivers/clk/clk-qoriq.c | 1191 ++++++++++++++++---- drivers/cpufreq/qoriq-cpufreq.c | 139 +-- drivers/iommu/fsl_pamu.c | 2 +- .../asm/fsl_guts.h => include/linux/fsl/guts.h | 6 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- 38 files changed, 1107 insertions(+), 776 deletions(-) rename arch/powerpc/include/asm/fsl_guts.h => include/linux/fsl/guts.h (98%)
Signature · 1 line
2.1.4
RFC PATCH 1/8 ARM: dts: ls1021a: Fix clockgen node
The binding requires compatible and reg properties, but the ls1021a device tree does not contain them. This will break with subsequent clock driver changes. If required (it's not clear to me whether the ls1 code currently works at all -- I tried multi_v7_defconfig and it didn't boot, whereas I was able to boot an SDK kernel), backwards compatibility can be retained with a device tree fixup.
LS1021A also deviates from existing QorIQ clockgen practice by making the sysclk node be a fixed-clock node rather than the U-Boot compatibility hack of having a clock-frequency property in the clockgen node itself, and a fsl,qoriq-sysclk-... node that exports the clock. While this is not a violation of the existing binding, the upcoming rework of the clock driver requires that a driver for the clockgen node itself be able to find the input clock. Thus, a clocks property is added to reference the sysclk node.
--- arch/arm/boot/dts/ls1021a.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/ls1021a.dtsi +3 -0
@@ -146,9 +146,12 @@ }; clockgen: clocking at 1ee1000 { + compatible = "fsl,ls201a-clockgen"; #address-cells = <1>; #size-cells = <1>; + reg = <0 0x1ee1000 0x10000>; ranges = <0x0 0x0 0x1ee1000 0x10000>; + clocks = <&sysclk>; sysclk: sysclk { compatible = "fixed-clock";
Signature · 1 line
2.1.4
RFC PATCH 2/8 cpufreq: qoriq: Don't look at clock implementation details
In reply to Scott WoodGet the CPU clock's potential parent clocks from the clock interface itself, rather than manually parsing the clocks property to find a phandle, looking at the clock-names property of that, and assuming that those are valid parent clocks for the cpu clock.
This is necessary for cpufreq to continue working once the clocks are generated based on the clock driver's knowledge of the chip rather than a fragile device-tree description of the mux options.
--- drivers/cpufreq/qoriq-cpufreq.c | 47 ++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 29 deletions(-)
drivers/cpufreq/qoriq-cpufreq.c +18 -29
@@ -11,6 +11,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/clk.h> +#include <linux/clk-provider.h> #include <linux/cpufreq.h> #include <linux/errno.h> #include <linux/init.h>
@@ -99,9 +100,10 @@ static u32 get_bus_freq(void)return sysfreq; } -static struct device_node *cpu_to_clk_node (int cpu) +static struct clk *cpu_to_clk (int cpu) { -struct device_node *np, *clk_np; +struct device_node *np; +struct clk *clk;if (!cpu_present (cpu))return NULL ;
@@ -110,37 +112,32 @@ static struct device_node *cpu_to_clk_node(int cpu)if (!np)return NULL ; - clk_np =of_parse_phandle (np,"clocks" ,0 ); -if (!clk_np) -return NULL ; - + clk =of_clk_get (np,0 );of_node_put (np); - -return clk_np; +return clk; }/* traverse cpu nodes to get cpu mask of sharing clock wire */ static void set_affected_cpus (struct cpufreq_policy *policy) { -struct device_node *np, *clk_np;struct cpumask *dstp = policy->cpus; +struct clk *clk; +const char *ourname, *theirname;int i; - np =cpu_to_clk_node (policy->cpu); -if (!np) -return ; + ourname =__clk_get_name (policy->clk);for_each_present_cpu (i) { - clk_np =cpu_to_clk_node (i); -if (!clk_np) + clk =cpu_to_clk (i); +if (IS_ERR (clk)) { +pr_err ("%s: no clock for cpu %d\n" , __func__, i);continue ; + } -if (clk_np == np) + theirname =__clk_get_name (clk); +if (!strcmp (ourname, theirname))cpumask_set_cpu (i, dstp); - -of_node_put (clk_np); } -of_node_put (np); }/* reduce the duplicated frequencies in frequency table */
@@ -219,17 +216,12 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) goto err_nomem2; } - pnode =of_parse_phandle (np,"clocks" ,0 ); -if (!pnode) { -pr_err ("%s: could not get clock information\n" , __func__); - goto err_nomem2; - } + count =__clk_get_num_parents (policy->clk); - count =of_property_count_strings (pnode,"clock-names" ); data->pclk =kcalloc (count,sizeof (struct clk *),GFP_KERNEL );if (!data->pclk) {pr_err ("%s: no memory\n" , __func__); - goto err_node; + goto err_nomem2; } table =kcalloc (count +1 ,sizeof (*table),GFP_KERNEL );
@@ -244,7 +236,7 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) mask =0x0 ;for (i =0 ; i < count; i++) { - clk =of_clk_get (pnode, i); + clk =clk_get_parent_by_index (policy->clk, i); data->pclk[i] = clk; freq =clk_get_rate (clk);/*
@@ -288,10 +280,7 @@ err_nomem1:kfree (table); err_pclk:kfree (data->pclk); -err_node: -of_node_put (pnode); err_nomem2: - policy->driver_data =NULL ;kfree (data); err_np:of_node_put (np);
Signature · 1 line
2.1.4
RFC PATCH 3/8 powerpc/fsl: Move fsl_guts.h out of arch/powerpc
In reply to Scott WoodFreescale's Layerscape ARM chips use the same structure.
--- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- arch/powerpc/platforms/85xx/p1022_ds.c | 2 +- arch/powerpc/platforms/85xx/p1022_rdk.c | 2 +- arch/powerpc/platforms/85xx/smp.c | 2 +- arch/powerpc/platforms/85xx/twr_p102x.c | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 2 +- drivers/iommu/fsl_pamu.c | 2 +- arch/powerpc/include/asm/fsl_guts.h => include/linux/fsl/guts.h | 6 ++---- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- 12 files changed, 13 insertions(+), 15 deletions(-) rename arch/powerpc/include/asm/fsl_guts.h => include/linux/fsl/guts.h (98%)
arch/powerpc/platforms/85xx/mpc85xx_mds.c +1 -1
@@ -34,6 +34,7 @@#include <linux/of_device.h> #include <linux/phy.h> #include <linux/memblock.h> +#include <linux/fsl/guts.h> #include <linux/atomic.h> #include <asm/time.h>
@@ -51,7 +52,6 @@#include <asm/qe_ic.h> #include <asm/mpic.h> #include <asm/swiotlb.h> -#include <asm/fsl_guts.h> #include "smp.h" #include "mpc85xx.h"
arch/powerpc/platforms/85xx/mpc85xx_rdb.c +1 -1
@@ -17,6 +17,7 @@#include <linux/seq_file.h> #include <linux/interrupt.h> #include <linux/of_platform.h> +#include <linux/fsl/guts.h> #include <asm/time.h> #include <asm/machdep.h>
@@ -27,7 +28,6 @@#include <asm/mpic.h> #include <asm/qe.h> #include <asm/qe_ic.h> -#include <asm/fsl_guts.h> #include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h>
arch/powerpc/platforms/85xx/p1022_ds.c +1 -1
@@ -16,6 +16,7 @@* kind, whether express or implied. */ +#include <linux/fsl/guts.h> #include <linux/pci.h> #include <linux/of_platform.h> #include <asm/div64.h>
@@ -25,7 +26,6 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include <asm/udbg.h> -#include <asm/fsl_guts.h> #include <asm/fsl_lbc.h> #include "smp.h"
arch/powerpc/platforms/85xx/p1022_rdk.c +1 -1
@@ -12,6 +12,7 @@* kind, whether express or implied. */ +#include <linux/fsl/guts.h> #include <linux/pci.h> #include <linux/of_platform.h> #include <asm/div64.h>
@@ -21,7 +22,6 @@#include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h> #include <asm/udbg.h> -#include <asm/fsl_guts.h> #include "smp.h" #include "mpc85xx.h"
arch/powerpc/platforms/85xx/smp.c +1 -1
@@ -19,6 +19,7 @@#include <linux/kexec.h> #include <linux/highmem.h> #include <linux/cpu.h> +#include <linux/fsl/guts.h> #include <asm/machdep.h> #include <asm/pgtable.h>
@@ -26,7 +27,6 @@#include <asm/mpic.h> #include <asm/cacheflush.h> #include <asm/dbell.h> -#include <asm/fsl_guts.h> #include <asm/code-patching.h> #include <asm/cputhreads.h>
arch/powerpc/platforms/85xx/twr_p102x.c +1 -1
@@ -15,6 +15,7 @@#include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> +#include <linux/fsl/guts.h> #include <linux/pci.h> #include <linux/of_platform.h>
@@ -23,7 +24,6 @@#include <asm/mpic.h> #include <asm/qe.h> #include <asm/qe_ic.h> -#include <asm/fsl_guts.h> #include <sysdev/fsl_soc.h> #include <sysdev/fsl_pci.h>
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +1 -1
@@ -24,6 +24,7 @@#include <linux/delay.h> #include <linux/seq_file.h> #include <linux/of.h> +#include <linux/fsl/guts.h> #include <asm/time.h> #include <asm/machdep.h>
@@ -38,7 +39,6 @@#include <sysdev/fsl_pci.h> #include <sysdev/fsl_soc.h> #include <sysdev/simple_gpio.h> -#include <asm/fsl_guts.h> #include "mpc86xx.h"
drivers/iommu/fsl_pamu.c +1 -1
@@ -20,11 +20,11 @@#include "fsl_pamu.h" +#include <linux/fsl/guts.h> #include <linux/interrupt.h> #include <linux/genalloc.h> #include <asm/mpc85xx.h> -#include <asm/fsl_guts.h> /* define indexes for each operation mapping scenario */ #define OMI_QMAN 0x00
include/linux/fsl/guts.h renamed from arch/powerpc/include/asm/fsl_guts.h +2 -4
@@ -12,9 +12,8 @@* option) any later version. */ -#ifndef __ASM_POWERPC_FSL_GUTS_H__ -#define __ASM_POWERPC_FSL_GUTS_H__ -#ifdef __KERNEL__ +#ifndef __FSL_GUTS_H__ +#define __FSL_GUTS_H__/** * Global Utility Registers.
@@ -189,4 +188,3 @@ static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,#endif #endif -#endif
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -12,11 +12,11 @@#include <linux/module.h> #include <linux/interrupt.h> +#include <linux/fsl/guts.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/slab.h> #include <sound/soc.h> -#include <asm/fsl_guts.h> #include "fsl_dma.h" #include "fsl_ssi.h"
sound/soc/fsl/p1022_ds.c +1 -1
@@ -11,12 +11,12 @@*/ #include <linux/module.h> +#include <linux/fsl/guts.h> #include <linux/interrupt.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/slab.h> #include <sound/soc.h> -#include <asm/fsl_guts.h> #include "fsl_dma.h" #include "fsl_ssi.h"
sound/soc/fsl/p1022_rdk.c +1 -1
@@ -18,12 +18,12 @@*/ #include <linux/module.h> +#include <linux/fsl/guts.h> #include <linux/interrupt.h> #include <linux/of_address.h> #include <linux/of_device.h> #include <linux/slab.h> #include <sound/soc.h> -#include <asm/fsl_guts.h> #include "fsl_dma.h" #include "fsl_ssi.h"
Signature · 1 line
2.1.4
RFC PATCH 4/8 clk: qoriq: Move chip-specific knowledge into driver
In reply to Scott WoodThe device tree should describe the chips (or chip-like subblocks) in the system, but it generally does not describe individual registers -- it should identify, rather than describe, a programming interface.
This has not been the case with the QorIQ clockgen nodes. The knowledge of what each bit setting of CLKCnCSR means is encoded in three places (binding, pll node, and mux node), and the last also needs to know which options are valid on a particular chip. All three of these locations are considered stable ABI, making it difficult to fix mistakes (of which I have found several), much less refactor the abstraction to be able to address problems, limitations, or new chips.
Under the current binding, a pll clock specifier of 2 means that the PLL is divided by 4 -- and the driver implements this, unless there happen to be four clock-output-names rather than 3, in which case it interprets it as PLL divided by 3. This does not appear in the binding documentation at all. That hack is now considered stable ABI.
The current device tree nodes contain errors, such as saying that T1040 can set a core clock to PLL/4 when only PLL and PLL/2 are options. The current binding also ignores some restrictions on clock selection, such as p5020's requirement that if a core uses the "wrong" PLL, that PLL must be clocked lower than the "correct" PLL and be at most 80% of the rated CPU frequency.
Possibly because of the lack of the ability to express such nuance in the binding, some valid options are omitted from the device trees, such as the ability on p4080 to run cores 0-3 from PLL3 and cores 4-7 from PLL1 (again, only if they are at most 80% of rated CPU frequency). This omission, combined with excessive caution in the cpufreq driver (addressed in a subsequent patch), means that currently on a 1500 MHz p4080 with typical PLL configuration, cpufreq can lower the frequency to 1200 MHz on half the CPUs and do nothing on the others. With this patchset, all CPUs can be lowered to 1200 MHz on a rev2 p4080, and on a rev3 p4080 half can be lowered to 750 MHz and the other half to 600 MHz.
The current binding only deals with CPU clocks. To describe FMan in the device tree, we need to describe its clock. Some chips have additional muxes that work like the CPU muxes, but are not described in the device tree. Others require inspecting the Reset Control Word to determine which PLL is used. Rather than continue to extend this mess, replace it. Have the driver bind to the chip-specific clockgen compatible, and keep the detailed description of quirky chip variations in the driver, where it can be easily fixed, refactored, and extended.
Older device trees will continue to work. This patch does not remove the code for handling the old nodes. A subsequent patch removes that code, but still binds against those nodes and redirects clock lookups to the clocks generated by the new code.
--- .../devicetree/bindings/clock/qoriq-clock.txt | 57 +- drivers/clk/clk-qoriq.c | 950 ++++++++++++++++++++- 2 files changed, 986 insertions(+), 21 deletions(-)
Documentation/devicetree/bindings/clock/qoriq-clock.txt +48 -9
@@ -18,9 +18,11 @@ Chassis Version Example Chips 1. Clock Block Binding Required properties: -- compatible: Should contain a specific clock block compatible string - and a single chassis clock compatible string. - Clock block strings include, but not limited to, one of the: +- compatible: Should contain a chip-specific clock block compatible + string and (if applicable) may contain a chassis-version clock + compatible string. + + Chip-specific strings are of the form "fsl,<chip>-clockgen", such as: * "fsl,p2041-clockgen" * "fsl,p3041-clockgen" * "fsl,p4080-clockgen"
@@ -30,15 +32,14 @@ Required properties: * "fsl,b4420-clockgen" * "fsl,b4860-clockgen" * "fsl,ls1021a-clockgen" - Chassis clock strings include: + Chassis-version clock strings include: * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks - reg: Describes the address of the device's resources within the address space defined by its parent bus, and resource zero represents the clock register set -- clock-frequency: Input system clock frequency -Recommended properties: +Optional properties: - ranges: Allows valid translation between child's address space and parent's. Must be present if the device has sub-nodes. - #address-cells: Specifies the number of cells used to represent
@@ -47,8 +48,46 @@ Recommended properties: - #size-cells: Specifies the number of cells used to represent the size of an address. Must be present if the device has sub-nodes and set to 1 if present +- clock-frequency: Input system clock frequency (SYSCLK) +- clocks: If clock-frequency is not specified, sysclk may be provided + as an input clock. Either clock-frequency or clocks must be + provided. + +2. Clock Provider + +The clockgen node should act as a clock provider, though in older device +trees the children of the clockgen node are the clock providers. + +When the clockgen node is a clock provider, #clock-cells = <2>. +The first cell of the clock specifier is the clock type, and the +second cell is the clock index for the specified type. + + Type# Name Index Cell + 0 sysclk must be 0 + 1 cmux index (n in CLKCnCSR) + 2 hwaccel index (n in CLKCGnHWACSR) + 3 fman 0 for fm1, 1 for fm2 + 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4 + +3. Example + + clockgen: global-utilities at e1000 { + compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; + clock-frequency = <133333333>; + reg = <0xe1000 0x1000>; + #clock-cells = <2>; + }; + + fman at 400000 { + ... + clocks = <&clockgen 3 0>; + ... + }; +} +4. Legacy Child Nodes -2. Clock Provider/Consumer Binding +NOTE: These nodes are deprecated. Kernels should continue to support +device trees with these nodes, but new device trees should not use them. Most of the bindings are from the common clock binding[1]. [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -82,7 +121,7 @@ Recommended properties: - reg: Should be the offset and length of clock block base address. The length should be 4. -Example for clock block and clock provider: +Legacy Example: / { clockgen: global-utilities at e1000 { compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
@@ -142,7 +181,7 @@ Example for clock block and clock provider: }; }; -Example for clock consumer: +Example for legacy clock consumer: / { cpu0: PowerPC,e5500 at 0 {
drivers/clk/clk-qoriq.c +938 -12
1,013 lines not on this page · raw message
Signature · 1 line
2.1.4
RFC PATCH 5/8 clk: qoriq: Redirect legacy clock nodes to new clocks
In reply to Scott WoodHaving multiple clock implementations pointing at the same hardware is asking for trouble if both get used -- for example, cached values will be incorrect. Point the legacy nodes at the new clocks, before anything starts using the new clocks. The pll/mux details in old device trees will be ignored, but "clocks" properties pointing at the old nodes will still work.
This also lets us get rid of most of the legacy code.
--- drivers/clk/clk-qoriq.c | 348 ++++++++---------------------------------------- 1 file changed, 54 insertions(+), 294 deletions(-)
drivers/clk/clk-qoriq.c +54 -294
@@ -763,233 +763,24 @@ static void __init create_muxes(struct clockgen *cg) }/* Legacy node */ -struct cmux_clk { -struct clk_hw hw; -void __iomem *reg; -unsigned int clk_per_pll; -u32 flags; -}; - -#define PLL_KILL BIT(31) -#define CLKSEL_ADJUST BIT(0) -#define to_cmux_clk (p) container_of(p, struct cmux_clk, hw) - -static int cmux_set_parent (struct clk_hw *hw,u8 idx) -{ -struct cmux_clk *clk =to_cmux_clk (hw); -u32 clksel; - - clksel = ((idx / clk->clk_per_pll) <<2 ) + idx % clk->clk_per_pll; -if (clk->flags &CLKSEL_ADJUST ) - clksel +=8 ; - clksel = (clksel &0xf ) <<CLKSEL_SHIFT ; -iowrite32be (clksel, clk->reg); - -return 0 ; -} - -static u8 cmux_get_parent (struct clk_hw *hw) -{ -struct cmux_clk *clk =to_cmux_clk (hw); -u32 clksel; - - clksel =ioread32be (clk->reg); - clksel = (clksel >>CLKSEL_SHIFT ) &0xf ; -if (clk->flags &CLKSEL_ADJUST ) - clksel -=8 ; - clksel = (clksel >>2 ) * clk->clk_per_pll + clksel %4 ; - -return clksel; -} - -static const struct clk_ops legacy_cmux_ops = { - .get_parent = cmux_get_parent, - .set_parent = cmux_set_parent, -}; -static void __init core_mux_init (struct device_node *np) {struct clk *clk; -struct clk_init_data init; -struct cmux_clk *cmux_clk; -struct device_node *node; -int rc, count, i; -u32 offset; -const char *clk_name; -const char **parent_names; -struct of_phandle_args clkspec; +struct resource res; +int idx, rc; - rc =of_property_read_u32 (np,"reg" , &offset); -if (rc) { -pr_err ("%s: could not get reg property\n" , np->name); +if (of_address_to_resource (np,0 , &res))return ; - } - -/* get the input clock source count */ - count =of_property_count_strings (np,"clock-names" ); -if (count <0 ) { -pr_err ("%s: get clock count error\n" , np->name); -return ; - } - parent_names =kcalloc (count,sizeof (char *),GFP_KERNEL ); -if (!parent_names) -return ; - -for (i =0 ; i < count; i++) - parent_names[i] =of_clk_get_parent_name (np, i); - - cmux_clk =kzalloc (sizeof (*cmux_clk),GFP_KERNEL ); -if (!cmux_clk) - goto err_name; - cmux_clk->reg =of_iomap (np,0 ); -if (!cmux_clk->reg) { -pr_err ("%s: could not map register\n" , __func__); - goto err_clk; - } - - rc =of_parse_phandle_with_args (np,"clocks" ,"#clock-cells" ,0 , - &clkspec); -if (rc) { -pr_err ("%s: parse clock node error\n" , __func__); - goto err_clk; - } - - cmux_clk->clk_per_pll =of_property_count_strings (clkspec.np, -"clock-output-names" ); -of_node_put (clkspec.np); - - node =of_find_compatible_node (NULL ,NULL ,"fsl,p4080-clockgen" ); -if (node && (offset >=0x80 )) - cmux_clk->flags =CLKSEL_ADJUST ; - - rc =of_property_read_string_index (np,"clock-output-names" , -0 , &clk_name); -if (rc) { -pr_err ("%s: read clock names error\n" , np->name); - goto err_clk; - } - - init.name = clk_name; - init.ops = &legacy_cmux_ops; - init.parent_names = parent_names; - init.num_parents = count; - init.flags =0 ; - cmux_clk->hw.init = &init; - - clk =clk_register (NULL , &cmux_clk->hw); -if (IS_ERR (clk)) { -pr_err ("%s: could not register clock\n" , clk_name); - goto err_clk; - } + idx = (res.start &0xf0 ) >>5 ; + clk = clockgen.cmux[idx]; rc =of_clk_add_provider (np, of_clk_src_simple_get, clk);if (rc) { -pr_err ("Could not register clock provider for node:%s\n" , - np->name); - goto err_clk; - } - goto err_name; - -err_clk: -kfree (cmux_clk); -err_name: -/* free *_names because they are reallocated when registered */ -kfree (parent_names); -} - -/* Legacy node */ -static void __init core_pll_init (struct device_node *np) -{ -u32 mult; -int i, rc, count; -const char *clk_name, *parent_name; -struct clk_onecell_data *onecell_data; -struct clk **subclks; -void __iomem *base; - - base =of_iomap (np,0 ); -if (!base) { -pr_err ("iomap error\n" ); +pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , + __func__, np->name, rc);return ; } - -/* get the multiple of PLL */ - mult =ioread32be (base); - -/* check if this PLL is disabled */ -if (mult &PLL_KILL ) { -pr_debug ("PLL:%s is disabled\n" , np->name); - goto err_map; - } - mult = (mult >>1 ) &0x3f ; - - parent_name =of_clk_get_parent_name (np,0 ); -if (!parent_name) { -pr_err ("PLL: %s must have a parent\n" , np->name); - goto err_map; - } - - count =of_property_count_strings (np,"clock-output-names" ); -if (count <0 || count >4 ) { -pr_err ("%s: clock is not supported\n" , np->name); - goto err_map; - } - - subclks =kcalloc (count,sizeof (struct clk *),GFP_KERNEL ); -if (!subclks) - goto err_map; - - onecell_data =kmalloc (sizeof (*onecell_data),GFP_KERNEL ); -if (!onecell_data) - goto err_clks; - -for (i =0 ; i < count; i++) { - rc =of_property_read_string_index (np,"clock-output-names" , - i, &clk_name); -if (rc) { -pr_err ("%s: could not get clock names\n" , np->name); - goto err_cell; - } - -/* -* when count == 4, there are 4 output clocks: -* /1, /2, /3, /4 respectively -* when count < 4, there are@least 2 output clocks: -* /1, /2, (/4, if count == 3) respectively. -*/ -if (count ==4 ) - subclks[i] =clk_register_fixed_factor (NULL , clk_name, - parent_name,0 , mult,1 + i); -else - - subclks[i] =clk_register_fixed_factor (NULL , clk_name, - parent_name,0 , mult,1 << i); - -if (IS_ERR (subclks[i])) { -pr_err ("%s: could not register clock\n" , clk_name); - goto err_cell; - } - } - - onecell_data->clks = subclks; - onecell_data->clk_num = count; - - rc =of_clk_add_provider (np, of_clk_src_onecell_get, onecell_data); -if (rc) { -pr_err ("Could not register clk provider for node:%s\n" , - np->name); - goto err_cell; - } - -iounmap (base); -return ; -err_cell: -kfree (onecell_data); -err_clks: -kfree (subclks); -err_map: -iounmap (base); } static struct clk * __init create_sysclk(struct device_node *clockgen,
@@ -1027,21 +818,14 @@ static struct clk * __init create_sysclk(struct device_node *clockgen,/* Legacy node */ static void __init sysclk_init (struct device_node *node) { -struct device_node *np =of_get_parent (node); -struct clk *clk; +struct clk *clk = clockgen.sysclk; -if (!np) { -pr_err ("could not get parent node\n" ); -return ; - } - - clk =create_sysclk (np,"sysclk" ); -of_node_put (np); - -if (!IS_ERR (clk)) +if (clk)of_clk_add_provider (node, of_clk_src_simple_get, clk); } +#define PLL_KILL BIT(31) +static void __init create_one_pll (struct clockgen *cg,int idx) {u32 __iomem *reg;
@@ -1097,85 +881,61 @@ static void __init create_plls(struct clockgen *cg)create_one_pll (cg, i); } -/* Legacy node */ -static void __init pltfrm_pll_init (struct device_node *np) +static void __init legacy_pll_init (struct device_node *np,int idx) { -void __iomem *base; -uint32_t mult; -const char *parent_name, *clk_name; -int i, _errno; -struct clk_onecell_data *cod; - - base =of_iomap (np,0 ); -if (!base) { -pr_err ("%s(): %s: of_iomap() failed\n" , __func__, np->name); -return ; - } - -/* Get the multiple of PLL */ - mult =ioread32be (base); - -iounmap (base); +struct clockgen_pll *pll; +struct clk_onecell_data *onecell_data; +struct clk **subclks; +int count, rc, i; -/* Check if this PLL is disabled */ -if (mult &PLL_KILL ) { -pr_debug ("%s(): %s: Disabled\n" , __func__, np->name); -return ; - } - mult = (mult &GENMASK (6 ,1 )) >>1 ; + pll = &clockgen.pll[idx]; + count =ARRAY_SIZE (pll->div); - parent_name =of_clk_get_parent_name (np,0 ); -if (!parent_name) { -pr_err ("%s(): %s: of_clk_get_parent_name() failed\n" , - __func__, np->name); + subclks =kcalloc (count,sizeof (struct clk *),GFP_KERNEL ); +if (!subclks)return ; - } - i =of_property_count_strings (np,"clock-output-names" ); -if (i <0 ) { -pr_err ("%s(): %s: of_property_count_strings(clock-output-names) = %d\n" , - __func__, np->name, i); -return ; - } + onecell_data =kmalloc (sizeof (*onecell_data),GFP_KERNEL ); +if (!onecell_data) + goto err_clks; - cod =kmalloc (sizeof (*cod) + i *sizeof (struct clk *),GFP_KERNEL ); -if (!cod) -return ; - cod->clks = (struct clk **)(cod +1 ); - cod->clk_num = i; - -for (i =0 ; i < cod->clk_num; i++) { - _errno =of_property_read_string_index (np,"clock-output-names" , - i, &clk_name); -if (_errno <0 ) { -pr_err ("%s(): %s: of_property_read_string_index(clock-output-names) = %d\n" , - __func__, np->name, _errno); - goto return_clk_unregister; - } +for (i =0 ; i < count; i++) + subclks[i] = pll->div[i].clk; - cod->clks[i] =clk_register_fixed_factor (NULL , clk_name, - parent_name,0 , mult,1 + i); -if (IS_ERR (cod->clks[i])) { -pr_err ("%s(): %s: clk_register_fixed_factor(%s) = %ld\n" , - __func__, np->name, - clk_name,PTR_ERR (cod->clks[i])); - goto return_clk_unregister; - } - } + onecell_data->clks = subclks; + onecell_data->clk_num = count; - _errno =of_clk_add_provider (np, of_clk_src_onecell_get, cod); -if (_errno <0 ) { -pr_err ("%s(): %s: of_clk_add_provider() = %d\n" , - __func__, np->name, _errno); - goto return_clk_unregister; + rc =of_clk_add_provider (np, of_clk_src_onecell_get, onecell_data); +if (rc) { +pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , + __func__, np->name, rc); + goto err_cell; }return ; +err_cell: +kfree (onecell_data); +err_clks: +kfree (subclks); +} -return_clk_unregister: -while (--i >=0 ) -clk_unregister (cod->clks[i]); -kfree (cod); +/* Legacy node */ +static void __init core_pll_init (struct device_node *np) +{ +struct resource res; +int idx; + +if (of_address_to_resource (np,0 , &res)) +return ; + + idx = (res.start &0xf0 ) >>5 ; +legacy_pll_init (np,CGA_PLL1 + idx); +} + +/* Legacy node */ +static void __init pltfrm_pll_init (struct device_node *np) +{ +legacy_pll_init (np,PLATFORM_PLL ); }#ifdef CONFIG_PPC
Signature · 1 line
2.1.4
RFC PATCH 6/8 cpufreq: qoriq: Remove frequency masking and minimum
In reply to Scott WoodThe clock driver now takes care of ensuring that the mux only exposes options that are valid. The driver was currently being overly conservative in some cases -- for example, the "min_cpufreq = get_bus_freq()" restriction only applies to chips with erratum A-004510, and whether the freq_mask used on p5020 is needed depends on the actual frequencies of the PLLs (FWIW, p5040 has a similar limitation but its .freq_mask was zero).
Further, the freq_mask mechanism makes assumptions about the number and order of the clock parents. The new driver does not adhere to those assumptions (in particular, it removes invalid options).
--- drivers/cpufreq/qoriq-cpufreq.c | 92 +---------------------------------------- 1 file changed, 2 insertions(+), 90 deletions(-)
drivers/cpufreq/qoriq-cpufreq.c +2 -90
@@ -36,53 +36,6 @@ struct cpu_data {struct cpufreq_frequency_table *table; }; -/** -* struct soc_data - SoC specific data -* @freq_mask: mask the disallowed frequencies -* @flag: unique flags -*/ -struct soc_data { -u32 freq_mask[4 ]; -u32 flag; -}; - -#define FREQ_MASK 1 -/* see hardware specification for the allowed frqeuencies */ -static const struct soc_data sdata[] = { - {/* used by p2041 and p3041 */ - .freq_mask = {0x8 ,0x8 ,0x2 ,0x2 }, - .flag =FREQ_MASK , - }, - {/* used by p5020 */ - .freq_mask = {0x8 ,0x2 }, - .flag =FREQ_MASK , - }, - {/* used by p4080, p5040 */ - .freq_mask = {0 }, - .flag =0 , - }, -}; - -/* -* the minimum allowed core frequency, in Hz -* for chassis v1.0, >= platform frequency -* for chassis v2.0, >= platform frequency / 2 -*/ -static u32 min_cpufreq; -static const u32 *fmask; - -#if defined(CONFIG_ARM ) -static int get_cpu_physical_id (int cpu) -{ -return topology_core_id (cpu); -} -#else -static int get_cpu_physical_id (int cpu) -{ -return get_hard_smp_processor_id (cpu); -} -#endif -static u32 get_bus_freq (void ) {struct device_node *soc;
@@ -195,7 +148,7 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) {struct device_node *np, *pnode;int i, count, ret; -u32 freq, mask; +u32 freq;struct clk *clk;struct cpufreq_frequency_table *table;struct cpu_data *data;
@@ -230,23 +183,11 @@ static int qoriq_cpufreq_cpu_init(struct cpufreq_policy *policy) goto err_pclk; } -if (fmask) - mask = fmask[get_cpu_physical_id (cpu)]; -else - mask =0x0 ; -for (i =0 ; i < count; i++) { clk =clk_get_parent_by_index (policy->clk, i); data->pclk[i] = clk; freq =clk_get_rate (clk); -/* -* the clock is valid if its frequency is not masked -* and large than minimum allowed frequency. -*/ -if (freq < min_cpufreq || (mask & (1 << i))) - table[i].frequency =CPUFREQ_ENTRY_INVALID ; -else - table[i].frequency = freq /1000 ; + table[i].frequency = freq /1000 ; table[i].driver_data = i; }freq_table_redup (table, count);
@@ -321,38 +262,9 @@ static struct cpufreq_driver qoriq_cpufreq_driver = { .attr = cpufreq_generic_attr, }; -static const struct of_device_id node_matches[]__initconst = { - { .compatible ="fsl,p2041-clockgen" , .data = &sdata[0 ], }, - { .compatible ="fsl,p3041-clockgen" , .data = &sdata[0 ], }, - { .compatible ="fsl,p5020-clockgen" , .data = &sdata[1 ], }, - { .compatible ="fsl,p4080-clockgen" , .data = &sdata[2 ], }, - { .compatible ="fsl,p5040-clockgen" , .data = &sdata[2 ], }, - { .compatible ="fsl,qoriq-clockgen-2.0" , }, - {} -}; -static int __init qoriq_cpufreq_init (void ) {int ret; -struct device_node *np; -const struct of_device_id *match; -const struct soc_data *data; - - np =of_find_matching_node (NULL , node_matches); -if (!np) -return -ENODEV ; - - match =of_match_node (node_matches, np); - data = match->data; -if (data) { -if (data->flag) - fmask = data->freq_mask; - min_cpufreq =get_bus_freq (); - }else { - min_cpufreq =get_bus_freq () /2 ; - } - -of_node_put (np); ret =cpufreq_register_driver (&qoriq_cpufreq_driver);if (!ret)
Signature · 1 line
2.1.4
RFC PATCH 7/8 clk: qoriq: Expose OF clocks directly from the clockgen node
In reply to Scott WoodThis allows the "clocks" property to be used in the absence of legacy nodes, and for clocks that the legacy nodes do not describe.
--- drivers/clk/clk-qoriq.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-)
drivers/clk/clk-qoriq.c +62 -1
@@ -938,6 +938,61 @@ static void __init pltfrm_pll_init(struct device_node *np)legacy_pll_init (np,PLATFORM_PLL ); } +static struct clk *clockgen_clk_get (struct of_phandle_args *clkspec,void *data) +{ +struct clockgen *cg = data; +struct clk *clk; +struct clockgen_pll *pll; +u32 type, idx; + +if (clkspec->args_count <2 ) { +pr_err ("%s: insufficient phandle args\n" , __func__); +return ERR_PTR (-EINVAL ); + } + + type = clkspec->args[0 ]; + idx = clkspec->args[1 ]; + +switch (type) { +case 0 : +if (idx !=0 ) + goto bad_args; + clk = cg->sysclk; +break ; +case 1 : +if (idx >=ARRAY_SIZE (cg->cmux)) + goto bad_args; + clk = cg->cmux[idx]; +break ; +case 2 : +if (idx >=ARRAY_SIZE (cg->hwaccel)) + goto bad_args; + clk = cg->hwaccel[idx]; +break ; +case 3 : +if (idx >=ARRAY_SIZE (cg->fman)) + goto bad_args; + clk = cg->fman[idx]; +break ; +case 4 : + pll = &cg->pll[PLATFORM_PLL ]; +if (idx >=ARRAY_SIZE (pll->div)) + goto bad_args; + clk = pll->div[idx].clk; +break ; +default : + goto bad_args; + } + +if (!clk) +return ERR_PTR (-ENOENT ); +return clk; + +bad_args: +pr_err ("%s: Bad phandle args %u %u\n" , __func__, type, idx); +return ERR_PTR (-EINVAL ); +} +#ifdef CONFIG_PPC #include <asm/mpc85xx.h>
@@ -982,7 +1037,7 @@ static bool __init has_erratum_a4510(void)static void __init clockgen_init (struct device_node *np) { -int i; +int i, ret; clockgen.node = np; clockgen.regs =of_iomap (np,0 );
@@ -1028,6 +1083,12 @@ static void __init clockgen_init(struct device_node *np)if (clockgen.info.init_periph) clockgen.info.init_periph (&clockgen); + ret =of_clk_add_provider (np, clockgen_clk_get, &clockgen); +if (ret) { +pr_err ("%s: Couldn't register clk provider for node %s: %d\n" , + __func__, np->name, ret); + } +return ; err:iounmap (clockgen.regs);
Signature · 1 line
2.1.4
RFC PATCH 8/8 powerpc/fsl: Use new clockgen binding
In reply to Scott WoodThe driver retains compatibility with old device trees, but we don't want the old nodes lying around to be copied, or used as a reference (some of the mux options are incorrect), or even just being clutter.
We will also need the #clock-cells in the clockgen node in order to add fman nodes.
--- arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/b4si-post.dtsi | 15 ------ arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 18 ------- arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 18 ------- arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 70 -------------------------- arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi | 16 +++--- arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 18 ------- arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi | 50 +----------------- arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi | 33 +----------- arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 16 ------ arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 44 ---------------- arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 22 -------- arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi | 8 +-- arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 61 ---------------------- arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi | 24 ++++----- 22 files changed, 54 insertions(+), 411 deletions(-)
arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi +2 -2
@@ -64,14 +64,14 @@ cpu0: PowerPC,e6500 at 0 { device_type = "cpu"; reg = <0 1>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; }; cpu1: PowerPC,e6500 at 2 { device_type = "cpu"; reg = <2 3>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; };
arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi +4 -4
@@ -64,28 +64,28 @@ cpu0: PowerPC,e6500 at 0 { device_type = "cpu"; reg = <0 1>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; }; cpu1: PowerPC,e6500 at 2 { device_type = "cpu"; reg = <2 3>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; }; cpu2: PowerPC,e6500 at 4 { device_type = "cpu"; reg = <4 5>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; }; cpu3: PowerPC,e6500 at 6 { device_type = "cpu"; reg = <6 7>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2>; fsl,portid-mapping = <0x80000000>; };
arch/powerpc/boot/dts/fsl/b4si-post.dtsi +0 -15
@@ -398,21 +398,6 @@ }; /include/ "qoriq-clockgen2.dtsi" - clockgen: global-utilities at e1000 { - compatible = "fsl,b4-clockgen", "fsl,qoriq-clockgen-2.0"; - reg = <0xe1000 0x1000>; - - mux0: mux0 at 0 { - #clock-cells = <0>; - reg = <0x0 0x4>; - compatible = "fsl,qoriq-core-mux-2.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, - <&pll1 0>, <&pll1 1>, <&pll1 2>; - clock-names = "pll0", "pll0-div2", "pll0-div4", - "pll1", "pll1-div2", "pll1-div4"; - clock-output-names = "cmux0"; - }; - }; rcpm: global-utilities at e2000 { compatible = "fsl,b4-rcpm", "fsl,qoriq-rcpm-2.0";
arch/powerpc/boot/dts/fsl/p2041si-post.dtsi +0 -18
@@ -327,24 +327,6 @@ /include/ "qoriq-clockgen1.dtsi" global-utilities at e1000 { compatible = "fsl,p2041-clockgen", "fsl,qoriq-clockgen-1.0"; - - mux2: mux2 at 40 { - #clock-cells = <0>; - reg = <0x40 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux2"; - }; - - mux3: mux3 at 60 { - #clock-cells = <0>; - reg = <0x60 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux3"; - }; }; rcpm: global-utilities at e2000 {
arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi +4 -4
@@ -81,7 +81,7 @@ cpu0: PowerPC,e500mc at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_0>; fsl,portid-mapping = <0x80000000>; L2_0: l2-cache {
@@ -91,7 +91,7 @@ cpu1: PowerPC,e500mc at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x40000000>; L2_1: l2-cache {
@@ -101,7 +101,7 @@ cpu2: PowerPC,e500mc at 2 { device_type = "cpu"; reg = <2>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x20000000>; L2_2: l2-cache {
@@ -111,7 +111,7 @@ cpu3: PowerPC,e500mc at 3 { device_type = "cpu"; reg = <3>; - clocks = <&mux3>; + clocks = <&clockgen 1 3>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x10000000>; L2_3: l2-cache {
arch/powerpc/boot/dts/fsl/p3041si-post.dtsi +0 -18
@@ -354,24 +354,6 @@ /include/ "qoriq-clockgen1.dtsi" global-utilities at e1000 { compatible = "fsl,p3041-clockgen", "fsl,qoriq-clockgen-1.0"; - - mux2: mux2 at 40 { - #clock-cells = <0>; - reg = <0x40 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux2"; - }; - - mux3: mux3 at 60 { - #clock-cells = <0>; - reg = <0x60 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux3"; - }; }; rcpm: global-utilities at e2000 {
arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi +4 -4
@@ -82,7 +82,7 @@ cpu0: PowerPC,e500mc at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_0>; fsl,portid-mapping = <0x80000000>; L2_0: l2-cache {
@@ -92,7 +92,7 @@ cpu1: PowerPC,e500mc at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x40000000>; L2_1: l2-cache {
@@ -102,7 +102,7 @@ cpu2: PowerPC,e500mc at 2 { device_type = "cpu"; reg = <2>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x20000000>; L2_2: l2-cache {
@@ -112,7 +112,7 @@ cpu3: PowerPC,e500mc at 3 { device_type = "cpu"; reg = <3>; - clocks = <&mux3>; + clocks = <&clockgen 1 3>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x10000000>; L2_3: l2-cache {
arch/powerpc/boot/dts/fsl/p4080si-post.dtsi +0 -70
76 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi +8 -8
@@ -81,7 +81,7 @@ cpu0: PowerPC,e500mc at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_0>; fsl,portid-mapping = <0x80000000>; L2_0: l2-cache {
@@ -91,7 +91,7 @@ cpu1: PowerPC,e500mc at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x40000000>; L2_1: l2-cache {
@@ -101,7 +101,7 @@ cpu2: PowerPC,e500mc at 2 { device_type = "cpu"; reg = <2>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x20000000>; L2_2: l2-cache {
@@ -111,7 +111,7 @@ cpu3: PowerPC,e500mc at 3 { device_type = "cpu"; reg = <3>; - clocks = <&mux3>; + clocks = <&clockgen 1 3>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x10000000>; L2_3: l2-cache {
@@ -121,7 +121,7 @@ cpu4: PowerPC,e500mc at 4 { device_type = "cpu"; reg = <4>; - clocks = <&mux4>; + clocks = <&clockgen 1 4>; next-level-cache = <&L2_4>; fsl,portid-mapping = <0x08000000>; L2_4: l2-cache {
@@ -131,7 +131,7 @@ cpu5: PowerPC,e500mc at 5 { device_type = "cpu"; reg = <5>; - clocks = <&mux5>; + clocks = <&clockgen 1 5>; next-level-cache = <&L2_5>; fsl,portid-mapping = <0x04000000>; L2_5: l2-cache {
@@ -141,7 +141,7 @@ cpu6: PowerPC,e500mc at 6 { device_type = "cpu"; reg = <6>; - clocks = <&mux6>; + clocks = <&clockgen 1 6>; next-level-cache = <&L2_6>; fsl,portid-mapping = <0x02000000>; L2_6: l2-cache {
@@ -151,7 +151,7 @@ cpu7: PowerPC,e500mc at 7 { device_type = "cpu"; reg = <7>; - clocks = <&mux7>; + clocks = <&clockgen 1 7>; next-level-cache = <&L2_7>; fsl,portid-mapping = <0x01000000>; L2_7: l2-cache {
arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi +2 -2
@@ -88,7 +88,7 @@ cpu0: PowerPC,e5500 at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_0>; fsl,portid-mapping = <0x80000000>; L2_0: l2-cache {
@@ -98,7 +98,7 @@ cpu1: PowerPC,e5500 at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x40000000>; L2_1: l2-cache {
arch/powerpc/boot/dts/fsl/p5040si-post.dtsi +0 -18
@@ -319,24 +319,6 @@ /include/ "qoriq-clockgen1.dtsi" global-utilities at e1000 { compatible = "fsl,p5040-clockgen", "fsl,qoriq-clockgen-1.0"; - - mux2: mux2 at 40 { - #clock-cells = <0>; - reg = <0x40 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux2"; - }; - - mux3: mux3 at 60 { - #clock-cells = <0>; - reg = <0x60 0x4>; - compatible = "fsl,qoriq-core-mux-1.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll1 0>, <&pll1 1>; - clock-names = "pll0", "pll0-div2", "pll1", "pll1-div2"; - clock-output-names = "cmux3"; - }; }; rcpm: global-utilities at e2000 {
arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi +4 -4
@@ -81,7 +81,7 @@ cpu0: PowerPC,e5500 at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_0>; fsl,portid-mapping = <0x80000000>; L2_0: l2-cache {
@@ -91,7 +91,7 @@ cpu1: PowerPC,e5500 at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x40000000>; L2_1: l2-cache {
@@ -101,7 +101,7 @@ cpu2: PowerPC,e5500 at 2 { device_type = "cpu"; reg = <2>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x20000000>; L2_2: l2-cache {
@@ -111,7 +111,7 @@ cpu3: PowerPC,e5500 at 3 { device_type = "cpu"; reg = <3>; - clocks = <&mux3>; + clocks = <&clockgen 1 3>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x10000000>; L2_3: l2-cache {
arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi +2 -48
56 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi +2 -31
@@ -32,37 +32,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -global-utilities at e1000 { +clockgen: global-utilities at e1000 { compatible = "fsl,qoriq-clockgen-2.0"; - ranges = <0x0 0xe1000 0x1000>; reg = <0xe1000 0x1000>; - #address-cells = <1>; - #size-cells = <1>; - - sysclk: sysclk { - #clock-cells = <0>; - compatible = "fsl,qoriq-sysclk-2.0", "fixed-clock"; - clock-output-names = "sysclk"; - }; - pll0: pll0 at 800 { - #clock-cells = <1>; - reg = <0x800 0x4>; - compatible = "fsl,qoriq-core-pll-2.0"; - clocks = <&sysclk>; - clock-output-names = "pll0", "pll0-div2", "pll0-div4"; - }; - pll1: pll1 at 820 { - #clock-cells = <1>; - reg = <0x820 0x4>; - compatible = "fsl,qoriq-core-pll-2.0"; - clocks = <&sysclk>; - clock-output-names = "pll1", "pll1-div2", "pll1-div4"; - }; - platform_pll: platform-pll at c00 { - #clock-cells = <1>; - reg = <0xc00 0x4>; - compatible = "fsl,qoriq-platform-pll-2.0"; - clocks = <&sysclk>; - clock-output-names = "platform-pll", "platform-pll-div2"; - }; + #clock-cells = <2>; };
arch/powerpc/boot/dts/fsl/t1023si-post.dtsi +0 -16
@@ -242,22 +242,6 @@ /include/ "qoriq-clockgen2.dtsi" global-utilities at e1000 { compatible = "fsl,t1023-clockgen", "fsl,qoriq-clockgen-2.0"; - mux0: mux0 at 0 { - #clock-cells = <0>; - reg = <0x0 4>; - compatible = "fsl,core-mux-clock"; - clocks = <&pll0 0>, <&pll0 1>; - clock-names = "pll0_0", "pll0_1"; - clock-output-names = "cmux0"; - }; - mux1: mux1 at 20 { - #clock-cells = <0>; - reg = <0x20 4>; - compatible = "fsl,core-mux-clock"; - clocks = <&pll0 0>, <&pll0 1>; - clock-names = "pll0_0", "pll0_1"; - clock-output-names = "cmux1"; - }; }; rcpm: global-utilities at e2000 {
arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi +2 -2
@@ -68,7 +68,7 @@ cpu0: PowerPC,e5500 at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; L2_1: l2-cache { next-level-cache = <&cpc>;
@@ -77,7 +77,7 @@ cpu1: PowerPC,e5500 at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; L2_2: l2-cache { next-level-cache = <&cpc>;
arch/powerpc/boot/dts/fsl/t1040si-post.dtsi +0 -44
50 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi +4 -4
@@ -67,7 +67,7 @@ cpu0: PowerPC,e5500 at 0 { device_type = "cpu"; reg = <0>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; L2_1: l2-cache { next-level-cache = <&cpc>;
@@ -76,7 +76,7 @@ cpu1: PowerPC,e5500 at 1 { device_type = "cpu"; reg = <1>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; L2_2: l2-cache { next-level-cache = <&cpc>;
@@ -85,7 +85,7 @@ cpu2: PowerPC,e5500 at 2 { device_type = "cpu"; reg = <2>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_3>; L2_3: l2-cache { next-level-cache = <&cpc>;
@@ -94,7 +94,7 @@ cpu3: PowerPC,e5500 at 3 { device_type = "cpu"; reg = <3>; - clocks = <&mux3>; + clocks = <&clockgen 1 3>; next-level-cache = <&L2_4>; L2_4: l2-cache { next-level-cache = <&cpc>;
arch/powerpc/boot/dts/fsl/t2081si-post.dtsi +0 -22
@@ -535,28 +535,6 @@ /include/ "qoriq-clockgen2.dtsi" global-utilities at e1000 { compatible = "fsl,t2080-clockgen", "fsl,qoriq-clockgen-2.0"; - - mux0: mux0 at 0 { - #clock-cells = <0>; - reg = <0x0 4>; - compatible = "fsl,qoriq-core-mux-2.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, - <&pll1 0>, <&pll1 1>, <&pll1 2>; - clock-names = "pll0", "pll0-div2", "pll0-div4", - "pll1", "pll1-div2", "pll1-div4"; - clock-output-names = "cmux0"; - }; - - mux1: mux1 at 20 { - #clock-cells = <0>; - reg = <0x20 4>; - compatible = "fsl,qoriq-core-mux-2.0"; - clocks = <&pll0 0>, <&pll0 1>, <&pll0 2>, - <&pll1 0>, <&pll1 1>, <&pll1 2>; - clock-names = "pll0", "pll0-div2", "pll0-div4", - "pll1", "pll1-div2", "pll1-div4"; - clock-output-names = "cmux1"; - }; }; rcpm: global-utilities at e2000 {
arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi +4 -4
@@ -70,28 +70,28 @@ cpu0: PowerPC,e6500 at 0 { device_type = "cpu"; reg = <0 1>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu1: PowerPC,e6500 at 2 { device_type = "cpu"; reg = <2 3>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu2: PowerPC,e6500 at 4 { device_type = "cpu"; reg = <4 5>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu3: PowerPC,e6500 at 6 { device_type = "cpu"; reg = <6 7>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; };
arch/powerpc/boot/dts/fsl/t4240si-post.dtsi +0 -61
67 lines not on this page · raw message
arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi +12 -12
@@ -68,84 +68,84 @@ cpu0: PowerPC,e6500 at 0 { device_type = "cpu"; reg = <0 1>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu1: PowerPC,e6500 at 2 { device_type = "cpu"; reg = <2 3>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu2: PowerPC,e6500 at 4 { device_type = "cpu"; reg = <4 5>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu3: PowerPC,e6500 at 6 { device_type = "cpu"; reg = <6 7>; - clocks = <&mux0>; + clocks = <&clockgen 1 0>; next-level-cache = <&L2_1>; fsl,portid-mapping = <0x80000000>; }; cpu4: PowerPC,e6500 at 8 { device_type = "cpu"; reg = <8 9>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x40000000>; }; cpu5: PowerPC,e6500 at 10 { device_type = "cpu"; reg = <10 11>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x40000000>; }; cpu6: PowerPC,e6500 at 12 { device_type = "cpu"; reg = <12 13>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x40000000>; }; cpu7: PowerPC,e6500 at 14 { device_type = "cpu"; reg = <14 15>; - clocks = <&mux1>; + clocks = <&clockgen 1 1>; next-level-cache = <&L2_2>; fsl,portid-mapping = <0x40000000>; }; cpu8: PowerPC,e6500 at 16 { device_type = "cpu"; reg = <16 17>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x20000000>; }; cpu9: PowerPC,e6500 at 18 { device_type = "cpu"; reg = <18 19>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x20000000>; }; cpu10: PowerPC,e6500 at 20 { device_type = "cpu"; reg = <20 21>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x20000000>; }; cpu11: PowerPC,e6500 at 22 { device_type = "cpu"; reg = <22 23>; - clocks = <&mux2>; + clocks = <&clockgen 1 2>; next-level-cache = <&L2_3>; fsl,portid-mapping = <0x20000000>; };
Signature · 1 line
2.1.4
RFC PATCH 8/8 powerpc/fsl: Use new clockgen binding
Regards,
Igal Liberman.
Quoted 14 lines
-----Original Message-----
From: Wood Scott-B07421
Sent: Friday, June 19, 2015 5:49 AM
To: Mike Turquette; Tang Yuantian-B29983
Cc: Rafael J. Wysocki; Liberman Igal-B31950; Bucur Madalin-Cristian-B32716; linux-clk at vger.kernel.org; linux-pm at vger.kernel.org; linuxppc- dev at lists.ozlabs.org; linux-arm-kernel at lists.infradead.org; devicetree at vger.kernel.org; Wood Scott-B07421
Subject: [RFC PATCH 8/8] powerpc/fsl: Use new clockgen bindingThe driver retains compatibility with old device trees, but we don't want the old nodes lying around to be copied, or used as a reference (some of the mux options are incorrect), or even just being clutter.
Quoted 5 lines
We will also need the #clock-cells in the clockgen node in order to add fman nodes.
Signed-off-by Scott Wood <[email protected]>---
Tested on: several e500mc, e5500 and e6500 platforms.
cover clk: qoriq: Move chip-specific knowledge into driver
In reply to Scott WoodHi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 5 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface rather than describing its individual registers.
Sorry for not responding to this one sooner. Fell through the cracks.
All of the changes to drives/clk/clk-qoriq.c look great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,
Regards,
Mike
Quoted 57 lines
For more detail, see the commit message of patch 4.
Scott Wood (8):
ARM: dts: ls1021a: Fix clockgen node
cpufreq: qoriq: Don't look at clock implementation details powerpc/fsl: Movefsl_guts.hout ofarch/powerpc
clk: qoriq: Move chip-specific knowledge into driver
clk: qoriq: Redirect legacy clock nodes to new clocks
cpufreq: qoriq: Remove frequency masking and minimum
clk: qoriq: Expose OF clocks directly from the clockgen node powerpc/fsl: Use new clockgen binding.../devicetree/bindings/clock/qoriq-clock.txt | 57 +- arch/arm/boot/dts/ls1021a.dtsi | 3 + arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/b4si-post.dtsi | 15 - arch/powerpc/boot/dts/fsl/p2041si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/p3041si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/p4080si-post.dtsi | 70 -- arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi | 16 +- arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/p5040si-post.dtsi | 18 - arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi | 50 +- arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi | 33 +- arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 16 - arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi | 4 +- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 44 - arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/t2081si-post.dtsi | 22 - arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi | 8 +- arch/powerpc/boot/dts/fsl/t4240si-post.dtsi | 61 - arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi | 24 +- arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +- arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 2 +- arch/powerpc/platforms/85xx/p1022_ds.c | 2 +- arch/powerpc/platforms/85xx/p1022_rdk.c | 2 +- arch/powerpc/platforms/85xx/smp.c | 2 +- arch/powerpc/platforms/85xx/twr_p102x.c | 2 +- arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 2 +- drivers/clk/clk-qoriq.c | 1191 ++++++++++++++++---- drivers/cpufreq/qoriq-cpufreq.c | 139 +-- drivers/iommu/fsl_pamu.c | 2 +- .../asm/fsl_guts.h => include/linux/fsl/guts.h | 6 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/p1022_ds.c | 2 +- sound/soc/fsl/p1022_rdk.c | 2 +- 38 files changed, 1107 insertions(+), 776 deletions(-) rename arch/powerpc/include/asm/fsl_guts.h => include/linux/fsl/guts.h (98%)Signature · 1 line
2.1.4
cover clk: qoriq: Move chip-specific knowledge into driver
Quoted 9 lines · Michael Turquette
Hi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 5 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface rather than describing its individual registers.
Quoted 7 lines
Sorry for not responding to this one sooner. Fell through the cracks.
All of the changes to
drives/clk/clk-qoriq.clook great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,
I just sent a non-RFC v2, with improved compatibility with old device trees (especially ls1021a). It depends on the cpufreq patch though (at least, to avoid breaking qoriq-cpufreq until that patch is merged), so I'll also need an ack from Rafael for that if I'm taking it through my tree.
-Scott
cover clk: qoriq: Move chip-specific knowledge into driver
In reply to Michael TurquetteQuoted 9 lines · Michael Turquette
Hi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 5 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface rather than describing its individual registers.
Quoted 7 lines
Sorry for not responding to this one sooner. Fell through the cracks.
All of the changes to
drives/clk/clk-qoriq.clook great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,
Is the ack still valid for the v3 patchset?
-Scott
cover clk: qoriq: Move chip-specific knowledge into driver
In reply to Michael Turquette[Resending to updated e-mail address]
Quoted 9 lines · Michael Turquette
Hi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 5 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface rather than describing its individual registers.
Quoted 7 lines
Sorry for not responding to this one sooner. Fell through the cracks.
All of the changes to
drives/clk/clk-qoriq.clook great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,
Is the ack still valid for the v3 patchset?
-Scott
cover clk: qoriq: Move chip-specific knowledge into driver
Quoted 15 lines · Scott Wood
[Resending to updated e-mail address]
Quoted 12 lines · Michael Turquette
Hi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 6 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface
rather than describing its individual registers.Sorry for not responding to this one sooner. Fell through the cracks.
Quoted 7 lines
Quoted 5 lines
All of the changes to
drives/clk/clk-qoriq.clook great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,Is the ack still valid for the v3 patchset?
ping
-Scott
cover clk: qoriq: Move chip-specific knowledge into driver
Quoting Scott Wood (2015-10-09 16:57:44)
Quoted 16 lines · Scott Wood
Quoted 15 lines
[Resending to updated e-mail address]
Quoted 12 lines · Michael Turquette
Hi Scott,
Quoting Scott Wood (2015-06-18 19:49:10)
Quoted 6 lines
The existing device tree bindings are error-prone and inflexible. Correct the mistake by moving the knowledge into the driver, which has more flexibility in describing the quirks of each chip. This leaves the device tree to its proper role of identifying a programming interface
rather than describing its individual registers.Sorry for not responding to this one sooner. Fell through the cracks.
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
All of the changes to
drives/clk/clk-qoriq.clook great to me. I assume you need to keep all of these patches together and want to the take through the freescale tree? If so feel free to add,Is the ack still valid for the v3 patchset?
Yes. Looks Stephen beat me to it though.
Regards,
Mike
Quoted 5 lines
ping
-Scott