Patchwork [GIT,PULL] ARM: OMAP: Audio support via omap-twl4030 and pwm support

login
register
mail settings
Submitter Péter Ujfalusi
Date Jan. 22, 2013, 10:07 a.m.
Message ID <50FE64DC.2030808@ti.com>
Download mbox
Permalink /patch/214490/
State New
Headers show

Pull-request

git://gitorious.org/omap-audio/linux-audio.git peter/for-tony

Comments

Péter Ujfalusi - Jan. 22, 2013, 10:07 a.m.
Hi Tony,

The content of this pull:

update for audio support via omap-twl4030 and pwm updates in board level:
http://www.spinics.net/lists/linux-omap/msg85085.html

and zoom-peripherals update to not request the TWL GPIO7:
http://www.spinics.net/lists/linux-omap/msg85187.html

All is on top of mainline v3.8-rc4 tag.

Regards,
Péter

---
The following changes since commit 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619:

  Linux 3.8-rc4 (2013-01-17 19:25:45 -0800)

are available in the git repository at:

  git://gitorious.org/omap-audio/linux-audio.git peter/for-tony

for you to fetch changes up to e4f4e8bfa47431b91fbb21dd9b86d9bc2c15cbd7:

  ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030 (2013-01-22 10:35:16 +0100)

----------------------------------------------------------------
Peter Ujfalusi (9):
      ARM: OMAP: 3430sdp: Enable extmute functionality for audio
      ARM: OMAP: zoom: Zoom2 does not have extmute functionality
      ARM: OMAP2+: twl-common: Add default twl4030 audio configuration
      ARM: OMAP2+: twl-common: Allow boards to customize the twl4030 audio setup
      ARM: OMAP: zoom: Audio support via the common omap-twl4030 machine driver
      ARM: OMAP: sdp3430: Audio support via the common omap-twl4030 machine driver
      ARM: OMAP: board-4430sdp: Proper support for TWL6030 PWM LED/Backlight
      ARM: OMAP: omap3beagle: Use the pwm_leds driver to control the PMU_STAT led
      ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030

 arch/arm/mach-omap2/board-3430sdp.c          | 20 ++++++++++++++++++++
 arch/arm/mach-omap2/board-4430sdp.c          | 30 +++++++++++++++++++++++++++++-
 arch/arm/mach-omap2/board-cm-t35.c           |  2 +-
 arch/arm/mach-omap2/board-devkit8000.c       |  2 +-
 arch/arm/mach-omap2/board-igep0020.c         |  2 +-
 arch/arm/mach-omap2/board-omap3beagle.c      | 41 ++++++++++++++++++++++++++++++++---------
 arch/arm/mach-omap2/board-omap3evm.c         |  2 +-
 arch/arm/mach-omap2/board-overo.c            |  2 +-
 arch/arm/mach-omap2/board-zoom-peripherals.c | 39 +++++++++++++++++++++------------------
 arch/arm/mach-omap2/twl-common.c             | 17 +++++++++++------
 arch/arm/mach-omap2/twl-common.h             |  3 ++-
 11 files changed, 120 insertions(+), 40 deletions(-)
Péter Ujfalusi - Jan. 29, 2013, 8:30 a.m.
Hi Tony,

On 01/22/2013 11:07 AM, Peter Ujfalusi wrote:
> Hi Tony,
> 
> The content of this pull:
> 
> update for audio support via omap-twl4030 and pwm updates in board level:
> http://www.spinics.net/lists/linux-omap/msg85085.html
> 
> and zoom-peripherals update to not request the TWL GPIO7:
> http://www.spinics.net/lists/linux-omap/msg85187.html
> 
> All is on top of mainline v3.8-rc4 tag.

Have you already pulled this one? I can not find the patches in linux-next.

Regards,
Péter

