diff mbox

linux-next: build failure after merge of the final tree (arm-soc tree related)

Message ID 20120917212615.91bc134d237dcd5968f9f549@canb.auug.org.au (mailing list archive)
State New, archived
Headers show

Commit Message

Stephen Rothwell Sept. 17, 2012, 11:26 a.m. UTC
Hi all,

After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/mfd/twl-core.c:49:22: fatal error: plat/cpu.h: No such file or directory

Caused by commit 7d7e1eba7e92 ("ARM: OMAP2+: Prepare for irqs.h removal").

I have added the following patch to restrict this driver to ARM until it
is fixed:

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 17 Sep 2012 21:18:21 +1000
Subject: [PATCH] ARM: retrict TWL4030_CORE to ARM while it is broken

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/mfd/Kconfig |    1 +
 1 file changed, 1 insertion(+)

Comments

Arnd Bergmann Sept. 17, 2012, 2:29 p.m. UTC | #1
On Monday 17 September 2012, Stephen Rothwell wrote:
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> drivers/mfd/twl-core.c:49:22: fatal error: plat/cpu.h: No such file or directory
> 
> Caused by commit 7d7e1eba7e92 ("ARM: OMAP2+: Prepare for irqs.h removal").
> 
> I have added the following patch to restrict this driver to ARM until it
> is fixed:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 17 Sep 2012 21:18:21 +1000
> Subject: [PATCH] ARM: retrict TWL4030_CORE to ARM while it is broken
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks!

If it requires plat/cpu.h, it should actually be limited to CONFIG_ARCH_OMAP,
otherwise we will get the same problem on non-OMAP ARM builds. From what
I can tell, the problem is the clocks_init function, which is the only
part that is not completely generic.

The trivial workaround would be to enclose the "#include <plat/cpu.h>"
statement in #ifdef CONFIG_ARCH_OMAP, but with the common clock code
in place, we should probably be able to come up with a better solution
that works independent of the omap platform.

	Arnd
Tony Lindgren Sept. 17, 2012, 5:22 p.m. UTC | #2
* Arnd Bergmann <arnd@arndb.de> [120917 07:30]:
> On Monday 17 September 2012, Stephen Rothwell wrote:
> > After merging the final tree, today's linux-next build (powerpc
> > allyesconfig) failed like this:
> > 
> > drivers/mfd/twl-core.c:49:22: fatal error: plat/cpu.h: No such file or directory
> > 
> > Caused by commit 7d7e1eba7e92 ("ARM: OMAP2+: Prepare for irqs.h removal").

Oops, sorry I screwed up there. That used to get included indirectly
earlier if SPARSE_IRQ was not set.
 
> > I have added the following patch to restrict this driver to ARM until it
> > is fixed:
> > 
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Mon, 17 Sep 2012 21:18:21 +1000
> > Subject: [PATCH] ARM: retrict TWL4030_CORE to ARM while it is broken
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Thanks!
> 
> If it requires plat/cpu.h, it should actually be limited to CONFIG_ARCH_OMAP,
> otherwise we will get the same problem on non-OMAP ARM builds. From what
> I can tell, the problem is the clocks_init function, which is the only
> part that is not completely generic.
> 
> The trivial workaround would be to enclose the "#include <plat/cpu.h>"
> statement in #ifdef CONFIG_ARCH_OMAP, but with the common clock code
> in place, we should probably be able to come up with a better solution
> that works independent of the omap platform.

There are patches coming to remove cpu_is_omap usage from drivers,
and until then we should just ifdef the plat/cpu.h include.

It is possible to use these kind of external PM chips with other
SoCs, they're just not omap related and that's why there drivers
have not had the Kconfig dependency. I'll post a patch for that.

Regards,

Tony
Tony Lindgren Sept. 17, 2012, 8:32 p.m. UTC | #3
* Tony Lindgren <tony@atomide.com> [120917 10:25]:
> * Arnd Bergmann <arnd@arndb.de> [120917 07:30]:
> > 
> > If it requires plat/cpu.h, it should actually be limited to CONFIG_ARCH_OMAP,
> > otherwise we will get the same problem on non-OMAP ARM builds. From what
> > I can tell, the problem is the clocks_init function, which is the only
> > part that is not completely generic.
> > 
> > The trivial workaround would be to enclose the "#include <plat/cpu.h>"
> > statement in #ifdef CONFIG_ARCH_OMAP, but with the common clock code
> > in place, we should probably be able to come up with a better solution
> > that works independent of the omap platform.
> 
> There are patches coming to remove cpu_is_omap usage from drivers,
> and until then we should just ifdef the plat/cpu.h include.
> 
> It is possible to use these kind of external PM chips with other
> SoCs, they're just not omap related and that's why there drivers
> have not had the Kconfig dependency. I'll post a patch for that.

Looks like we can just remove the cpu_is_omap code with clock
aliases, patch posted with Subject:

[PATCH] mfd: Fix compile for twl-core.c by removing cpu_is_omap usage

Regards,

Tony
diff mbox

Patch

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index df850c4..af5e5b7 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -257,6 +257,7 @@  config MENELAUS
 config TWL4030_CORE
 	bool "Texas Instruments TWL4030/TWL5030/TWL6030/TPS659x0 Support"
 	depends on I2C=y && GENERIC_HARDIRQS
+	depends on ARM
 	select IRQ_DOMAIN
 	help
 	  Say yes here if you have TWL4030 / TWL6030 family chip on your board.