diff for duplicates of <87bmfs1a8w.fsf@bootlin.com> diff --git a/a/1.txt b/N1/1.txt index e1895d8..1d84a5a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,7 +1,6 @@ Hi, -=20 - On mer., f=C3=A9vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com>= - wrote: + + On mer., f?vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > Thanks to new documentation, we have a better view of the clock tree. > There were few mistakes in the first version of this driver, the main one @@ -36,12 +35,10 @@ https://lkml.org/lkml/2018/3/8/812 > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> > --- -> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------= ------- +> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++----------------- > 1 file changed, 39 insertions(+), 55 deletions(-) > -> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mv= -ebu/cp110-system-controller.c +> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c > index ca9a0a536174..75bf7b8f282f 100644 > --- a/drivers/clk/mvebu/cp110-system-controller.c > +++ b/drivers/clk/mvebu/cp110-system-controller.c @@ -69,12 +66,12 @@ ebu/cp110-system-controller.c > - * IP. They have fairly complicated parent/child relationships. > + * CP110 has 32 gatable clocks, for the various peripherals in the IP. > */ ->=20=20 +> > #define pr_fmt(fmt) "cp110-system-controller: " fmt > @@ -53,9 +52,9 @@ enum { > #define CP110_CLK_NUM \ > (CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS) ->=20=20 +> > -#define CP110_CORE_APLL 0 > +#define CP110_CORE_PLL0 0 > #define CP110_CORE_PPV2 1 @@ -83,131 +80,124 @@ ebu/cp110-system-controller.c > #define CP110_CORE_CORE 3 > #define CP110_CORE_NAND 4 > #define CP110_CORE_SDIO 5 -> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_= -device *pdev, +> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > struct regmap *regmap; -> struct device *dev =3D &pdev->dev; -> struct device_node *np =3D dev->of_node; +> struct device *dev = &pdev->dev; +> struct device_node *np = dev->of_node; > - const char *ppv2_name, *apll_name, *core_name, *eip_name, *nand_name, > + const char *ppv2_name, *pll0_name, *core_name, *x2core_name, *nand_name, > *sdio_name; > struct clk_hw_onecell_data *cp110_clk_data; > struct clk_hw *hw, **cp110_clks; -> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, -> cp110_clks =3D cp110_clk_data->hws; -> cp110_clk_data->num =3D CP110_CLK_NUM; ->=20=20 +> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> cp110_clks = cp110_clk_data->hws; +> cp110_clk_data->num = CP110_CLK_NUM; +> > - /* Register the APLL which is the root of the hw tree */ -> - apll_name =3D cp110_unique_name(dev, syscon_node, "apll"); -> - hw =3D clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0, +> - apll_name = cp110_unique_name(dev, syscon_node, "apll"); +> - hw = clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0, > + /* Register the PLL0 which is the root of the hw tree */ -> + pll0_name =3D cp110_unique_name(dev, syscon_node, "pll0"); -> + hw =3D clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0, +> + pll0_name = cp110_unique_name(dev, syscon_node, "pll0"); +> + hw = clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0, > 1000 * 1000 * 1000); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > - goto fail_apll; > + goto fail_pll0; > } ->=20=20 -> - cp110_clks[CP110_CORE_APLL] =3D hw; -> + cp110_clks[CP110_CORE_PLL0] =3D hw; ->=20=20 +> +> - cp110_clks[CP110_CORE_APLL] = hw; +> + cp110_clks[CP110_CORE_PLL0] = hw; +> > - /* PPv2 is APLL/3 */ > + /* PPv2 is PLL0/3 */ -> ppv2_name =3D cp110_unique_name(dev, syscon_node, "ppv2-core"); -> - hw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3= -); -> + hw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3= -); +> ppv2_name = cp110_unique_name(dev, syscon_node, "ppv2-core"); +> - hw = clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3); +> + hw = clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_ppv2; -> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, ->=20=20 -> cp110_clks[CP110_CORE_PPV2] =3D hw; ->=20=20 +> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> +> cp110_clks[CP110_CORE_PPV2] = hw; +> > - /* EIP clock is APLL/2 */ -> - eip_name =3D cp110_unique_name(dev, syscon_node, "eip"); -> - hw =3D clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2); +> - eip_name = cp110_unique_name(dev, syscon_node, "eip"); +> - hw = clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2); > + /* X2CORE clock is PLL0/2 */ -> + x2core_name =3D cp110_unique_name(dev, syscon_node, "x2core"); -> + hw =3D clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name, +> + x2core_name = cp110_unique_name(dev, syscon_node, "x2core"); +> + hw = clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name, > + 0, 1, 2); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_eip; > } ->=20=20 -> - cp110_clks[CP110_CORE_EIP] =3D hw; -> + cp110_clks[CP110_CORE_X2CORE] =3D hw; ->=20=20 +> +> - cp110_clks[CP110_CORE_EIP] = hw; +> + cp110_clks[CP110_CORE_X2CORE] = hw; +> > - /* Core clock is EIP/2 */ > + /* Core clock is X2CORE/2 */ -> core_name =3D cp110_unique_name(dev, syscon_node, "core"); -> - hw =3D clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2); -> + hw =3D clk_hw_register_fixed_factor(NULL, core_name, x2core_name, +> core_name = cp110_unique_name(dev, syscon_node, "core"); +> - hw = clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2); +> + hw = clk_hw_register_fixed_factor(NULL, core_name, x2core_name, > + 0, 1, 2); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_core; > } ->=20=20 -> cp110_clks[CP110_CORE_CORE] =3D hw; +> +> cp110_clks[CP110_CORE_CORE] = hw; > - /* NAND can be either APLL/2.5 or core clock */ > + /* NAND can be either PLL0/2.5 or core clock */ -> nand_name =3D cp110_unique_name(dev, syscon_node, "nand-core"); +> nand_name = cp110_unique_name(dev, syscon_node, "nand-core"); > if (nand_clk_ctrl & NF_CLOCK_SEL_400_MASK) -> hw =3D clk_hw_register_fixed_factor(NULL, nand_name, +> hw = clk_hw_register_fixed_factor(NULL, nand_name, > - apll_name, 0, 2, 5); > + pll0_name, 0, 2, 5); > else -> hw =3D clk_hw_register_fixed_factor(NULL, nand_name, +> hw = clk_hw_register_fixed_factor(NULL, nand_name, > core_name, 0, 1, 1); -> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, ->=20=20 -> cp110_clks[CP110_CORE_NAND] =3D hw; ->=20=20 +> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> +> cp110_clks[CP110_CORE_NAND] = hw; +> > - /* SDIO clock is APLL/2.5 */ > + /* SDIO clock is PLL0/2.5 */ -> sdio_name =3D cp110_unique_name(dev, syscon_node, "sdio-core"); -> hw =3D clk_hw_register_fixed_factor(NULL, sdio_name, +> sdio_name = cp110_unique_name(dev, syscon_node, "sdio-core"); +> hw = clk_hw_register_fixed_factor(NULL, sdio_name, > - apll_name, 0, 2, 5); > + pll0_name, 0, 2, 5); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_sdio; -> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, +> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > continue; ->=20=20 +> > switch (i) { > - case CP110_GATE_AUDIO: > - case CP110_GATE_COMM_UNIT: > - case CP110_GATE_EIP150: > - case CP110_GATE_EIP197: > - case CP110_GATE_SLOW_IO: -> - parent =3D gate_name[CP110_GATE_MAIN]; +> - parent = gate_name[CP110_GATE_MAIN]; > - break; > - case CP110_GATE_MG: -> - parent =3D gate_name[CP110_GATE_MG_CORE]; +> - parent = gate_name[CP110_GATE_MG_CORE]; > - break; > case CP110_GATE_NAND: -> parent =3D nand_name; +> parent = nand_name; > break; > + case CP110_GATE_MG: > + case CP110_GATE_GOP_DP: > case CP110_GATE_PPV2: -> parent =3D ppv2_name; +> parent = ppv2_name; > break; > case CP110_GATE_SDIO: -> parent =3D sdio_name; +> parent = sdio_name; > break; > - case CP110_GATE_GOP_DP: -> - parent =3D gate_name[CP110_GATE_SDMMC_GOP]; +> - parent = gate_name[CP110_GATE_SDMMC_GOP]; > - break; > - case CP110_GATE_XOR1: > - case CP110_GATE_XOR0: @@ -216,21 +206,20 @@ m_device *pdev, > + case CP110_GATE_MAIN: > + case CP110_GATE_PCIE_XOR: > case CP110_GATE_PCIE_X4: -> - parent =3D gate_name[CP110_GATE_PCIE_XOR]; +> - parent = gate_name[CP110_GATE_PCIE_XOR]; > - break; > - case CP110_GATE_SATA: > - case CP110_GATE_USB3H0: > - case CP110_GATE_USB3H1: > - case CP110_GATE_USB3DEV: -> - parent =3D gate_name[CP110_GATE_SATA_USB]; +> - parent = gate_name[CP110_GATE_SATA_USB]; > + case CP110_GATE_EIP150: > + case CP110_GATE_EIP197: -> + parent =3D x2core_name; +> + parent = x2core_name; > break; > default: -> parent =3D core_name; -> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, +> parent = core_name; +> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > fail_nand: > clk_hw_unregister_fixed_factor(cp110_clks[CP110_CORE_CORE]); > fail_core: @@ -245,12 +234,12 @@ m_device *pdev, > +fail_pll0: > return ret; > } ->=20=20 -> --=20 +> +> -- > 2.16.1 > ---=20 +-- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com diff --git a/a/content_digest b/N1/content_digest index 53e971c..1affe47 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,30 +1,13 @@ "ref\020180228140751.10819-1-gregory.clement@bootlin.com\0" - "From\0Gregory CLEMENT <gregory.clement@bootlin.com>\0" - "Subject\0Re: [PATCH] clk: mvebu: cp110: Fix clock tree representation\0" + "From\0gregory.clement@bootlin.com (Gregory CLEMENT)\0" + "Subject\0[PATCH] clk: mvebu: cp110: Fix clock tree representation\0" "Date\0Tue, 13 Mar 2018 12:32:47 +0100\0" - "To\0Stephen Boyd <sboyd@codeaurora.org>" - " Mike Turquette <mturquette@baylibre.com>\0" - "Cc\0linux-clk@vger.kernel.org" - linux-kernel@vger.kernel.org - Jason Cooper <jason@lakedaemon.net> - Andrew Lunn <andrew@lunn.ch> - Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> - Thomas Petazzoni <thomas.petazzoni@bootlin.com> - linux-arm-kernel@lists.infradead.org - Antoine Tenart <antoine.tenart@bootlin.com> - " Miqu\303\250l Raynal <miquel.raynal@bootlin.com>" - Nadav Haklai <nadavh@marvell.com> - Shadi Ammouri <shadi@marvell.com> - Omri Itach <omrii@marvell.com> - Hanna Hawa <hannah@marvell.com> - Igal Liberman <igall@marvell.com> - " Marcin Wojtas <mw@semihalf.com>\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Hi,\n" - "=20\n" - " On mer., f=C3=A9vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com>=\n" - " wrote:\n" + " \n" + " On mer., f?vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com> wrote:\n" "\n" "> Thanks to new documentation, we have a better view of the clock tree.\n" "> There were few mistakes in the first version of this driver, the main one\n" @@ -59,12 +42,10 @@ ">\n" "> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>\n" "> ---\n" - "> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------=\n" - "------\n" + "> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------------\n" "> 1 file changed, 39 insertions(+), 55 deletions(-)\n" ">\n" - "> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mv=\n" - "ebu/cp110-system-controller.c\n" + "> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c\n" "> index ca9a0a536174..75bf7b8f282f 100644\n" "> --- a/drivers/clk/mvebu/cp110-system-controller.c\n" "> +++ b/drivers/clk/mvebu/cp110-system-controller.c\n" @@ -92,12 +73,12 @@ "> - * IP. They have fairly complicated parent/child relationships.\n" "> + * CP110 has 32 gatable clocks, for the various peripherals in the IP.\n" "> */\n" - ">=20=20\n" + "> \n" "> #define pr_fmt(fmt) \"cp110-system-controller: \" fmt\n" "> @@ -53,9 +52,9 @@ enum {\n" "> #define CP110_CLK_NUM \\\n" "> \t(CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS)\n" - ">=20=20\n" + "> \n" "> -#define CP110_CORE_APLL\t\t\t0\n" "> +#define CP110_CORE_PLL0\t\t\t0\n" "> #define CP110_CORE_PPV2\t\t\t1\n" @@ -106,131 +87,124 @@ "> #define CP110_CORE_CORE\t\t\t3\n" "> #define CP110_CORE_NAND\t\t\t4\n" "> #define CP110_CORE_SDIO\t\t\t5\n" - "> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_=\n" - "device *pdev,\n" + "> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> \tstruct regmap *regmap;\n" - "> \tstruct device *dev =3D &pdev->dev;\n" - "> \tstruct device_node *np =3D dev->of_node;\n" + "> \tstruct device *dev = &pdev->dev;\n" + "> \tstruct device_node *np = dev->of_node;\n" "> -\tconst char *ppv2_name, *apll_name, *core_name, *eip_name, *nand_name,\n" "> +\tconst char *ppv2_name, *pll0_name, *core_name, *x2core_name, *nand_name,\n" "> \t\t*sdio_name;\n" "> \tstruct clk_hw_onecell_data *cp110_clk_data;\n" "> \tstruct clk_hw *hw, **cp110_clks;\n" - "> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - "> \tcp110_clks =3D cp110_clk_data->hws;\n" - "> \tcp110_clk_data->num =3D CP110_CLK_NUM;\n" - ">=20=20\n" + "> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \tcp110_clks = cp110_clk_data->hws;\n" + "> \tcp110_clk_data->num = CP110_CLK_NUM;\n" + "> \n" "> -\t/* Register the APLL which is the root of the hw tree */\n" - "> -\tapll_name =3D cp110_unique_name(dev, syscon_node, \"apll\");\n" - "> -\thw =3D clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0,\n" + "> -\tapll_name = cp110_unique_name(dev, syscon_node, \"apll\");\n" + "> -\thw = clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0,\n" "> +\t/* Register the PLL0 which is the root of the hw tree */\n" - "> +\tpll0_name =3D cp110_unique_name(dev, syscon_node, \"pll0\");\n" - "> +\thw =3D clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0,\n" + "> +\tpll0_name = cp110_unique_name(dev, syscon_node, \"pll0\");\n" + "> +\thw = clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0,\n" "> \t\t\t\t\t1000 * 1000 * 1000);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> -\t\tgoto fail_apll;\n" "> +\t\tgoto fail_pll0;\n" "> \t}\n" - ">=20=20\n" - "> -\tcp110_clks[CP110_CORE_APLL] =3D hw;\n" - "> +\tcp110_clks[CP110_CORE_PLL0] =3D hw;\n" - ">=20=20\n" + "> \n" + "> -\tcp110_clks[CP110_CORE_APLL] = hw;\n" + "> +\tcp110_clks[CP110_CORE_PLL0] = hw;\n" + "> \n" "> -\t/* PPv2 is APLL/3 */\n" "> +\t/* PPv2 is PLL0/3 */\n" - "> \tppv2_name =3D cp110_unique_name(dev, syscon_node, \"ppv2-core\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3=\n" - ");\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3=\n" - ");\n" + "> \tppv2_name = cp110_unique_name(dev, syscon_node, \"ppv2-core\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3);\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_ppv2;\n" - "> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_PPV2] =3D hw;\n" - ">=20=20\n" + "> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \n" + "> \tcp110_clks[CP110_CORE_PPV2] = hw;\n" + "> \n" "> -\t/* EIP clock is APLL/2 */\n" - "> -\teip_name =3D cp110_unique_name(dev, syscon_node, \"eip\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2);\n" + "> -\teip_name = cp110_unique_name(dev, syscon_node, \"eip\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2);\n" "> +\t/* X2CORE clock is PLL0/2 */\n" - "> +\tx2core_name =3D cp110_unique_name(dev, syscon_node, \"x2core\");\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name,\n" + "> +\tx2core_name = cp110_unique_name(dev, syscon_node, \"x2core\");\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name,\n" "> +\t\t\t\t\t 0, 1, 2);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_eip;\n" "> \t}\n" - ">=20=20\n" - "> -\tcp110_clks[CP110_CORE_EIP] =3D hw;\n" - "> +\tcp110_clks[CP110_CORE_X2CORE] =3D hw;\n" - ">=20=20\n" + "> \n" + "> -\tcp110_clks[CP110_CORE_EIP] = hw;\n" + "> +\tcp110_clks[CP110_CORE_X2CORE] = hw;\n" + "> \n" "> -\t/* Core clock is EIP/2 */\n" "> +\t/* Core clock is X2CORE/2 */\n" - "> \tcore_name =3D cp110_unique_name(dev, syscon_node, \"core\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2);\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, core_name, x2core_name,\n" + "> \tcore_name = cp110_unique_name(dev, syscon_node, \"core\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2);\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, core_name, x2core_name,\n" "> +\t\t\t\t\t 0, 1, 2);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_core;\n" "> \t}\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_CORE] =3D hw;\n" + "> \n" + "> \tcp110_clks[CP110_CORE_CORE] = hw;\n" "> -\t/* NAND can be either APLL/2.5 or core clock */\n" "> +\t/* NAND can be either PLL0/2.5 or core clock */\n" - "> \tnand_name =3D cp110_unique_name(dev, syscon_node, \"nand-core\");\n" + "> \tnand_name = cp110_unique_name(dev, syscon_node, \"nand-core\");\n" "> \tif (nand_clk_ctrl & NF_CLOCK_SEL_400_MASK)\n" - "> \t\thw =3D clk_hw_register_fixed_factor(NULL, nand_name,\n" + "> \t\thw = clk_hw_register_fixed_factor(NULL, nand_name,\n" "> -\t\t\t\t\t\t apll_name, 0, 2, 5);\n" "> +\t\t\t\t\t\t pll0_name, 0, 2, 5);\n" "> \telse\n" - "> \t\thw =3D clk_hw_register_fixed_factor(NULL, nand_name,\n" + "> \t\thw = clk_hw_register_fixed_factor(NULL, nand_name,\n" "> \t\t\t\t\t\t core_name, 0, 1, 1);\n" - "> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_NAND] =3D hw;\n" - ">=20=20\n" + "> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \n" + "> \tcp110_clks[CP110_CORE_NAND] = hw;\n" + "> \n" "> -\t/* SDIO clock is APLL/2.5 */\n" "> +\t/* SDIO clock is PLL0/2.5 */\n" - "> \tsdio_name =3D cp110_unique_name(dev, syscon_node, \"sdio-core\");\n" - "> \thw =3D clk_hw_register_fixed_factor(NULL, sdio_name,\n" + "> \tsdio_name = cp110_unique_name(dev, syscon_node, \"sdio-core\");\n" + "> \thw = clk_hw_register_fixed_factor(NULL, sdio_name,\n" "> -\t\t\t\t\t apll_name, 0, 2, 5);\n" "> +\t\t\t\t\t pll0_name, 0, 2, 5);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_sdio;\n" - "> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" + "> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> \t\t\tcontinue;\n" - ">=20=20\n" + "> \n" "> \t\tswitch (i) {\n" "> -\t\tcase CP110_GATE_AUDIO:\n" "> -\t\tcase CP110_GATE_COMM_UNIT:\n" "> -\t\tcase CP110_GATE_EIP150:\n" "> -\t\tcase CP110_GATE_EIP197:\n" "> -\t\tcase CP110_GATE_SLOW_IO:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_MAIN];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_MAIN];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_MG:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_MG_CORE];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_MG_CORE];\n" "> -\t\t\tbreak;\n" "> \t\tcase CP110_GATE_NAND:\n" - "> \t\t\tparent =3D nand_name;\n" + "> \t\t\tparent = nand_name;\n" "> \t\t\tbreak;\n" "> +\t\tcase CP110_GATE_MG:\n" "> +\t\tcase CP110_GATE_GOP_DP:\n" "> \t\tcase CP110_GATE_PPV2:\n" - "> \t\t\tparent =3D ppv2_name;\n" + "> \t\t\tparent = ppv2_name;\n" "> \t\t\tbreak;\n" "> \t\tcase CP110_GATE_SDIO:\n" - "> \t\t\tparent =3D sdio_name;\n" + "> \t\t\tparent = sdio_name;\n" "> \t\t\tbreak;\n" "> -\t\tcase CP110_GATE_GOP_DP:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_SDMMC_GOP];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_SDMMC_GOP];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_XOR1:\n" "> -\t\tcase CP110_GATE_XOR0:\n" @@ -239,21 +213,20 @@ "> +\t\tcase CP110_GATE_MAIN:\n" "> +\t\tcase CP110_GATE_PCIE_XOR:\n" "> \t\tcase CP110_GATE_PCIE_X4:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_PCIE_XOR];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_PCIE_XOR];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_SATA:\n" "> -\t\tcase CP110_GATE_USB3H0:\n" "> -\t\tcase CP110_GATE_USB3H1:\n" "> -\t\tcase CP110_GATE_USB3DEV:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_SATA_USB];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_SATA_USB];\n" "> +\t\tcase CP110_GATE_EIP150:\n" "> +\t\tcase CP110_GATE_EIP197:\n" - "> +\t\t\tparent =3D x2core_name;\n" + "> +\t\t\tparent = x2core_name;\n" "> \t\t\tbreak;\n" "> \t\tdefault:\n" - "> \t\t\tparent =3D core_name;\n" - "> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" + "> \t\t\tparent = core_name;\n" + "> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> fail_nand:\n" "> \tclk_hw_unregister_fixed_factor(cp110_clks[CP110_CORE_CORE]);\n" "> fail_core:\n" @@ -268,14 +241,14 @@ "> +fail_pll0:\n" "> \treturn ret;\n" "> }\n" - ">=20=20\n" - "> --=20\n" + "> \n" + "> -- \n" "> 2.16.1\n" ">\n" "\n" - "--=20\n" + "-- \n" "Gregory Clement, Bootlin (formerly Free Electrons)\n" "Embedded Linux and Kernel engineering\n" http://bootlin.com -b25051e70833c056992fcbbe0323b3dae52f788c5367282317c5a4910f55af08 +676b0ad1094d03942eae55b42111a631104661174b03a164e024c9011f25751f
diff --git a/a/1.txt b/N2/1.txt index e1895d8..f7da43f 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,7 +1,6 @@ Hi, -=20 - On mer., f=C3=A9vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com>= - wrote: + + On mer., févr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com> wrote: > Thanks to new documentation, we have a better view of the clock tree. > There were few mistakes in the first version of this driver, the main one @@ -36,12 +35,10 @@ https://lkml.org/lkml/2018/3/8/812 > > Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com> > --- -> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------= ------- +> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++----------------- > 1 file changed, 39 insertions(+), 55 deletions(-) > -> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mv= -ebu/cp110-system-controller.c +> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c > index ca9a0a536174..75bf7b8f282f 100644 > --- a/drivers/clk/mvebu/cp110-system-controller.c > +++ b/drivers/clk/mvebu/cp110-system-controller.c @@ -69,12 +66,12 @@ ebu/cp110-system-controller.c > - * IP. They have fairly complicated parent/child relationships. > + * CP110 has 32 gatable clocks, for the various peripherals in the IP. > */ ->=20=20 +> > #define pr_fmt(fmt) "cp110-system-controller: " fmt > @@ -53,9 +52,9 @@ enum { > #define CP110_CLK_NUM \ > (CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS) ->=20=20 +> > -#define CP110_CORE_APLL 0 > +#define CP110_CORE_PLL0 0 > #define CP110_CORE_PPV2 1 @@ -83,131 +80,124 @@ ebu/cp110-system-controller.c > #define CP110_CORE_CORE 3 > #define CP110_CORE_NAND 4 > #define CP110_CORE_SDIO 5 -> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_= -device *pdev, +> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > struct regmap *regmap; -> struct device *dev =3D &pdev->dev; -> struct device_node *np =3D dev->of_node; +> struct device *dev = &pdev->dev; +> struct device_node *np = dev->of_node; > - const char *ppv2_name, *apll_name, *core_name, *eip_name, *nand_name, > + const char *ppv2_name, *pll0_name, *core_name, *x2core_name, *nand_name, > *sdio_name; > struct clk_hw_onecell_data *cp110_clk_data; > struct clk_hw *hw, **cp110_clks; -> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, -> cp110_clks =3D cp110_clk_data->hws; -> cp110_clk_data->num =3D CP110_CLK_NUM; ->=20=20 +> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> cp110_clks = cp110_clk_data->hws; +> cp110_clk_data->num = CP110_CLK_NUM; +> > - /* Register the APLL which is the root of the hw tree */ -> - apll_name =3D cp110_unique_name(dev, syscon_node, "apll"); -> - hw =3D clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0, +> - apll_name = cp110_unique_name(dev, syscon_node, "apll"); +> - hw = clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0, > + /* Register the PLL0 which is the root of the hw tree */ -> + pll0_name =3D cp110_unique_name(dev, syscon_node, "pll0"); -> + hw =3D clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0, +> + pll0_name = cp110_unique_name(dev, syscon_node, "pll0"); +> + hw = clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0, > 1000 * 1000 * 1000); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > - goto fail_apll; > + goto fail_pll0; > } ->=20=20 -> - cp110_clks[CP110_CORE_APLL] =3D hw; -> + cp110_clks[CP110_CORE_PLL0] =3D hw; ->=20=20 +> +> - cp110_clks[CP110_CORE_APLL] = hw; +> + cp110_clks[CP110_CORE_PLL0] = hw; +> > - /* PPv2 is APLL/3 */ > + /* PPv2 is PLL0/3 */ -> ppv2_name =3D cp110_unique_name(dev, syscon_node, "ppv2-core"); -> - hw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3= -); -> + hw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3= -); +> ppv2_name = cp110_unique_name(dev, syscon_node, "ppv2-core"); +> - hw = clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3); +> + hw = clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_ppv2; -> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, ->=20=20 -> cp110_clks[CP110_CORE_PPV2] =3D hw; ->=20=20 +> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> +> cp110_clks[CP110_CORE_PPV2] = hw; +> > - /* EIP clock is APLL/2 */ -> - eip_name =3D cp110_unique_name(dev, syscon_node, "eip"); -> - hw =3D clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2); +> - eip_name = cp110_unique_name(dev, syscon_node, "eip"); +> - hw = clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2); > + /* X2CORE clock is PLL0/2 */ -> + x2core_name =3D cp110_unique_name(dev, syscon_node, "x2core"); -> + hw =3D clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name, +> + x2core_name = cp110_unique_name(dev, syscon_node, "x2core"); +> + hw = clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name, > + 0, 1, 2); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_eip; > } ->=20=20 -> - cp110_clks[CP110_CORE_EIP] =3D hw; -> + cp110_clks[CP110_CORE_X2CORE] =3D hw; ->=20=20 +> +> - cp110_clks[CP110_CORE_EIP] = hw; +> + cp110_clks[CP110_CORE_X2CORE] = hw; +> > - /* Core clock is EIP/2 */ > + /* Core clock is X2CORE/2 */ -> core_name =3D cp110_unique_name(dev, syscon_node, "core"); -> - hw =3D clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2); -> + hw =3D clk_hw_register_fixed_factor(NULL, core_name, x2core_name, +> core_name = cp110_unique_name(dev, syscon_node, "core"); +> - hw = clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2); +> + hw = clk_hw_register_fixed_factor(NULL, core_name, x2core_name, > + 0, 1, 2); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_core; > } ->=20=20 -> cp110_clks[CP110_CORE_CORE] =3D hw; +> +> cp110_clks[CP110_CORE_CORE] = hw; > - /* NAND can be either APLL/2.5 or core clock */ > + /* NAND can be either PLL0/2.5 or core clock */ -> nand_name =3D cp110_unique_name(dev, syscon_node, "nand-core"); +> nand_name = cp110_unique_name(dev, syscon_node, "nand-core"); > if (nand_clk_ctrl & NF_CLOCK_SEL_400_MASK) -> hw =3D clk_hw_register_fixed_factor(NULL, nand_name, +> hw = clk_hw_register_fixed_factor(NULL, nand_name, > - apll_name, 0, 2, 5); > + pll0_name, 0, 2, 5); > else -> hw =3D clk_hw_register_fixed_factor(NULL, nand_name, +> hw = clk_hw_register_fixed_factor(NULL, nand_name, > core_name, 0, 1, 1); -> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, ->=20=20 -> cp110_clks[CP110_CORE_NAND] =3D hw; ->=20=20 +> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, +> +> cp110_clks[CP110_CORE_NAND] = hw; +> > - /* SDIO clock is APLL/2.5 */ > + /* SDIO clock is PLL0/2.5 */ -> sdio_name =3D cp110_unique_name(dev, syscon_node, "sdio-core"); -> hw =3D clk_hw_register_fixed_factor(NULL, sdio_name, +> sdio_name = cp110_unique_name(dev, syscon_node, "sdio-core"); +> hw = clk_hw_register_fixed_factor(NULL, sdio_name, > - apll_name, 0, 2, 5); > + pll0_name, 0, 2, 5); > if (IS_ERR(hw)) { -> ret =3D PTR_ERR(hw); +> ret = PTR_ERR(hw); > goto fail_sdio; -> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, +> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > continue; ->=20=20 +> > switch (i) { > - case CP110_GATE_AUDIO: > - case CP110_GATE_COMM_UNIT: > - case CP110_GATE_EIP150: > - case CP110_GATE_EIP197: > - case CP110_GATE_SLOW_IO: -> - parent =3D gate_name[CP110_GATE_MAIN]; +> - parent = gate_name[CP110_GATE_MAIN]; > - break; > - case CP110_GATE_MG: -> - parent =3D gate_name[CP110_GATE_MG_CORE]; +> - parent = gate_name[CP110_GATE_MG_CORE]; > - break; > case CP110_GATE_NAND: -> parent =3D nand_name; +> parent = nand_name; > break; > + case CP110_GATE_MG: > + case CP110_GATE_GOP_DP: > case CP110_GATE_PPV2: -> parent =3D ppv2_name; +> parent = ppv2_name; > break; > case CP110_GATE_SDIO: -> parent =3D sdio_name; +> parent = sdio_name; > break; > - case CP110_GATE_GOP_DP: -> - parent =3D gate_name[CP110_GATE_SDMMC_GOP]; +> - parent = gate_name[CP110_GATE_SDMMC_GOP]; > - break; > - case CP110_GATE_XOR1: > - case CP110_GATE_XOR0: @@ -216,21 +206,20 @@ m_device *pdev, > + case CP110_GATE_MAIN: > + case CP110_GATE_PCIE_XOR: > case CP110_GATE_PCIE_X4: -> - parent =3D gate_name[CP110_GATE_PCIE_XOR]; +> - parent = gate_name[CP110_GATE_PCIE_XOR]; > - break; > - case CP110_GATE_SATA: > - case CP110_GATE_USB3H0: > - case CP110_GATE_USB3H1: > - case CP110_GATE_USB3DEV: -> - parent =3D gate_name[CP110_GATE_SATA_USB]; +> - parent = gate_name[CP110_GATE_SATA_USB]; > + case CP110_GATE_EIP150: > + case CP110_GATE_EIP197: -> + parent =3D x2core_name; +> + parent = x2core_name; > break; > default: -> parent =3D core_name; -> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platfor= -m_device *pdev, +> parent = core_name; +> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platform_device *pdev, > fail_nand: > clk_hw_unregister_fixed_factor(cp110_clks[CP110_CORE_CORE]); > fail_core: @@ -245,12 +234,12 @@ m_device *pdev, > +fail_pll0: > return ret; > } ->=20=20 -> --=20 +> +> -- > 2.16.1 > ---=20 +-- Gregory Clement, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com diff --git a/a/content_digest b/N2/content_digest index 53e971c..514851c 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -22,9 +22,8 @@ "\00:1\0" "b\0" "Hi,\n" - "=20\n" - " On mer., f=C3=A9vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com>=\n" - " wrote:\n" + " \n" + " On mer., f\303\251vr. 28 2018, Gregory CLEMENT <gregory.clement@bootlin.com> wrote:\n" "\n" "> Thanks to new documentation, we have a better view of the clock tree.\n" "> There were few mistakes in the first version of this driver, the main one\n" @@ -59,12 +58,10 @@ ">\n" "> Signed-off-by: Gregory CLEMENT <gregory.clement@bootlin.com>\n" "> ---\n" - "> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------=\n" - "------\n" + "> drivers/clk/mvebu/cp110-system-controller.c | 94 ++++++++++++-----------------\n" "> 1 file changed, 39 insertions(+), 55 deletions(-)\n" ">\n" - "> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mv=\n" - "ebu/cp110-system-controller.c\n" + "> diff --git a/drivers/clk/mvebu/cp110-system-controller.c b/drivers/clk/mvebu/cp110-system-controller.c\n" "> index ca9a0a536174..75bf7b8f282f 100644\n" "> --- a/drivers/clk/mvebu/cp110-system-controller.c\n" "> +++ b/drivers/clk/mvebu/cp110-system-controller.c\n" @@ -92,12 +89,12 @@ "> - * IP. They have fairly complicated parent/child relationships.\n" "> + * CP110 has 32 gatable clocks, for the various peripherals in the IP.\n" "> */\n" - ">=20=20\n" + "> \n" "> #define pr_fmt(fmt) \"cp110-system-controller: \" fmt\n" "> @@ -53,9 +52,9 @@ enum {\n" "> #define CP110_CLK_NUM \\\n" "> \t(CP110_MAX_CORE_CLOCKS + CP110_MAX_GATABLE_CLOCKS)\n" - ">=20=20\n" + "> \n" "> -#define CP110_CORE_APLL\t\t\t0\n" "> +#define CP110_CORE_PLL0\t\t\t0\n" "> #define CP110_CORE_PPV2\t\t\t1\n" @@ -106,131 +103,124 @@ "> #define CP110_CORE_CORE\t\t\t3\n" "> #define CP110_CORE_NAND\t\t\t4\n" "> #define CP110_CORE_SDIO\t\t\t5\n" - "> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_=\n" - "device *pdev,\n" + "> @@ -237,7 +236,7 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> \tstruct regmap *regmap;\n" - "> \tstruct device *dev =3D &pdev->dev;\n" - "> \tstruct device_node *np =3D dev->of_node;\n" + "> \tstruct device *dev = &pdev->dev;\n" + "> \tstruct device_node *np = dev->of_node;\n" "> -\tconst char *ppv2_name, *apll_name, *core_name, *eip_name, *nand_name,\n" "> +\tconst char *ppv2_name, *pll0_name, *core_name, *x2core_name, *nand_name,\n" "> \t\t*sdio_name;\n" "> \tstruct clk_hw_onecell_data *cp110_clk_data;\n" "> \tstruct clk_hw *hw, **cp110_clks;\n" - "> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - "> \tcp110_clks =3D cp110_clk_data->hws;\n" - "> \tcp110_clk_data->num =3D CP110_CLK_NUM;\n" - ">=20=20\n" + "> @@ -263,20 +262,20 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \tcp110_clks = cp110_clk_data->hws;\n" + "> \tcp110_clk_data->num = CP110_CLK_NUM;\n" + "> \n" "> -\t/* Register the APLL which is the root of the hw tree */\n" - "> -\tapll_name =3D cp110_unique_name(dev, syscon_node, \"apll\");\n" - "> -\thw =3D clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0,\n" + "> -\tapll_name = cp110_unique_name(dev, syscon_node, \"apll\");\n" + "> -\thw = clk_hw_register_fixed_rate(NULL, apll_name, NULL, 0,\n" "> +\t/* Register the PLL0 which is the root of the hw tree */\n" - "> +\tpll0_name =3D cp110_unique_name(dev, syscon_node, \"pll0\");\n" - "> +\thw =3D clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0,\n" + "> +\tpll0_name = cp110_unique_name(dev, syscon_node, \"pll0\");\n" + "> +\thw = clk_hw_register_fixed_rate(NULL, pll0_name, NULL, 0,\n" "> \t\t\t\t\t1000 * 1000 * 1000);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> -\t\tgoto fail_apll;\n" "> +\t\tgoto fail_pll0;\n" "> \t}\n" - ">=20=20\n" - "> -\tcp110_clks[CP110_CORE_APLL] =3D hw;\n" - "> +\tcp110_clks[CP110_CORE_PLL0] =3D hw;\n" - ">=20=20\n" + "> \n" + "> -\tcp110_clks[CP110_CORE_APLL] = hw;\n" + "> +\tcp110_clks[CP110_CORE_PLL0] = hw;\n" + "> \n" "> -\t/* PPv2 is APLL/3 */\n" "> +\t/* PPv2 is PLL0/3 */\n" - "> \tppv2_name =3D cp110_unique_name(dev, syscon_node, \"ppv2-core\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3=\n" - ");\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3=\n" - ");\n" + "> \tppv2_name = cp110_unique_name(dev, syscon_node, \"ppv2-core\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, ppv2_name, apll_name, 0, 1, 3);\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, ppv2_name, pll0_name, 0, 1, 3);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_ppv2;\n" - "> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_PPV2] =3D hw;\n" - ">=20=20\n" + "> @@ -284,30 +283,32 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \n" + "> \tcp110_clks[CP110_CORE_PPV2] = hw;\n" + "> \n" "> -\t/* EIP clock is APLL/2 */\n" - "> -\teip_name =3D cp110_unique_name(dev, syscon_node, \"eip\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2);\n" + "> -\teip_name = cp110_unique_name(dev, syscon_node, \"eip\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, eip_name, apll_name, 0, 1, 2);\n" "> +\t/* X2CORE clock is PLL0/2 */\n" - "> +\tx2core_name =3D cp110_unique_name(dev, syscon_node, \"x2core\");\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name,\n" + "> +\tx2core_name = cp110_unique_name(dev, syscon_node, \"x2core\");\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, x2core_name, pll0_name,\n" "> +\t\t\t\t\t 0, 1, 2);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_eip;\n" "> \t}\n" - ">=20=20\n" - "> -\tcp110_clks[CP110_CORE_EIP] =3D hw;\n" - "> +\tcp110_clks[CP110_CORE_X2CORE] =3D hw;\n" - ">=20=20\n" + "> \n" + "> -\tcp110_clks[CP110_CORE_EIP] = hw;\n" + "> +\tcp110_clks[CP110_CORE_X2CORE] = hw;\n" + "> \n" "> -\t/* Core clock is EIP/2 */\n" "> +\t/* Core clock is X2CORE/2 */\n" - "> \tcore_name =3D cp110_unique_name(dev, syscon_node, \"core\");\n" - "> -\thw =3D clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2);\n" - "> +\thw =3D clk_hw_register_fixed_factor(NULL, core_name, x2core_name,\n" + "> \tcore_name = cp110_unique_name(dev, syscon_node, \"core\");\n" + "> -\thw = clk_hw_register_fixed_factor(NULL, core_name, eip_name, 0, 1, 2);\n" + "> +\thw = clk_hw_register_fixed_factor(NULL, core_name, x2core_name,\n" "> +\t\t\t\t\t 0, 1, 2);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_core;\n" "> \t}\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_CORE] =3D hw;\n" + "> \n" + "> \tcp110_clks[CP110_CORE_CORE] = hw;\n" "> -\t/* NAND can be either APLL/2.5 or core clock */\n" "> +\t/* NAND can be either PLL0/2.5 or core clock */\n" - "> \tnand_name =3D cp110_unique_name(dev, syscon_node, \"nand-core\");\n" + "> \tnand_name = cp110_unique_name(dev, syscon_node, \"nand-core\");\n" "> \tif (nand_clk_ctrl & NF_CLOCK_SEL_400_MASK)\n" - "> \t\thw =3D clk_hw_register_fixed_factor(NULL, nand_name,\n" + "> \t\thw = clk_hw_register_fixed_factor(NULL, nand_name,\n" "> -\t\t\t\t\t\t apll_name, 0, 2, 5);\n" "> +\t\t\t\t\t\t pll0_name, 0, 2, 5);\n" "> \telse\n" - "> \t\thw =3D clk_hw_register_fixed_factor(NULL, nand_name,\n" + "> \t\thw = clk_hw_register_fixed_factor(NULL, nand_name,\n" "> \t\t\t\t\t\t core_name, 0, 1, 1);\n" - "> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" - ">=20=20\n" - "> \tcp110_clks[CP110_CORE_NAND] =3D hw;\n" - ">=20=20\n" + "> @@ -318,10 +319,10 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" + "> \n" + "> \tcp110_clks[CP110_CORE_NAND] = hw;\n" + "> \n" "> -\t/* SDIO clock is APLL/2.5 */\n" "> +\t/* SDIO clock is PLL0/2.5 */\n" - "> \tsdio_name =3D cp110_unique_name(dev, syscon_node, \"sdio-core\");\n" - "> \thw =3D clk_hw_register_fixed_factor(NULL, sdio_name,\n" + "> \tsdio_name = cp110_unique_name(dev, syscon_node, \"sdio-core\");\n" + "> \thw = clk_hw_register_fixed_factor(NULL, sdio_name,\n" "> -\t\t\t\t\t apll_name, 0, 2, 5);\n" "> +\t\t\t\t\t pll0_name, 0, 2, 5);\n" "> \tif (IS_ERR(hw)) {\n" - "> \t\tret =3D PTR_ERR(hw);\n" + "> \t\tret = PTR_ERR(hw);\n" "> \t\tgoto fail_sdio;\n" - "> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" + "> @@ -341,40 +342,23 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> \t\t\tcontinue;\n" - ">=20=20\n" + "> \n" "> \t\tswitch (i) {\n" "> -\t\tcase CP110_GATE_AUDIO:\n" "> -\t\tcase CP110_GATE_COMM_UNIT:\n" "> -\t\tcase CP110_GATE_EIP150:\n" "> -\t\tcase CP110_GATE_EIP197:\n" "> -\t\tcase CP110_GATE_SLOW_IO:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_MAIN];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_MAIN];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_MG:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_MG_CORE];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_MG_CORE];\n" "> -\t\t\tbreak;\n" "> \t\tcase CP110_GATE_NAND:\n" - "> \t\t\tparent =3D nand_name;\n" + "> \t\t\tparent = nand_name;\n" "> \t\t\tbreak;\n" "> +\t\tcase CP110_GATE_MG:\n" "> +\t\tcase CP110_GATE_GOP_DP:\n" "> \t\tcase CP110_GATE_PPV2:\n" - "> \t\t\tparent =3D ppv2_name;\n" + "> \t\t\tparent = ppv2_name;\n" "> \t\t\tbreak;\n" "> \t\tcase CP110_GATE_SDIO:\n" - "> \t\t\tparent =3D sdio_name;\n" + "> \t\t\tparent = sdio_name;\n" "> \t\t\tbreak;\n" "> -\t\tcase CP110_GATE_GOP_DP:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_SDMMC_GOP];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_SDMMC_GOP];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_XOR1:\n" "> -\t\tcase CP110_GATE_XOR0:\n" @@ -239,21 +229,20 @@ "> +\t\tcase CP110_GATE_MAIN:\n" "> +\t\tcase CP110_GATE_PCIE_XOR:\n" "> \t\tcase CP110_GATE_PCIE_X4:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_PCIE_XOR];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_PCIE_XOR];\n" "> -\t\t\tbreak;\n" "> -\t\tcase CP110_GATE_SATA:\n" "> -\t\tcase CP110_GATE_USB3H0:\n" "> -\t\tcase CP110_GATE_USB3H1:\n" "> -\t\tcase CP110_GATE_USB3DEV:\n" - "> -\t\t\tparent =3D gate_name[CP110_GATE_SATA_USB];\n" + "> -\t\t\tparent = gate_name[CP110_GATE_SATA_USB];\n" "> +\t\tcase CP110_GATE_EIP150:\n" "> +\t\tcase CP110_GATE_EIP197:\n" - "> +\t\t\tparent =3D x2core_name;\n" + "> +\t\t\tparent = x2core_name;\n" "> \t\t\tbreak;\n" "> \t\tdefault:\n" - "> \t\t\tparent =3D core_name;\n" - "> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platfor=\n" - "m_device *pdev,\n" + "> \t\t\tparent = core_name;\n" + "> @@ -413,12 +397,12 @@ static int cp110_syscon_common_probe(struct platform_device *pdev,\n" "> fail_nand:\n" "> \tclk_hw_unregister_fixed_factor(cp110_clks[CP110_CORE_CORE]);\n" "> fail_core:\n" @@ -268,14 +257,14 @@ "> +fail_pll0:\n" "> \treturn ret;\n" "> }\n" - ">=20=20\n" - "> --=20\n" + "> \n" + "> -- \n" "> 2.16.1\n" ">\n" "\n" - "--=20\n" + "-- \n" "Gregory Clement, Bootlin (formerly Free Electrons)\n" "Embedded Linux and Kernel engineering\n" http://bootlin.com -b25051e70833c056992fcbbe0323b3dae52f788c5367282317c5a4910f55af08 +b1daea29738b7d59bd5e1fa6c73de689bb129fb3863bbe7013840cb5fd469e73
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.