public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: nm@ti•com (Nishanth Menon)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH V3] ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
Date: Tue, 8 Oct 2013 12:59:27 -0500	[thread overview]
Message-ID: <525447FF.3050106@ti.com> (raw)
In-Reply-To: <20131008175818.GC8313@atomide.com>

On 10/08/2013 12:58 PM, Tony Lindgren wrote:
> * Nishanth Menon <nm@ti•com> [131008 05:08]:
>> On 10/07/2013 07:05 PM, Sebastian Reichel wrote:
>>> On Mon, Oct 07, 2013 at 03:43:49PM -0500, Nishanth Menon wrote:
>>>> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
>>>> index 39c7838..4fe5b9c 100644
>>>> --- a/arch/arm/mach-omap2/board-generic.c
>>>> +++ b/arch/arm/mach-omap2/board-generic.c
>>>> @@ -113,6 +113,7 @@ MACHINE_END
>>>>  #ifdef CONFIG_ARCH_OMAP3
>>>>  static const char *omap3_boards_compat[] __initdata = {
>>>>  	"ti,omap3",
>>>> +	"ti,omap343x",
>>>             ^^^^
>>> You used omap36xx everywhere, so I guess this should be
>>> "ti,omap34xx"?
>>
>> 3630 has at least two variants:
>> http://www.ti.com/product/omap3621
>> http://www.ti.com/product/omap3630
>>
>> It got further spun off in 37xx family:
>> http://www.ti.com/product/dm3730 (DM3730 and DM3725)
>>
>> 3430 is no longer in production - but just had a single version (at
>> least what I can remember).
>>
>> 3530 variant of 3430 on the other hand has a few:
>> http://processors.wiki.ti.com/index.php/OMAP3_Overview
>>
>>
>> I am ok to change to ti,omap34xx if folks think that is the right
>> thing to do. Personally, I might prefer to handle 35xx family slightly
>> differently considering deltas.
> 
> I've dropped that part as that's not needed for the fix AFAIK.
> Here's what I've applied and pushed out to omap-for-v3.12/fixes.
> 
> Regards,
> 
> Tony
> 
> From: Nishanth Menon <nm@ti•com>
> Date: Mon, 7 Oct 2013 15:43:49 -0500
> Subject: [PATCH] ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
> 
> SoC family definitions at the moment are reactive to board needs
> as a result, beagle-xm would matchup with ti,omap3 which invokes
> omap3430_init_early instead of omap3630_init_early. Obviously, this is
> the wrong behavior.
> 
> With clock node dts conversion, we get the following warnings before
> system hangs as a result and 3630 based platforms fails to boot
> (uart4 clocks are only present in OMAP3630 and not present in
> OMAP3430):
> 
> ...
> omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
> omap_hwmod: uart4: cannot _init_clocks
> 
> WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2434
> _init+0x6c/0x80()
> omap_hwmod: uart4: couldn't init clocks
> ...
> 
> WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2126
> _enable+0x254/0x280()
> omap_hwmod: timer12: enabled state can only be entered from
> initialized, idle, or disabled state
> ...
> 
> WARNING: CPU: 0 PID: 46 at arch/arm/mach-omap2/omap_hwmod.c:2224
> _idle+0xd4/0xf8()
> omap_hwmod: timer12: idle state can only be entered from enabled state
> 
> WARNING: CPU: 0 PID: 1 at arch/arm/mach-omap2/omap_hwmod.c:2126
> _enable+0x254/0x280()
> omap_hwmod: uart4: enabled state can only be entered from
> initialized, idle, or disabled state
> 
> So, add specific compatiblity for 3630 to allow match for Beagle-XM
> platform.
> 
> Signed-off-by: Nishanth Menon <nm@ti•com>
> [tony at atomide.com: left out ti,omap343x, updated comments]
> Signed-off-by: Tony Lindgren <tony@atomide•com>
> 
> diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
> index 0c514dc..2816bf6 100644
> --- a/arch/arm/boot/dts/omap3-beagle-xm.dts
> +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
> @@ -11,7 +11,7 @@
>  
>  / {
>  	model = "TI OMAP3 BeagleBoard xM";
> -	compatible = "ti,omap3-beagle-xm", "ti,omap3-beagle", "ti,omap3";
> +	compatible = "ti,omap3-beagle-xm", "ti,omap36xx", "ti,omap3";
>  
>  	cpus {
>  		cpu at 0 {
> diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
> index 39c7838..87162e1 100644
> --- a/arch/arm/mach-omap2/board-generic.c
> +++ b/arch/arm/mach-omap2/board-generic.c
> @@ -129,6 +129,24 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
>  	.restart	= omap3xxx_restart,
>  MACHINE_END
>  
> +static const char *omap36xx_boards_compat[] __initdata = {
> +	"ti,omap36xx",
> +	NULL,
> +};
> +
> +DT_MACHINE_START(OMAP36XX_DT, "Generic OMAP36xx (Flattened Device Tree)")
> +	.reserve	= omap_reserve,
> +	.map_io		= omap3_map_io,
> +	.init_early	= omap3630_init_early,
> +	.init_irq	= omap_intc_of_init,
> +	.handle_irq	= omap3_intc_handle_irq,
> +	.init_machine	= omap_generic_init,
> +	.init_late	= omap3_init_late,
> +	.init_time	= omap3_sync32k_timer_init,
> +	.dt_compat	= omap36xx_boards_compat,
> +	.restart	= omap3xxx_restart,
> +MACHINE_END
> +
>  static const char *omap3_gp_boards_compat[] __initdata = {
>  	"ti,omap3-beagle",
>  	"timll,omap3-devkit8000",
> 

LGTM. Thanks for doing it.

-- 
Regards,
Nishanth Menon

  reply	other threads:[~2013-10-08 17:59 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-20 16:08 [RFC PATCH] ARM: OMAP3630: Add generic machine descriptor Nishanth Menon
2013-09-20 16:19 ` Olof Johansson
2013-09-20 16:23   ` Felipe Balbi
2013-09-20 17:16     ` Olof Johansson
2013-09-20 17:42       ` Felipe Balbi
2013-09-20 19:10         ` Nishanth Menon
2013-10-07 16:49           ` [PATCH 0/2] ARM: dts: OMAP: standardize SoC specific bindings Nishanth Menon
2013-10-07 16:49             ` [PATCH 1/2] Documentation: dt: OMAP: standardize SoC naming definition Nishanth Menon
2013-10-07 19:17               ` Tony Lindgren
2013-10-07 16:49             ` [PATCH 2/2] ARM: dts: omap3-beagle: use 3630 definitions Nishanth Menon
2013-10-07 19:20               ` Tony Lindgren
2013-10-07 20:30                 ` [PATCH V2] ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree Nishanth Menon
2013-10-07 20:32                   ` Nishanth Menon
2013-10-07 20:43                 ` [PATCH V3] " Nishanth Menon
2013-10-08  0:05                   ` Sebastian Reichel
2013-10-08 12:00                     ` Nishanth Menon
2013-10-08 17:58                       ` Tony Lindgren
2013-10-08 17:59                         ` Nishanth Menon [this message]
2013-10-08 17:47                 ` [PATCH 2/2] ARM: dts: omap3-beagle: use 3630 definitions Felipe Balbi
2013-10-08 18:01                   ` Nishanth Menon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=525447FF.3050106@ti.com \
    --to=nm@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox