arm: fix build breakage in omap2plus_defconfig (linux-next)
Subsystems (4)
cover arm: fix build breakage in omap2plus_defconfig (linux-next)
I decided to look at why this thing was dying in linux-next for over two weeks now:
http://kisskb.ellerman.id.au/kisskb/target/5581/
The git bisect led me to sfr's merge (661a40a5c8 in March5th tree) of 'arm-soc/for-next' but there was nothing suspicious there, and the fix (commit #1) was reasonably obvious, so I didn't investigate the root cause further. But that wasn't where the breakage ended...
Commit #2, and especially commit #3 need to be looked at by those who know the platform. It looks like some sort of conversion to better share code was done, but the omap4panda part didn't get the full attention it needed. I did what I think looks right, based on what was done for the other board, but I've no knowledge of the platform whatsoever, and hence no confidence it would work as desired. I've hopefully put the right people on the CC list for those.
Paul.
---
Paul Gortmaker (3):
arm: anticipate build breakages due in pending merge
arm: fix compile error in mach-omap2/board-omap4panda.c
arm: more fallout from i2c conversions in board-omap4panda.c
arch/arm/mach-omap2/board-omap4panda.c | 7 +++---- arch/arm/mach-omap2/cm2xxx_3xxx.c | 2 ++ arch/arm/mach-omap2/common.c | 1 + arch/arm/mach-omap2/control.c | 1 + arch/arm/mach-omap2/sdrc2xxx.c | 1 + 5 files changed, 8 insertions(+), 4 deletions(-)
Signature · 1 line
1.7.9.1
PATCH 1/3 arm: anticipate build breakages due in pending merge
Testing in linux-next has revealed that the omap2plus_defconfig will fail upon the merge of "arm-soc/for-next" as follows:
arch/arm/mach-omap2/control.c:238: error: 'OMAP343X_CTRL_BASE' undeclared (first use in this function) arch/arm/mach-omap2/common.c:48: error: 'OMAP2420_SDRC_BASE' undeclared here (not in a function) arch/arm/mach-omap2/common.c:49: error: 'OMAP2420_SMS_BASE' undeclared here (not in a function) arch/arm/mach-omap2/common.c:50: error: 'OMAP242X_CTRL_BASE' undeclared here (not in a function)
[...]arch/arm/mach-omap2/common.c:167: error: 'OMAP4430_CM2_BASE' undeclared here (not in a function) arch/arm/mach-omap2/sdrc2xxx.c:108: error: 'OMAP2420_PRM_BASE' undeclared (first use in this function) arch/arm/mach-omap2/cm2xxx_3xxx.c:310: error: 'OMAP3430_CM_BASE' undeclared (first use in this function)
It appears that a once implicit path to <plat/hardware.h> has gone away once two of the arm streams come together.
--- arch/arm/mach-omap2/cm2xxx_3xxx.c | 2 ++ arch/arm/mach-omap2/common.c | 1 + arch/arm/mach-omap2/control.c | 1 + arch/arm/mach-omap2/sdrc2xxx.c | 1 + 4 files changed, 5 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/cm2xxx_3xxx.c +2 -0
@@ -18,6 +18,8 @@#include <linux/err.h> #include <linux/io.h> +#include <plat/hardware.h> +#include "iomap.h" #include "common.h" #include "cm.h"
arch/arm/mach-omap2/common.c +1 -0
@@ -20,6 +20,7 @@#include <plat/board.h> #include <plat/mux.h> #include <plat/clock.h> +#include <plat/hardware.h> #include "iomap.h" #include "common.h"
arch/arm/mach-omap2/control.c +1 -0
@@ -16,6 +16,7 @@#include <linux/io.h> #include <plat/sdrc.h> +#include <plat/hardware.h> #include "iomap.h" #include "common.h"
arch/arm/mach-omap2/sdrc2xxx.c +1 -0
@@ -27,6 +27,7 @@#include <plat/clock.h> #include <plat/sram.h> #include <plat/sdrc.h> +#include <plat/hardware.h> #include "iomap.h" #include "common.h"
Signature · 1 line
1.7.9.1
Tony Lindgren
maintainerPATCH 1/3 arm: anticipate build breakages due in pending merge
Quoted 12 lines · Paul Gortmaker
Testing in linux-next has revealed that the
omap2plus_defconfigwill fail upon the merge of "arm-soc/for-next" as follows:
arch/arm/mach-omap2/control.c:238: error: 'OMAP343X_CTRL_BASE' undeclared (first use in this function)arch/arm/mach-omap2/common.c:48: error: 'OMAP2420_SDRC_BASE' undeclared here (not in a function)arch/arm/mach-omap2/common.c:49: error: 'OMAP2420_SMS_BASE' undeclared here (not in a function)arch/arm/mach-omap2/common.c:50: error: 'OMAP242X_CTRL_BASE' undeclared here (not in a function)
[...]arch/arm/mach-omap2/common.c:167: error: 'OMAP4430_CM2_BASE' undeclared here (not in a function)arch/arm/mach-omap2/sdrc2xxx.c:108: error: 'OMAP2420_PRM_BASE' undeclared (first use in this function)arch/arm/mach-omap2/cm2xxx_3xxx.c:310: error: 'OMAP3430_CM_BASE' undeclared (first use in this function)
Quoted 2 lines
It appears that a once implicit path to <
plat/hardware.h> has gone away once two of the arm streams come together.
Thanks this one is already waiting to be applied to arm-soc tree.
Regards,
Tony
PATCH 2/3 arm: fix compile error in mach-omap2/board-omap4panda.c
In reply to Paul GortmakerThe commit 3c90c98a1ebbb08d95700ce8a3b7bce6286607bd (linux-next)
"OMAP4: omap4panda: Enable audio support"
introduced population of a new struct, but chose the wrong (but similarly named) struct that has none of the named fields.
Change it to the struct with those fields, to fix:
arch/arm/mach-omap2/board-omap4panda.c:284: error: unknown field 'hs_left_step' specified in initializer arch/arm/mach-omap2/board-omap4panda.c:285: error: unknown field 'hs_right_step' specified in initializer arch/arm/mach-omap2/board-omap4panda.c:286: error: unknown field 'hf_left_step' specified in initializer arch/arm/mach-omap2/board-omap4panda.c:287: error: unknown field 'hf_right_step' specified in initializer arch/arm/mach-omap2/board-omap4panda.c:287: warning: large integer implicitly truncated to unsigned type
--- arch/arm/mach-omap2/board-omap4panda.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +1 -1
@@ -279,7 +279,7 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)return 0 ; } -static struct twl4030_codec_data twl6040_codec = { +static struct twl6040_codec_data twl6040_codec = {/* single-step ramp for headset and handsfree */ .hs_left_step =0x0f , .hs_right_step =0x0f ,
Signature · 1 line
1.7.9.1
Tony Lindgren
maintainerPATCH 2/3 arm: fix compile error in mach-omap2/board-omap4panda.c
Quoted 7 lines · Paul Gortmaker
The commit
3c90c98a1ebbb08d95700ce8a3b7bce6286607bd(linux-next)"OMAP4: omap4panda: Enable audio support"
introduced population of a new struct, but chose the wrong (but similarly named) struct that has none of the named fields.
Quoted 7 lines
Change it to the struct with those fields, to fix:
arch/arm/mach-omap2/board-omap4panda.c:284: error: unknown field 'hs_left_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:285: error: unknown field 'hs_right_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:286: error: unknown field 'hf_left_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:287: error: unknown field 'hf_right_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:287: warning: large integer implicitly truncated to unsigned type
Thanks, this mis-merge is something Peter should take a look at as it seems there's few other parts that got left out.
Regards,
Tony
Quoted 24 lines
Signed-off-by Paul Gortmaker <[email protected]>CC Peter Ujfalusi <[email protected]>CC Santosh Shilimkar <[email protected]>CC Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +1
-1@@ -279,7 +279,7 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)return 0 ; } -static struct twl4030_codec_data twl6040_codec = { +static struct twl6040_codec_data twl6040_codec = {/* single-step ramp for headset and handsfree */ .hs_left_step =0x0f , .hs_right_step =0x0f ,Signature · 1 line
1.7.9.1
PATCH 2/3 arm: fix compile error in mach-omap2/board-omap4panda.c
In reply to Paul GortmakerHi,
Quoted 7 lines · Paul Gortmaker
The commit
3c90c98a1ebbb08d95700ce8a3b7bce6286607bd(linux-next)"OMAP4: omap4panda: Enable audio support"
introduced population of a new struct, but chose the wrong (but similarly named) struct that has none of the named fields.
Quoted 7 lines
Change it to the struct with those fields, to fix:
arch/arm/mach-omap2/board-omap4panda.c:284: error: unknown field 'hs_left_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:285: error: unknown field 'hs_right_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:286: error: unknown field 'hf_left_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:287: error: unknown field 'hf_right_step' specified in initializerarch/arm/mach-omap2/board-omap4panda.c:287: warning: large integer implicitly truncated to unsigned type
Yes, I have also noticed it.
This is because part of the twl6040 i2c conversion series has been taken by Samuel.
He will stop carrying it further (I hope), and we are going to have a bit different series going via audio.
Samuel did not took the panda part of the patches since it had some other dependencies coming via audio tree.
The thing is that the panda audio support is coming via ASoC to linux-next, so Samuel could not take the patch addressing this breakage (mfd tree does not have the needed patches).
I'm not sure where we could apply this patch in the first place since mfd does not have the panda audio support patches, and currently the ASoC does not have the twl6040 i2c conversion patches either...
Quoted 21 lines
Signed-off-by Paul Gortmaker <[email protected]>CC Peter Ujfalusi <[email protected]>CC Santosh Shilimkar <[email protected]>CC Tony Lindgren <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +1
-1@@ -279,7 +279,7 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)return 0 ; } -static struct twl4030_codec_data twl6040_codec = { +static struct twl6040_codec_data twl6040_codec = {/* single-step ramp for headset and handsfree */ .hs_left_step =0x0f , .hs_right_step =0x0f ,
Signature · 1 line
P?ter
PATCH 3/3 arm: more fallout from i2c conversions in board-omap4panda.c
In reply to Paul GortmakerCommit ded0df8510778a03a2f182a0cbfe3c25788e8852 (linux-next)
"mfd: Convert twl6040 to an i2c driver, and separate it from twl core"
appears to have done an incomplete conversion on the board-omap4panda.c file, leaving it with more build failures. Comparing the changes that were done for board-4430sdp.c it is possible for me to whack it with a stick until it stops twitching, but someone who really understands this code needs to take a look at the conversion, and check it is done completely and in a way that will actually work on hardware.
--- arch/arm/mach-omap2/board-omap4panda.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/board-omap4panda.c +2 -3
@@ -287,16 +287,15 @@ static struct twl6040_codec_data twl6040_codec = { .hf_right_step = 0x1d, }; -static struct twl4030_audio_data twl6040_audio = { +static struct twl6040_platform_data twl6040_data = { .codec = &twl6040_codec, .audpwron_gpio =127 , - .naudint_irq =OMAP44XX_IRQ_SYS_2N , .irq_base =TWL6040_CODEC_IRQ_BASE , };/* Panda board uses the common PMIC configuration */ static struct twl4030_platform_data omap4_panda_twldata = { - .audio = &twl6040_audio, +/* .audio = &twl6040_audio, */ };/*
Signature · 1 line
1.7.9.1
PATCH 3/3 arm: more fallout from i2c conversions in board-omap4panda.c
Hi,
Quoted 10 lines · Paul Gortmaker
Commit
ded0df8510778a03a2f182a0cbfe3c25788e8852(linux-next)"mfd: Convert twl6040 to an i2c driver, and separate it from twl core"
appears to have done an incomplete conversion on the
board-omap4panda.cfile, leaving it with more build failures. Comparing the changes that were done forboard-4430sdp.cit is possible for me to whack it with a stick until it stops twitching, but someone who really understands this code needs to take a look at the conversion, and check it is done completely and in a way that will actually work on hardware.
This is true.
I'm sending a revert series for the twl6040 patches causing this breakage for Samuel.
The same feature will go via audio tree because the dependencies are queued in that feature tree.
Signature · 4 lines
P?ter PS: this might fix the compile breakage with omap2_defconfig, but the audio will not work if you enable the support for it on OMAP4.
Quoted 32 lines
Signed-off-by Paul Gortmaker <[email protected]>CC Peter Ujfalusi <[email protected]>CC Mark Brown <[email protected]>CC Samuel Ortiz <[email protected]>--- arch/arm/mach-omap2/board-omap4panda.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)arch/arm/mach-omap2/board-omap4panda.c +2
-3@@ -287,16 +287,15 @@ static struct twl6040_codec_data twl6040_codec = { .hf_right_step = 0x1d, }; -static struct twl4030_audio_data twl6040_audio = { +static struct twl6040_platform_data twl6040_data = { .codec = &twl6040_codec, .audpwron_gpio =127 , - .naudint_irq =OMAP44XX_IRQ_SYS_2N , .irq_base =TWL6040_CODEC_IRQ_BASE , };/* Panda board uses the common PMIC configuration */ static struct twl4030_platform_data omap4_panda_twldata = { - .audio = &twl6040_audio, +/* .audio = &twl6040_audio, */ };/*