linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'
@ 2009-12-15 16:28 Mike Rapoport
  2009-12-15 17:23 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2009-12-15 16:28 UTC (permalink / raw)
  To: linux-arm-kernel

Eric,
Apparently Igor's patches for CM-X300 were not applied properly. Somehow
commit db205463fd24c0972ad2c4e4fafb1c76e51b4380
([ARM] pxa/cm-x300: add PWM backlight support) introduced 'select HAVE_PWM'
to MACH_COLIBRY300 rather than CM-X300. I suspect that the same happened with
the patch that added 'select CPU_PXA310' to MACH_CM_X300. I'm not certain about
removing PWM support in Colibri, but MACH_CM_X300 need to get fixed.

---
Build of cm_x300_defconfig produces a bunch of errors:
  CC      arch/arm/mach-pxa/cm-x300.o
arch/arm/mach-pxa/cm-x300.c:186: error: 'ULPI_STP' undeclared here (not in a function)
arch/arm/mach-pxa/cm-x300.c:187: error: 'ULPI_NXT' undeclared here (not in a function)
arch/arm/mach-pxa/cm-x300.c:188: error: 'ULPI_DIR' undeclared here (not in a function)
arch/arm/mach-pxa/cm-x300.c:196: error: 'GPIO37_ULPI_DATA_OUT_7' undeclared here (not in a function)
arch/arm/mach-pxa/cm-x300.c:197: error: 'GPIO38_ULPI_CLK' undeclared here (not in a function)
make[1]: *** [arch/arm/mach-pxa/cm-x300.o] Error 1
make: *** [arch/arm/mach-pxa] Error 2
The missing defines are available when CONFIG_CPU_PXA310=y. Adding
'select CPU_PXA310' fixes the build

Signed-off-by: Mike Rapoport <mike@compulab.co.il>
---
 arch/arm/mach-pxa/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index e6d8e10..4668d4b 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -110,6 +110,8 @@ config MACH_CM_X300
 	bool "CompuLab CM-X300 modules"
 	select PXA3xx
 	select CPU_PXA300
+	select CPU_PXA310
+	select HAVE_PWM

 config ARCH_GUMSTIX
 	bool "Gumstix XScale 255 boards"
-- 
1.6.0.6


-- 
Sincerely yours,
Mike.

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

