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


Groups > linux.kernel > #1548780 > unrolled thread

Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock matching

Started byDavid Lechner <david@lechnology.com>
First post2016-12-31 02:00 +0100
Last post2017-01-03 18:10 +0100
Articles 4 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock  matching David Lechner <david@lechnology.com> - 2016-12-31 02:00 +0100
    Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock  matching Sekhar Nori <nsekhar@ti.com> - 2017-01-02 09:10 +0100
      Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock  matching Sekhar Nori <nsekhar@ti.com> - 2017-01-03 10:10 +0100
        Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock  matching David Lechner <david@lechnology.com> - 2017-01-03 18:10 +0100

#1548780 — Re: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock matching

FromDavid Lechner <david@lechnology.com>
Date2016-12-31 02:00 +0100
SubjectRe: [v2, 1/4] ARM: davinci: da8xx-dt: Add ti-aemif lookup for clock matching
Message-ID<sUgbD-47A-5@gated-at.bofh.it>
On 08/10/2016 06:00 AM, Karl Beldan wrote:
> Many davinci boards (da830 and da850 families) don't have their clocks
> in DT yet and won't be successful in getting an unnamed aemif clock
> without explicitly registering them via clk_lookups, failing the
> ti-aemif memory driver probe.
>
> The current aemif lookup entry resolving to the same clock:
>     'CLK(NULL,               "aemif",        &aemif_clk)'
> remains, as it is currently used (davinci_nand is getting a named clock
> "aemif").
>
> This change will allow to switch from the mach-davinci aemif code to
> the ti-aemif memory driver.
>
> Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
> ---

FYI, I can't boot LEGO MINDSTORMS EV3 (AM1908) with a v4.9 mainline 
kernel. I did a git bisect and traced it down to this patch. I'm 
guessing that simply reverting it will break other things.

The problem is that &aemif_clk is a node in a linked list and points to 
itself, which creates an infinite loop when looking up the usb clocks 
that are later in the list.

I thought there was a patch to fix this properly from one of the Bay 
Libre guys to fix this already, but I can't seem to find it at the 
moment. When it is found, it would be good to have it applied to the 4.9 
stable and 4.10 mainline trees.


>  arch/arm/mach-davinci/da850.c    | 1 +
>  arch/arm/mach-davinci/da8xx-dt.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
> index 2398862..3477d30 100644
> --- a/arch/arm/mach-davinci/da850.c
> +++ b/arch/arm/mach-davinci/da850.c
> @@ -485,6 +485,7 @@ static struct clk_lookup da850_clks[] = {
>  	CLK("da8xx_lcdc.0",	"fck",		&lcdc_clk),
>  	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,		"usb11",	&usb11_clk),
>  	CLK(NULL,		"usb20",	&usb20_clk),
> diff --git a/arch/arm/mach-davinci/da8xx-dt.c b/arch/arm/mach-davinci/da8xx-dt.c
> index ca99711..c9f7e92 100644
> --- a/arch/arm/mach-davinci/da8xx-dt.c
> +++ b/arch/arm/mach-davinci/da8xx-dt.c
> @@ -37,6 +37,7 @@ static struct of_dev_auxdata da850_auxdata_lookup[] __initdata = {
>  	OF_DEV_AUXDATA("ti,davinci-dm6467-emac", 0x01e20000, "davinci_emac.1",
>  		       NULL),
>  	OF_DEV_AUXDATA("ti,da830-mcasp-audio", 0x01d00000, "davinci-mcasp.0", NULL),
> +	OF_DEV_AUXDATA("ti,da850-aemif", 0x68000000, "ti-aemif", NULL),
>  	{}
>  };
>
>

[toc] | [next] | [standalone]


#1549013

FromSekhar Nori <nsekhar@ti.com>
Date2017-01-02 09:10 +0100
Message-ID<sV5QR-3Zw-7@gated-at.bofh.it>
In reply to#1548780
On Saturday 31 December 2016 06:22 AM, David Lechner wrote:
> On 08/10/2016 06:00 AM, Karl Beldan wrote:
>> Many davinci boards (da830 and da850 families) don't have their clocks
>> in DT yet and won't be successful in getting an unnamed aemif clock
>> without explicitly registering them via clk_lookups, failing the
>> ti-aemif memory driver probe.
>>
>> The current aemif lookup entry resolving to the same clock:
>>     'CLK(NULL,               "aemif",        &aemif_clk)'
>> remains, as it is currently used (davinci_nand is getting a named clock
>> "aemif").
>>
>> This change will allow to switch from the mach-davinci aemif code to
>> the ti-aemif memory driver.
>>
>> Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
>> ---
> 
> FYI, I can't boot LEGO MINDSTORMS EV3 (AM1908) with a v4.9 mainline
> kernel. I did a git bisect and traced it down to this patch. I'm
> guessing that simply reverting it will break other things.
> 
> The problem is that &aemif_clk is a node in a linked list and points to
> itself, which creates an infinite loop when looking up the usb clocks
> that are later in the list.
> 
> I thought there was a patch to fix this properly from one of the Bay
> Libre guys to fix this already, but I can't seem to find it at the
> moment. When it is found, it would be good to have it applied to the 4.9
> stable and 4.10 mainline trees.

