All of lore.kernel.org
 help / color / mirror / Atom feed
* Fscking OMAP
@ 2015-04-20 15:49 ` Russell King - ARM Linux
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 15:49 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, Tony Lindgren

Guys,

If you're going to introduce a dependency on some infrastructure which
you absolutely require for booting, then _please_ ensure that the
configuration system is updated such that pre-existing kernel
configurations continue to work.

Don't leave it such that the infrastructure ends up returning -ENOSYS,
which then filters down into your SoC specific code, and aborts the
initialisation of critical infrastructure, leaving you with a totally
silent boot failure.

In this case, it's the addition of syscon to OMAP internals,
specifically in omap_control_init().

This is explicitly targetted at OMAP people, who have wasted much of
my day today investigating why their platforms no longer boot in DT
mode.

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fscking OMAP
@ 2015-04-20 15:49 ` Russell King - ARM Linux
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

Guys,

If you're going to introduce a dependency on some infrastructure which
you absolutely require for booting, then _please_ ensure that the
configuration system is updated such that pre-existing kernel
configurations continue to work.

Don't leave it such that the infrastructure ends up returning -ENOSYS,
which then filters down into your SoC specific code, and aborts the
initialisation of critical infrastructure, leaving you with a totally
silent boot failure.

In this case, it's the addition of syscon to OMAP internals,
specifically in omap_control_init().

This is explicitly targetted at OMAP people, who have wasted much of
my day today investigating why their platforms no longer boot in DT
mode.

Thanks.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fscking OMAP
  2015-04-20 15:49 ` Russell King - ARM Linux
@ 2015-04-20 16:04   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 16:04 UTC (permalink / raw)
  To: linux-arm-kernel, linux-omap, Tony Lindgren

On Mon, Apr 20, 2015 at 04:49:13PM +0100, Russell King - ARM Linux wrote:
> Guys,
> 
> If you're going to introduce a dependency on some infrastructure which
> you absolutely require for booting, then _please_ ensure that the
> configuration system is updated such that pre-existing kernel
> configurations continue to work.
> 
> Don't leave it such that the infrastructure ends up returning -ENOSYS,
> which then filters down into your SoC specific code, and aborts the
> initialisation of critical infrastructure, leaving you with a totally
> silent boot failure.
> 
> In this case, it's the addition of syscon to OMAP internals,
> specifically in omap_control_init().
> 
> This is explicitly targetted at OMAP people, who have wasted much of
> my day today investigating why their platforms no longer boot in DT
> mode.

Let's be clear about how this needs to be fixed:

1. OMAP must select MFD_SYSCON in its Kconfig when DT is enabled, since
   OMAP silently fails to boot when this symbol is not enabled.

2. omap_clk_init() really needs to have some diagnostic printk()s in
   it to indicate when something like omap_control_init() fails.

3. omap_clk_init() probably should _not_ return immediately when one
   of the children (such as omap_control_init) fails to initialise, as
   omitting the clocks pretty much ensures that the kernel will BUG()
   a few moments later in the timer code.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fscking OMAP
@ 2015-04-20 16:04   ` Russell King - ARM Linux
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 16:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 20, 2015 at 04:49:13PM +0100, Russell King - ARM Linux wrote:
> Guys,
> 
> If you're going to introduce a dependency on some infrastructure which
> you absolutely require for booting, then _please_ ensure that the
> configuration system is updated such that pre-existing kernel
> configurations continue to work.
> 
> Don't leave it such that the infrastructure ends up returning -ENOSYS,
> which then filters down into your SoC specific code, and aborts the
> initialisation of critical infrastructure, leaving you with a totally
> silent boot failure.
> 
> In this case, it's the addition of syscon to OMAP internals,
> specifically in omap_control_init().
> 
> This is explicitly targetted at OMAP people, who have wasted much of
> my day today investigating why their platforms no longer boot in DT
> mode.

Let's be clear about how this needs to be fixed:

1. OMAP must select MFD_SYSCON in its Kconfig when DT is enabled, since
   OMAP silently fails to boot when this symbol is not enabled.

2. omap_clk_init() really needs to have some diagnostic printk()s in
   it to indicate when something like omap_control_init() fails.