> 
> Regards,
> Péter
> 
> ---
> The following changes since commit 7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619:
> 
>   Linux 3.8-rc4 (2013-01-17 19:25:45 -0800)
> 
> are available in the git repository at:
> 
>   git://gitorious.org/omap-audio/linux-audio.git peter/for-tony
> 
> for you to fetch changes up to e4f4e8bfa47431b91fbb21dd9b86d9bc2c15cbd7:
> 
>   ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030 (2013-01-22 10:35:16 +0100)
> 
> ----------------------------------------------------------------
> Peter Ujfalusi (9):
>       ARM: OMAP: 3430sdp: Enable extmute functionality for audio
>       ARM: OMAP: zoom: Zoom2 does not have extmute functionality
>       ARM: OMAP2+: twl-common: Add default twl4030 audio configuration
>       ARM: OMAP2+: twl-common: Allow boards to customize the twl4030 audio setup
>       ARM: OMAP: zoom: Audio support via the common omap-twl4030 machine driver
>       ARM: OMAP: sdp3430: Audio support via the common omap-twl4030 machine driver
>       ARM: OMAP: board-4430sdp: Proper support for TWL6030 PWM LED/Backlight
>       ARM: OMAP: omap3beagle: Use the pwm_leds driver to control the PMU_STAT led
>       ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030
> 
>  arch/arm/mach-omap2/board-3430sdp.c          | 20 ++++++++++++++++++++
>  arch/arm/mach-omap2/board-4430sdp.c          | 30 +++++++++++++++++++++++++++++-
>  arch/arm/mach-omap2/board-cm-t35.c           |  2 +-
>  arch/arm/mach-omap2/board-devkit8000.c       |  2 +-
>  arch/arm/mach-omap2/board-igep0020.c         |  2 +-
>  arch/arm/mach-omap2/board-omap3beagle.c      | 41 ++++++++++++++++++++++++++++++++---------
>  arch/arm/mach-omap2/board-omap3evm.c         |  2 +-
>  arch/arm/mach-omap2/board-overo.c            |  2 +-
>  arch/arm/mach-omap2/board-zoom-peripherals.c | 39 +++++++++++++++++++++------------------
>  arch/arm/mach-omap2/twl-common.c             | 17 +++++++++++------
>  arch/arm/mach-omap2/twl-common.h             |  3 ++-
>  11 files changed, 120 insertions(+), 40 deletions(-)
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
Tony Lindgren - Jan. 30, 2013, 10:05 p.m.
* Peter Ujfalusi <peter.ujfalusi@ti.com> [130129 00:34]:
> Hi Tony,
> 
> On 01/22/2013 11:07 AM, Peter Ujfalusi wrote:
> > Hi Tony,
> > 
> > The content of this pull:
> > 
> > update for audio support via omap-twl4030 and pwm updates in board level:
> > http://www.spinics.net/lists/linux-omap/msg85085.html
> > 
> > and zoom-peripherals update to not request the TWL GPIO7:
> > http://www.spinics.net/lists/linux-omap/msg85187.html
> > 
> > All is on top of mainline v3.8-rc4 tag.
> 
> Have you already pulled this one? I can not find the patches in linux-next.

Pulled now thanks. Will push out to omap-for-v3.9/twl.

Regards,

Tony
Péter Ujfalusi - Feb. 5, 2013, 9:46 a.m.
Hi Tony,

On 02/04/2013 08:52 PM, Tony Lindgren wrote:
> Looks like this now adds some new section warnings:
> 
> WARNING: vmlinux.o(.text+0x34124): Section mismatch in reference from the function sdp3430_twl_gpio_setup() to the function .init.text:omap_twl4030_audio_init()
> The function sdp3430_twl_gpio_setup() references
> the function __init omap_twl4030_audio_init().
> This is often because sdp3430_twl_gpio_setup lacks a __init 
> annotation or the annotation of omap_twl4030_audio_init is wrong.
> 
> WARNING: vmlinux.o(.text+0x34b8c): Section mismatch in reference from the function zoom_twl_gpio_setup() to the function .init.text:omap_twl4030_audio_init()
> The function zoom_twl_gpio_setup() references
> the function __init omap_twl4030_audio_init().
> This is often because zoom_twl_gpio_setup lacks a __init 
> annotation or the annotation of omap_twl4030_audio_init is wrong.

For some reason the CONFIG_DEBUG_SECTION_MISMATCH got disabled in my rolling
kernel config...


> These can be fixed with the following patch, but I suspect some
> of these cannot be __init/__initdata if the driver reprobes.
> 
> Can you please check this? I'll hold on sendinf off
> this branch until it's been checked and fixed properly.

I think this is not the correct way. the *_twl_gpio_setup() is called from the
gpio-twl4030 driver's platform_driver probe function which if I'm not mistaken
is not __init.

