ARM: OMAP: Audio support via omap-twl4030 and pwm support
Subsystems (3)
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(-)
Hi Tony,
Quoted 11 lines · Peter Ujfalusi
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.htmland zoom-peripherals update to not request the TWL GPIO7:
http://www.spinics.net/lists/linux-omap/msg85187.htmlAll 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
Quoted 47 lines
Regards,
P?ter---
The following changes since commit7d1f9aeff1ee4a20b1aeb377dd0f579fe9647619: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.gitpeter/for-tonyfor 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 thepwm_ledsdriver to control thePMU_STATled
ARM: board-zoom: Do not request LCD panel enable GPIO from twl4030arch/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 at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Tony Lindgren
maintainerQuoted 10 lines · Peter Ujfalusi
Hi Tony,
Quoted 7 lines · Peter Ujfalusi
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
Quoted 6 lines
Quoted 4 lines
and zoom-peripherals update to not request the TWL GPIO7:
http://www.spinics.net/lists/linux-omap/msg85187.htmlAll 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
Tony Lindgren
maintainerQuoted 11 lines · Tony Lindgren
Quoted 10 lines · Peter Ujfalusi
Hi Tony,
Quoted 7 lines · Peter Ujfalusi
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
Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
and zoom-peripherals update to not request the TWL GPIO7:
http://www.spinics.net/lists/linux-omap/msg85187.htmlAll 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.
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.
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.
Regards,
Tony
arch/arm/mach-omap2/board-3430sdp.c +3 -3
@@ -223,7 +223,7 @@ static struct omap_tw4030_pdata omap_twl4030_audio_data = { .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, }; -static int sdp3430_twl_gpio_setup (struct device *dev, +static int __init sdp3430_twl_gpio_setup (struct device *dev,unsigned gpio,unsigned ngpio) {/* gpio + 0 is "mmc0_cd" (input/IRQ),
@@ -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,
@@ -374,7 +374,7 @@ static struct regulator_init_data sdp3430_vsim = { .consumer_supplies = sdp3430_vsim_supplies, }; -static struct twl4030_platform_data sdp3430_twldata = { +static struct twl4030_platform_data __initdata sdp3430_twldata = {/* platform_data for children goes here */ .gpio = &sdp3430_gpio_data, .keypad = &sdp3430_kp_data,
arch/arm/mach-omap2/board-zoom-peripherals.c +3 -3
@@ -238,7 +238,7 @@ static struct omap_tw4030_pdata omap_twl4030_audio_data = { .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, }; -static int zoom_twl_gpio_setup (struct device *dev, +static int __init zoom_twl_gpio_setup (struct device *dev,unsigned gpio,unsigned ngpio) {/* gpio + 0 is "mmc0_cd" (input/IRQ) */
@@ -252,11 +252,11 @@ static int zoom_twl_gpio_setup(struct device *dev,return 0 ; } -static struct twl4030_gpio_platform_data zoom_gpio_data = { +static struct twl4030_gpio_platform_data __initdata zoom_gpio_data = { .setup = zoom_twl_gpio_setup, }; -static struct twl4030_platform_data zoom_twldata = { +static struct twl4030_platform_data __initdata zoom_twldata = {/* platform_data for children goes here */ .gpio = &zoom_gpio_data, .keypad = &zoom_kp_twl4030_data,
Hi Tony,
Quoted 8 lines · Tony Lindgren
Looks like this now adds some new section warnings:
WARNING:
vmlinux.o(.text+0x34124): Section mismatch in reference from the functionsdp3430_twl_gpio_setup()to the function .init.text:omap_twl4030_audio_init() The functionsdp3430_twl_gpio_setup()references
the function__initomap_twl4030_audio_init().
This is often becausesdp3430_twl_gpio_setuplacks a__init
annotation or the annotation ofomap_twl4030_audio_initis wrong.
Quoted 5 lines
WARNING:
vmlinux.o(.text+0x34b8c): Section mismatch in reference from the functionzoom_twl_gpio_setup()to the function .init.text:omap_twl4030_audio_init() The functionzoom_twl_gpio_setup()references
the function__initomap_twl4030_audio_init().
This is often becausezoom_twl_gpio_setuplacks a__init
annotation or the annotation ofomap_twl4030_audio_initis wrong.
For some reason the CONFIG_DEBUG_SECTION_MISMATCH got disabled in my rolling kernel config...
Quoted 5 lines
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.
Signature · 1 line
P?ter
Quoted 61 lines
Regards,
Tony
arch/arm/mach-omap2/board-3430sdp.c +3
-3@@ -223,7 +223,7 @@ static struct omap_tw4030_pdata omap_twl4030_audio_data = { .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, }; -static int sdp3430_twl_gpio_setup (struct device *dev, +static int __init sdp3430_twl_gpio_setup (struct device *dev,unsigned gpio,unsigned ngpio) {/* gpio + 0 is "mmc0_cd" (input/IRQ), @@ -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,@@ -374,7 +374,7 @@ static struct regulator_init_data sdp3430_vsim = { .consumer_supplies = sdp3430_vsim_supplies, }; -static struct twl4030_platform_data sdp3430_twldata = { +static struct twl4030_platform_data __initdata sdp3430_twldata = {/* platform_data for children goes here */ .gpio = &sdp3430_gpio_data, .keypad = &sdp3430_kp_data,arch/arm/mach-omap2/board-zoom-peripherals.c +3
-3@@ -238,7 +238,7 @@ static struct omap_tw4030_pdata omap_twl4030_audio_data = { .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, }; -static int zoom_twl_gpio_setup (struct device *dev, +static int __init zoom_twl_gpio_setup (struct device *dev,unsigned gpio,unsigned ngpio) {/* gpio + 0 is "mmc0_cd" (input/IRQ) */ @@ -252,11 +252,11 @@ static int zoom_twl_gpio_setup(struct device *dev,return 0 ; } -static struct twl4030_gpio_platform_data zoom_gpio_data = { +static struct twl4030_gpio_platform_data __initdata zoom_gpio_data = { .setup = zoom_twl_gpio_setup, }; -static struct twl4030_platform_data zoom_twldata = { +static struct twl4030_platform_data __initdata zoom_twldata = {/* platform_data for children goes here */ .gpio = &zoom_gpio_data, .keypad = &zoom_kp_twl4030_data,
Tony Lindgren
maintainerQuoted 11 lines · Peter Ujfalusi
Hi Tony,
Quoted 8 lines · Tony Lindgren
Looks like this now adds some new section warnings:
WARNING:
vmlinux.o(.text+0x34124): Section mismatch in reference from the functionsdp3430_twl_gpio_setup()to the function .init.text:omap_twl4030_audio_init() The functionsdp3430_twl_gpio_setup()references
the function__initomap_twl4030_audio_init().
This is often becausesdp3430_twl_gpio_setuplacks a__init
annotation or the annotation ofomap_twl4030_audio_initis wrong.
Quoted 8 lines
Quoted 5 lines
WARNING:
vmlinux.o(.text+0x34b8c): Section mismatch in reference from the functionzoom_twl_gpio_setup()to the function .init.text:omap_twl4030_audio_init() The functionzoom_twl_gpio_setup()references
the function__initomap_twl4030_audio_init().
This is often becausezoom_twl_gpio_setuplacks a__init
annotation or the annotation ofomap_twl4030_audio_initis wrong.For some reason the
CONFIG_DEBUG_SECTION_MISMATCHgot 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?
Quoted 6 lines
Quoted 5 lines
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.
Quoted 7 lines
I think this is not the correct way. the
*_twl_gpio_setup()is called from the gpio-twl4030 driver'splatform_driverprobe function which if I'm not mistaken is not__init.I think we should remove the
__initfrom theomap_twl4030_audio_init()intwl-common.c
With this change I do not have section mismatch either.
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.
Regards,
Tony
From: Tony Lindgren <[email protected]>
Date: Tue, 5 Feb 2013 10:36:21 -0800
Subject: [PATCH] ARM: OMAP2+: Fix twl section warnings related to omap_twl4030_audio_init
With the recent twl related changes we can now get:
WARNING: arch/arm/mach-omap2/built-in.o(.text+0x15f88): 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: arch/arm/mach-omap2/built-in.o(.text+0x16968): 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.
Fix this by removing __init from omap_twl4030_audio_init() as suggested by Peter Ujfalusi <[email protected]>.
arch/arm/mach-omap2/twl-common.c +2 -2
@@ -536,7 +536,7 @@ static struct platform_device audio_device = { .id = -1, }; -void __init omap_twl4030_audio_init (char *card_name, +void omap_twl4030_audio_init (char *card_name,struct omap_tw4030_pdata *pdata) {if (!pdata)
@@ -549,7 +549,7 @@ void __init omap_twl4030_audio_init(char *card_name, }#else /* SOC_OMAP_TWL4030 */ -void __init omap_twl4030_audio_init (char *card_name, +void omap_twl4030_audio_init (char *card_name,struct omap_tw4030_pdata *pdata) {return ;
Quoted 5 lines · Tony Lindgren
Quoted 2 lines
For some reason the
CONFIG_DEBUG_SECTION_MISMATCHgot 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
Quoted 2 lines
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
maintainerQuoted 9 lines · Peter Ujfalusi
Quoted 5 lines · Tony Lindgren
Quoted 2 lines
For some reason the
CONFIG_DEBUG_SECTION_MISMATCHgot 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_MISMATCHin my config.
Maybe update your build scripts to always just:
$ ARCH=arm CONFIG_DEBUG_SECTION_MISMATCH=y make ...
Quoted 7 lines
My GCC is:
armv7a-hardfloat-linux-gnueabi-gcc (Gentoo 4.7.2 p1.3, pie-0.5.5) 4.7.2Quoted 2 lines
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
arch/arm/mach-omap2/board-3430sdp.c static int sdp3430_twl_gpio_setup(struct device *dev, · line 251
Quoted 9 lines · Tony Lindgren
arch/arm/mach-omap2/board-3430sdp.c +1
-1@@ -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
maintainerQuoted 14 lines · Russell King - ARM Linux
arch/arm/mach-omap2/board-3430sdp.c static int sdp3430_twl_gpio_setup(struct device *dev, · line 251
Quoted 9 lines · Tony Lindgren
arch/arm/mach-omap2/board-3430sdp.c +1
-1@@ -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
__initdatamakes me extremely nervous. Are you _absolutely_ _sure_ that this data either:
Quoted 4 lines
(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 :)
Quoted 3 lines
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