3. omap_clk_init() probably should _not_ return immediately when one
   of the children (such as omap_control_init) fails to initialise, as
   omitting the clocks pretty much ensures that the kernel will BUG()
   a few moments later in the timer code.

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fscking OMAP
  2015-04-20 15:49 ` Russell King - ARM Linux
@ 2015-04-20 16:25   ` Tony Lindgren
  -1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-04-20 16:25 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap, Tero Kristo

* Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> Guys,
> 
> If you're going to introduce a dependency on some infrastructure which
> you absolutely require for booting, then _please_ ensure that the
> configuration system is updated such that pre-existing kernel
> configurations continue to work.
> 
> Don't leave it such that the infrastructure ends up returning -ENOSYS,
> which then filters down into your SoC specific code, and aborts the
> initialisation of critical infrastructure, leaving you with a totally
> silent boot failure.
> 
> In this case, it's the addition of syscon to OMAP internals,
> specifically in omap_control_init().
> 
> This is explicitly targetted at OMAP people, who have wasted much of
> my day today investigating why their platforms no longer boot in DT
> mode.

Ouch, yeah missing dependencies are a pain to debug.

Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
but that's not always the case like you pointed out.

Does the patch below fix the issue for you?

Regards,

Tony

8< -----------------------
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 20 Apr 2015 09:23:25 -0700
Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON

With the recent changes omaps have developed a dependency to MFD_SYSCON.
This is used for system control module generic register area and some
clocks.

We do have it selected in omap2plus_defconfig, but targeted config
files may not have it selected. Let's make sure it's selected like
few other ARM platforms are already doing.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
 	select GENERIC_IRQ_CHIP
 	select MACH_OMAP_GENERIC
 	select MEMORY
+	select MFD_SYSCON
 	select OMAP_DM_TIMER
 	select OMAP_GPMC
 	select PINCTRL

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fscking OMAP
@ 2015-04-20 16:25   ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-04-20 16:25 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> Guys,
> 
> If you're going to introduce a dependency on some infrastructure which
> you absolutely require for booting, then _please_ ensure that the
> configuration system is updated such that pre-existing kernel
> configurations continue to work.
> 
> Don't leave it such that the infrastructure ends up returning -ENOSYS,
> which then filters down into your SoC specific code, and aborts the
> initialisation of critical infrastructure, leaving you with a totally
> silent boot failure.
> 
> In this case, it's the addition of syscon to OMAP internals,
> specifically in omap_control_init().
> 
> This is explicitly targetted at OMAP people, who have wasted much of
> my day today investigating why their platforms no longer boot in DT
> mode.

Ouch, yeah missing dependencies are a pain to debug.

Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
but that's not always the case like you pointed out.

Does the patch below fix the issue for you?

Regards,

Tony

8< -----------------------
From: Tony Lindgren <tony@atomide.com>
Date: Mon, 20 Apr 2015 09:23:25 -0700
Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON

With the recent changes omaps have developed a dependency to MFD_SYSCON.
This is used for system control module generic register area and some
clocks.

We do have it selected in omap2plus_defconfig, but targeted config
files may not have it selected. Let's make sure it's selected like
few other ARM platforms are already doing.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>

--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
 	select GENERIC_IRQ_CHIP
 	select MACH_OMAP_GENERIC
 	select MEMORY
+	select MFD_SYSCON
 	select OMAP_DM_TIMER
 	select OMAP_GPMC
 	select PINCTRL

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fscking OMAP
  2015-04-20 16:25   ` Tony Lindgren
@ 2015-04-20 17:14     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 17:14 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-arm-kernel, linux-omap, Tero Kristo

On Mon, Apr 20, 2015 at 09:25:16AM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> > Guys,
> > 
> > If you're going to introduce a dependency on some infrastructure which
> > you absolutely require for booting, then _please_ ensure that the
> > configuration system is updated such that pre-existing kernel
> > configurations continue to work.
> > 
> > Don't leave it such that the infrastructure ends up returning -ENOSYS,
> > which then filters down into your SoC specific code, and aborts the
> > initialisation of critical infrastructure, leaving you with a totally
> > silent boot failure.
> > 
> > In this case, it's the addition of syscon to OMAP internals,
> > specifically in omap_control_init().
> > 
> > This is explicitly targetted at OMAP people, who have wasted much of
> > my day today investigating why their platforms no longer boot in DT
> > mode.
> 
> Ouch, yeah missing dependencies are a pain to debug.
> 
> Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
> but that's not always the case like you pointed out.
> 
> Does the patch below fix the issue for you?

Yes, that fixes it, thanks.

> 8< -----------------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Mon, 20 Apr 2015 09:23:25 -0700
> Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON
> 
> With the recent changes omaps have developed a dependency to MFD_SYSCON.
> This is used for system control module generic register area and some
> clocks.
> 
> We do have it selected in omap2plus_defconfig, but targeted config
> files may not have it selected. Let's make sure it's selected like
> few other ARM platforms are already doing.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
>  	select GENERIC_IRQ_CHIP
>  	select MACH_OMAP_GENERIC
>  	select MEMORY
> +	select MFD_SYSCON
>  	select OMAP_DM_TIMER
>  	select OMAP_GPMC
>  	select PINCTRL

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fscking OMAP
@ 2015-04-20 17:14     ` Russell King - ARM Linux
  0 siblings, 0 replies; 10+ messages in thread