I think we should remove the __init from the omap_twl4030_audio_init() in
twl-common.c
With this change I do not have section mismatch either.
Russell King - ARM Linux - Feb. 5, 2013, 12:30 p.m.
On Mon, Feb 04, 2013 at 11:52:51AM -0800, Tony Lindgren wrote:
> @@ -245,7 +245,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
>  	return 0;
>  }
>  
> -static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
> +static struct twl4030_gpio_platform_data __initdata sdp3430_gpio_data = {
>  	.pulldowns	= BIT(2) | BIT(6) | BIT(8) | BIT(13)
>  				| BIT(16) | BIT(17),
>  	.setup		= sdp3430_twl_gpio_setup,

Seeing platform data marked with __initdata makes me extremely nervous.
Are you _absolutely_ _sure_ that this data either:

(a) gets copied before use, or
(b) is not used after kernel init

?

Normally, platform data is passed via a pointer in struct device to
drivers, and drivers either store a pointer to it, or if the driver is
unbound/rebound, they can access it well after init time.

Certainly marking a function pointed to by platform data as __init looks
very very wrong.
Tony Lindgren - Feb. 5, 2013, 6:44 p.m.
* Russell King - ARM Linux <linux@arm.linux.org.uk> [130205 04:34]:
> On Mon, Feb 04, 2013 at 11:52:51AM -0800, Tony Lindgren wrote:
> > @@ -245,7 +245,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
> >  	return 0;
> >  }
> >  
> > -static struct twl4030_gpio_platform_data sdp3430_gpio_data = {
> > +static struct twl4030_gpio_platform_data __initdata sdp3430_gpio_data = {
> >  	.pulldowns	= BIT(2) | BIT(6) | BIT(8) | BIT(13)
> >  				| BIT(16) | BIT(17),
> >  	.setup		= sdp3430_twl_gpio_setup,
> 
> Seeing platform data marked with __initdata makes me extremely nervous.
> Are you _absolutely_ _sure_ that this data either:
> 
> (a) gets copied before use, or
> (b) is not used after kernel init
> 
> ?

No, and that's why I said "I suspect some of these cannot be
__init/__initdata" and asked Peter to verify it :)
 
> Normally, platform data is passed via a pointer in struct device to
> drivers, and drivers either store a pointer to it, or if the driver is
> unbound/rebound, they can access it well after init time.

Yes it's not worth adding any copying of it in the twl-common.c.

Regards,

Tony
Péter Ujfalusi - Feb. 6, 2013, 7:21 a.m.
On 02/05/2013 07:40 PM, Tony Lindgren wrote:
>> For some reason the CONFIG_DEBUG_SECTION_MISMATCH got disabled in my rolling
>> kernel config...
> 
> At least gcc version 4.3.5 (Debian 4.3.5-4) shows them. What's
> the compiler you have? 

It show for me as well now that I have enabled the
CONFIG_DEBUG_SECTION_MISMATCH in my config.

My GCC is:
armv7a-hardfloat-linux-gnueabi-gcc (Gentoo 4.7.2 p1.3, pie-0.5.5) 4.7.2

> Yes let's do that rather than start copying things around. I'll apply
> the following fix to the omap-for-v3.9/twl branch.

Cool, thanks Tony. I will drop my patch and pick the one from omap-for-v3.9/twl.

Thanks,
Péter
Tony Lindgren - Feb. 6, 2013, 4:56 p.m.
* Peter Ujfalusi <peter.ujfalusi@ti.com> [130205 23:25]:
> On 02/05/2013 07:40 PM, Tony Lindgren wrote:
> >> For some reason the CONFIG_DEBUG_SECTION_MISMATCH got disabled in my rolling
> >> kernel config...
> > 
> > At least gcc version 4.3.5 (Debian 4.3.5-4) shows them. What's
> > the compiler you have? 
> 
> It show for me as well now that I have enabled the
> CONFIG_DEBUG_SECTION_MISMATCH in my config.

Maybe update your build scripts to always just:
$ ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y make ...
 
> My GCC is:
> armv7a-hardfloat-linux-gnueabi-gcc (Gentoo 4.7.2 p1.3, pie-0.5.5) 4.7.2
> 
> > Yes let's do that rather than start copying things around. I'll apply
> > the following fix to the omap-for-v3.9/twl branch.
> 
> Cool, thanks Tony. I will drop my patch and pick the one from omap-for-v3.9/twl.

OK will send that off today then.

Regards,

Tony