* [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'
  2009-12-15 16:28 [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310' Mike Rapoport
@ 2009-12-15 17:23 ` Russell King - ARM Linux
  2009-12-16 13:24   ` Mike Rapoport
  2009-12-16 13:25   ` Eric Miao
  0 siblings, 2 replies; 4+ messages in thread
From: Russell King - ARM Linux @ 2009-12-15 17:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Dec 15, 2009 at 06:28:27PM +0200, Mike Rapoport wrote:
> Eric,
> Apparently Igor's patches for CM-X300 were not applied properly. Somehow
> commit db205463fd24c0972ad2c4e4fafb1c76e51b4380
> ([ARM] pxa/cm-x300: add PWM backlight support) introduced 'select HAVE_PWM'
> to MACH_COLIBRY300 rather than CM-X300. I suspect that the same happened with
> the patch that added 'select CPU_PXA310' to MACH_CM_X300. I'm not certain about
> removing PWM support in Colibri, but MACH_CM_X300 need to get fixed.

You need to look at the original commit you mention above, and check
whether it has been applied correctly.  If not, it needs to be reverted
and the correct change applied.

This is one of the problems of patching Kconfig files that grow over
time - diff only gives at most six lines of context (three lines either
side), and it is possible to have those same six lines of context
repeated several times in Kconfig files.  Now add an additional set of
lines towards the start of the Kconfig file, and such a diff will get
incorrectly applied.

Unfortunately, this is one of the down sides to using git apply over
GNU patch - GNU patch will tell you if it applied a patch with an offset.
git tools won't, so it's not obvious if a patch has been mis-applied.

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

* [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'
  2009-12-15 17:23 ` Russell King - ARM Linux
@ 2009-12-16 13:24   ` Mike Rapoport
  2009-12-16 13:25   ` Eric Miao
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2009-12-16 13:24 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> On Tue, Dec 15, 2009 at 06:28:27PM +0200, Mike Rapoport wrote:
>> Eric,
>> Apparently Igor's patches for CM-X300 were not applied properly. Somehow
>> commit db205463fd24c0972ad2c4e4fafb1c76e51b4380
>> ([ARM] pxa/cm-x300: add PWM backlight support) introduced 'select HAVE_PWM'
>> to MACH_COLIBRY300 rather than CM-X300. I suspect that the same happened with
>> the patch that added 'select CPU_PXA310' to MACH_CM_X300. I'm not certain about
>> removing PWM support in Colibri, but MACH_CM_X300 need to get fixed.
> 
> You need to look at the original commit you mention above, and check
> whether it has been applied correctly.  If not, it needs to be reverted
> and the correct change applied.

I've checked the commit and the original patch, and it seems we've screwed it up
from the beginning while cherry-picking commits between branches...
However, the patch that adds 'select CPU_PXA310' ([1]) is correct and apparently
was not applied properly (commit def8252ddb9bc52434b2ac1d560a609c61849638,
[ARM] pxa/cm-x300: add support for PXA310 cpu).

How shall we continue? Eric, will you revert commit db205463f and I will resend
corrected PWM patch?

> This is one of the problems of patching Kconfig files that grow over
> time - diff only gives at most six lines of context (three lines either
> side), and it is possible to have those same six lines of context
> repeated several times in Kconfig files.  Now add an additional set of
> lines towards the start of the Kconfig file, and such a diff will get
> incorrectly applied.
> 
> Unfortunately, this is one of the down sides to using git apply over
> GNU patch - GNU patch will tell you if it applied a patch with an offset.
> git tools won't, so it's not obvious if a patch has been mis-applied.
> 

[1] http://article.gmane.org/gmane.linux.ports.arm.kernel/67022/match=igor+grinberg

-- 
Sincerely yours,
Mike.

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

* [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'
  2009-12-15 17:23 ` Russell King - ARM Linux
  2009-12-16 13:24   ` Mike Rapoport
@ 2009-12-16 13:25   ` Eric Miao
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Miao @ 2009-12-16 13:25 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Dec 16, 2009 at 1:23 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Tue, Dec 15, 2009 at 06:28:27PM +0200, Mike Rapoport wrote:
>> Eric,
>> Apparently Igor's patches for CM-X300 were not applied properly. Somehow
>> commit db205463fd24c0972ad2c4e4fafb1c76e51b4380
>> ([ARM] pxa/cm-x300: add PWM backlight support) introduced 'select HAVE_PWM'
>> to MACH_COLIBRY300 rather than CM-X300. I suspect that the same happened with
>> the patch that added 'select CPU_PXA310' to MACH_CM_X300. I'm not certain about
>> removing PWM support in Colibri, but MACH_CM_X300 need to get fixed.
>
> You need to look at the original commit you mention above, and check
> whether it has been applied correctly. ?If not, it needs to be reverted
> and the correct change applied.
>
> This is one of the problems of patching Kconfig files that grow over
> time - diff only gives at most six lines of context (three lines either
> side), and it is possible to have those same six lines of context
> repeated several times in Kconfig files. ?Now add an additional set of
> lines towards the start of the Kconfig file, and such a diff will get
> incorrectly applied.
>
> Unfortunately, this is one of the down sides to using git apply over
> GNU patch - GNU patch will tell you if it applied a patch with an offset.
> git tools won't, so it's not obvious if a patch has been mis-applied.
>

It looks like Igor's original version is already wrong - must be due to
rebasing against my branch, esp. the commit of re-ordering Kconfig
and Makefile. But nothing to worry - I've reverted that commit and
made another commit including this change. Will push out later soon.

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

end of thread, other threads:[~2009-12-16 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-15 16:28 [PATCH] [ARM] pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310' Mike Rapoport
2009-12-15 17:23 ` Russell King - ARM Linux
2009-12-16 13:24   ` Mike Rapoport
2009-12-16 13:25   ` Eric Miao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).