Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1537416

Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate()

From David Lechner <david@lechnology.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate()
Date 2016-12-07 03:00 +0100
Message-ID <sLzGy-1ry-13@gated-at.bofh.it> (permalink)
References <sKYnF-3bM-63@gated-at.bofh.it> <sKYxj-3gw-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 12/05/2016 04:09 AM, Bartosz Golaszewski wrote:
> The aemif clock is added twice to the lookup table in da850.c. This
> breaks the children list of pll0_sysclk3 as we're using the same list
> links in struct clk. When calling clk_set_rate(), we get stuck in
> propagate_rate().

&emac_clk is used twice in this list as well. Shouldn't we fix it too? I 
would expect that it causes the same problem.

>
> Create a separate clock for nand, inheriting the rate of the aemif
> clock and retrieve it in the davinci_nand module.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  arch/arm/mach-davinci/da850.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
> index e770c97..c008e5e 100644
> --- a/arch/arm/mach-davinci/da850.c
> +++ b/arch/arm/mach-davinci/da850.c
> @@ -367,6 +367,11 @@ static struct clk aemif_clk = {
>  	.flags		= ALWAYS_ENABLED,
>  };
>
> +static struct clk aemif_nand_clk = {
> +	.name		= "nand",
> +	.parent		= &aemif_clk,
> +};
> +
>  static struct clk usb11_clk = {
>  	.name		= "usb11",
>  	.parent		= &pll0_sysclk4,
> @@ -537,7 +542,7 @@ static struct clk_lookup da850_clks[] = {
>  	CLK("da830-mmc.0",	NULL,		&mmcsd0_clk),
>  	CLK("da830-mmc.1",	NULL,		&mmcsd1_clk),
>  	CLK("ti-aemif",		NULL,		&aemif_clk),
> -	CLK(NULL,		"aemif",	&aemif_clk),
> +	CLK(NULL,		"aemif",	&aemif_nand_clk),
>  	CLK("ohci-da8xx",	"usb11",	&usb11_clk),
>  	CLK("musb-da8xx",	"usb20",	&usb20_clk),
>  	CLK("spi_davinci.0",	NULL,		&spi0_clk),
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 0/3] ARM: da850: fix pll0 rate setting Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-05 11:10 +0100
  [PATCH v3 3/3] ARM: da850: fix da850_set_pll0rate() Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-05 11:10 +0100
    Re: [PATCH v3 3/3] ARM: da850: fix da850_set_pll0rate() Sekhar Nori <nsekhar@ti.com> - 2016-12-05 11:50 +0100
    Re: [PATCH v3 3/3] ARM: da850: fix da850_set_pll0rate() David Lechner <david@lechnology.com> - 2016-12-07 03:10 +0100
  Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Sekhar Nori <nsekhar@ti.com> - 2016-12-05 11:20 +0100
    Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-05 11:40 +0100
      Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Sekhar Nori <nsekhar@ti.com> - 2016-12-05 11:50 +0100
    Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-06 13:00 +0100
      Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Sekhar Nori <nsekhar@ti.com> - 2016-12-06 13:30 +0100
  [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-05 11:20 +0100
    Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() David Lechner <david@lechnology.com> - 2016-12-07 03:00 +0100
      Re: [PATCH v3 1/3] ARM: da850: fix infinite loop in clk_set_rate() Sekhar Nori <nsekhar@ti.com> - 2016-12-07 07:40 +0100
  [PATCH v3 2/3] ARM: da850: coding style fix Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-12-05 11:20 +0100

csiph-web