Yes, a patch was submitted. It is pending in my queue since I need to do
a few experiments myself to determine if its the best solution possible.
Thanks for the heads-up on need to mark it for v4.9 stable. Will do.

Thanks,
Sekhar

[toc] | [prev] | [next] | [standalone]


#1549621

FromSekhar Nori <nsekhar@ti.com>
Date2017-01-03 10:10 +0100
Message-ID<sVtgu-40T-17@gated-at.bofh.it>
In reply to#1549013
On Monday 02 January 2017 01:34 PM, Sekhar Nori wrote:
> On Saturday 31 December 2016 06:22 AM, David Lechner wrote:
>> On 08/10/2016 06:00 AM, Karl Beldan wrote:
>>> Many davinci boards (da830 and da850 families) don't have their clocks
>>> in DT yet and won't be successful in getting an unnamed aemif clock
>>> without explicitly registering them via clk_lookups, failing the
>>> ti-aemif memory driver probe.
>>>
>>> The current aemif lookup entry resolving to the same clock:
>>>     'CLK(NULL,               "aemif",        &aemif_clk)'
>>> remains, as it is currently used (davinci_nand is getting a named clock
>>> "aemif").
>>>
>>> This change will allow to switch from the mach-davinci aemif code to
>>> the ti-aemif memory driver.
>>>
>>> Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
>>> ---
>>
>> FYI, I can't boot LEGO MINDSTORMS EV3 (AM1908) with a v4.9 mainline
>> kernel. I did a git bisect and traced it down to this patch. I'm
>> guessing that simply reverting it will break other things.
>>
>> The problem is that &aemif_clk is a node in a linked list and points to
>> itself, which creates an infinite loop when looking up the usb clocks
>> that are later in the list.
>>
>> I thought there was a patch to fix this properly from one of the Bay
>> Libre guys to fix this already, but I can't seem to find it at the
>> moment. When it is found, it would be good to have it applied to the 4.9
>> stable and 4.10 mainline trees.
> 
> Yes, a patch was submitted. It is pending in my queue since I need to do
> a few experiments myself to determine if its the best solution possible.
> Thanks for the heads-up on need to mark it for v4.9 stable. Will do.

The master branch of my tree should have the patch included. If you can
test and confirm it works fine on the lego platform, it will be great.

Thanks,
Sekhar

[toc] | [prev] | [next] | [standalone]


#1549963

FromDavid Lechner <david@lechnology.com>
Date2017-01-03 18:10 +0100
Message-ID<sVAL0-10T-5@gated-at.bofh.it>
In reply to#1549621
On 01/03/2017 02:58 AM, Sekhar Nori wrote:
> On Monday 02 January 2017 01:34 PM, Sekhar Nori wrote:
>> On Saturday 31 December 2016 06:22 AM, David Lechner wrote:
>>> On 08/10/2016 06:00 AM, Karl Beldan wrote:
>>>> Many davinci boards (da830 and da850 families) don't have their clocks
>>>> in DT yet and won't be successful in getting an unnamed aemif clock
>>>> without explicitly registering them via clk_lookups, failing the
>>>> ti-aemif memory driver probe.
>>>>
>>>> The current aemif lookup entry resolving to the same clock:
>>>>     'CLK(NULL,               "aemif",        &aemif_clk)'
>>>> remains, as it is currently used (davinci_nand is getting a named clock
>>>> "aemif").
>>>>
>>>> This change will allow to switch from the mach-davinci aemif code to
>>>> the ti-aemif memory driver.
>>>>
>>>> Signed-off-by: Karl Beldan <kbeldan@baylibre.com>
>>>> ---
>>>
>>> FYI, I can't boot LEGO MINDSTORMS EV3 (AM1908) with a v4.9 mainline
>>> kernel. I did a git bisect and traced it down to this patch. I'm
>>> guessing that simply reverting it will break other things.
>>>
>>> The problem is that &aemif_clk is a node in a linked list and points to
>>> itself, which creates an infinite loop when looking up the usb clocks
>>> that are later in the list.
>>>
>>> I thought there was a patch to fix this properly from one of the Bay
>>> Libre guys to fix this already, but I can't seem to find it at the
>>> moment. When it is found, it would be good to have it applied to the 4.9
>>> stable and 4.10 mainline trees.
>>
>> Yes, a patch was submitted. It is pending in my queue since I need to do
>> a few experiments myself to determine if its the best solution possible.
>> Thanks for the heads-up on need to mark it for v4.9 stable. Will do.
>
> The master branch of my tree should have the patch included. If you can
> test and confirm it works fine on the lego platform, it will be great.
>

Tested "ARM: davinci: da850: fix infinite loop in clk_set_rate()" 
working on LEGO Mindstorms with a 4.9.0 kernel.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web