From: Russell King - ARM Linux @ 2015-04-20 17:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 20, 2015 at 09:25:16AM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> > Guys,
> > 
> > If you're going to introduce a dependency on some infrastructure which
> > you absolutely require for booting, then _please_ ensure that the
> > configuration system is updated such that pre-existing kernel
> > configurations continue to work.
> > 
> > Don't leave it such that the infrastructure ends up returning -ENOSYS,
> > which then filters down into your SoC specific code, and aborts the
> > initialisation of critical infrastructure, leaving you with a totally
> > silent boot failure.
> > 
> > In this case, it's the addition of syscon to OMAP internals,
> > specifically in omap_control_init().
> > 
> > This is explicitly targetted at OMAP people, who have wasted much of
> > my day today investigating why their platforms no longer boot in DT
> > mode.
> 
> Ouch, yeah missing dependencies are a pain to debug.
> 
> Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
> but that's not always the case like you pointed out.
> 
> Does the patch below fix the issue for you?

Yes, that fixes it, thanks.

> 8< -----------------------
> From: Tony Lindgren <tony@atomide.com>
> Date: Mon, 20 Apr 2015 09:23:25 -0700
> Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON
> 
> With the recent changes omaps have developed a dependency to MFD_SYSCON.
> This is used for system control module generic register area and some
> clocks.
> 
> We do have it selected in omap2plus_defconfig, but targeted config
> files may not have it selected. Let's make sure it's selected like
> few other ARM platforms are already doing.
> 
> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> 
> --- a/arch/arm/mach-omap2/Kconfig
> +++ b/arch/arm/mach-omap2/Kconfig
> @@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
>  	select GENERIC_IRQ_CHIP
>  	select MACH_OMAP_GENERIC
>  	select MEMORY
> +	select MFD_SYSCON
>  	select OMAP_DM_TIMER
>  	select OMAP_GPMC
>  	select PINCTRL

-- 
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Fscking OMAP
  2015-04-20 17:14     ` Russell King - ARM Linux
@ 2015-04-20 17:20       ` Tony Lindgren
  -1 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-04-20 17:20 UTC (permalink / raw)
  To: Russell King - ARM Linux; +Cc: linux-arm-kernel, linux-omap, Tero Kristo

* Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 10:15]:
> On Mon, Apr 20, 2015 at 09:25:16AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> > > Guys,
> > > 
> > > If you're going to introduce a dependency on some infrastructure which
> > > you absolutely require for booting, then _please_ ensure that the
> > > configuration system is updated such that pre-existing kernel
> > > configurations continue to work.
> > > 
> > > Don't leave it such that the infrastructure ends up returning -ENOSYS,
> > > which then filters down into your SoC specific code, and aborts the
> > > initialisation of critical infrastructure, leaving you with a totally
> > > silent boot failure.
> > > 
> > > In this case, it's the addition of syscon to OMAP internals,
> > > specifically in omap_control_init().
> > > 
> > > This is explicitly targetted at OMAP people, who have wasted much of
> > > my day today investigating why their platforms no longer boot in DT
> > > mode.
> > 
> > Ouch, yeah missing dependencies are a pain to debug.
> > 
> > Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
> > but that's not always the case like you pointed out.
> > 
> > Does the patch below fix the issue for you?
> 
> Yes, that fixes it, thanks.

OK let's get this merged immediately and then Tero can add some more
checks to the init code like you suggested with a follow-up patch.

Regards,

Tony
 
> > 8< -----------------------
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Mon, 20 Apr 2015 09:23:25 -0700
> > Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON
> > 
> > With the recent changes omaps have developed a dependency to MFD_SYSCON.
> > This is used for system control module generic register area and some
> > clocks.
> > 
> > We do have it selected in omap2plus_defconfig, but targeted config
> > files may not have it selected. Let's make sure it's selected like
> > few other ARM platforms are already doing.
> > 
> > Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > --- a/arch/arm/mach-omap2/Kconfig
> > +++ b/arch/arm/mach-omap2/Kconfig
> > @@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
> >  	select GENERIC_IRQ_CHIP
> >  	select MACH_OMAP_GENERIC
> >  	select MEMORY
> > +	select MFD_SYSCON
> >  	select OMAP_DM_TIMER
> >  	select OMAP_GPMC
> >  	select PINCTRL
> 
> -- 
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Fscking OMAP
@ 2015-04-20 17:20       ` Tony Lindgren
  0 siblings, 0 replies; 10+ messages in thread
From: Tony Lindgren @ 2015-04-20 17:20 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 10:15]:
> On Mon, Apr 20, 2015 at 09:25:16AM -0700, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [150420 08:50]:
> > > Guys,
> > > 
> > > If you're going to introduce a dependency on some infrastructure which
> > > you absolutely require for booting, then _please_ ensure that the
> > > configuration system is updated such that pre-existing kernel
> > > configurations continue to work.
> > > 
> > > Don't leave it such that the infrastructure ends up returning -ENOSYS,
> > > which then filters down into your SoC specific code, and aborts the
> > > initialisation of critical infrastructure, leaving you with a totally
> > > silent boot failure.
> > > 
> > > In this case, it's the addition of syscon to OMAP internals,
> > > specifically in omap_control_init().
> > > 
> > > This is explicitly targetted at OMAP people, who have wasted much of
> > > my day today investigating why their platforms no longer boot in DT
> > > mode.
> > 
> > Ouch, yeah missing dependencies are a pain to debug.
> > 
> > Looks like we get MFD_SYSCON selected with omap2plus_defconfig,
> > but that's not always the case like you pointed out.
> > 
> > Does the patch below fix the issue for you?
> 
> Yes, that fixes it, thanks.

OK let's get this merged immediately and then Tero can add some more
checks to the init code like you suggested with a follow-up patch.

Regards,

Tony
 
> > 8< -----------------------
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Mon, 20 Apr 2015 09:23:25 -0700
> > Subject: [PATCH] ARM: OMAP2+: Fix booting with configs that don't have MFD_SYSCON
> > 
> > With the recent changes omaps have developed a dependency to MFD_SYSCON.
> > This is used for system control module generic register area and some
> > clocks.
> > 
> > We do have it selected in omap2plus_defconfig, but targeted config
> > files may not have it selected. Let's make sure it's selected like
> > few other ARM platforms are already doing.
> > 
> > Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > 
> > --- a/arch/arm/mach-omap2/Kconfig
> > +++ b/arch/arm/mach-omap2/Kconfig
> > @@ -81,6 +81,7 @@ config ARCH_OMAP2PLUS
> >  	select GENERIC_IRQ_CHIP
> >  	select MACH_OMAP_GENERIC
> >  	select MEMORY
> > +	select MFD_SYSCON
> >  	select OMAP_DM_TIMER
> >  	select OMAP_GPMC
> >  	select PINCTRL
> 
> -- 
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-04-20 17:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-20 15:49 Fscking OMAP Russell King - ARM Linux
2015-04-20 15:49 ` Russell King - ARM Linux
2015-04-20 16:04 ` Russell King - ARM Linux
2015-04-20 16:04   ` Russell King - ARM Linux
2015-04-20 16:25 ` Tony Lindgren
2015-04-20 16:25   ` Tony Lindgren
2015-04-20 17:14   ` Russell King - ARM Linux
2015-04-20 17:14     ` Russell King - ARM Linux
2015-04-20 17:20     ` Tony Lindgren
2015-04-20 17:20       ` Tony Lindgren

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.