Skip to contentSkip to conversation

pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'

PATCH New Mike Rapoport 3 participants 4 messages Dec 15, 2009 – Dec 16, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'

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

---
 arch/arm/mach-pxa/Kconfig |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-pxa/Kconfig +2 -0
index e6d8e10..4668d4b 100644
@@ -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"
Signature · 6 lines
1.6.0.6


-- 
Sincerely yours,
Mike.
#1 lore raw

PATCH 1/1 pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'

Quoted 7 lines · Mike Rapoport

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.

#2 lore raw

PATCH 1/1 pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'

Quoted 9 lines · Russell King - ARM Linux
Quoted 7 lines · Mike Rapoport

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.

Quoted 3 lines

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?

Quoted 11 lines

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

Signature · 2 lines
Sincerely yours,
Mike.
#3 lore raw

PATCH 1/1 pxa/cm-x300: fix build breakage caused by missing 'select CPU_PXA310'

In reply to Russell King - ARM Linux
Quoted 20 lines · Russell King - ARM Linux
Quoted 7 lines · Mike Rapoport

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.

Quoted 4 lines

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.