* Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
@ 2012-10-12 15:54 Russell King - ARM Linux
2012-10-12 16:24 ` Tony Lindgren
2012-10-23 10:10 ` Russell King - ARM Linux
0 siblings, 2 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2012-10-12 15:54 UTC (permalink / raw)
To: linux-omap; +Cc: Santosh Shilimkar, Tony Lindgren
For those who don't bother looking at my kautobuild boot tests on the OMAP
boards I have, here's the errors which get spat out at boot time. Note
that some of these I've reported in the past, and one of them is missing
a newline character at the end of its string.
twd: can't register interrupt 45 (-22)
twd_local_timer_register failed -22
omap_hwmod: mcpdm: cannot be enabled for reset (3)
omap-gpmc omap-gpmc: error: clk_get
omap-gpmc: probe of omap-gpmc failed with error -2
Error setting wl12xx data: -38
omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
mmc1: host does not support reading read-only switch. assuming write-enable.
As of today, I've rebased my serial changes as far forward as I dare at
the moment (to the commit before removal of DMA), and then merged it
into the latest trees from armsoc and myself, fixing up all the horrid
conflicts. I've finally got it to a stage where at least it compiles,
but unfortunately something has broken serial output from userspace
quite badly to the point that it doesn't work.
I know that my serial changes were fine before I tried rebasing them (the
set I posted to the mailing list certainly did work) so I suspect that
it's down to incompatibilities between the fixes done by others (who didn't
really understand all issues involved) and those done by myself.
Unfortunately, the series of patches to fix the register writes and bits
to enable hardware assisted software flow control which have gone into
mainline have actually made the situation much worse - now the hardware
can end up with IXANY stuck on, and no way to turn off hardware assisted
software flow control - which is bad news for binary serial protocols.
It would have been far better to leave the driver as-is - at least the
software flow control would have been dealt correctly by the generic tty
layer. Instead, we have a worse situation today...
While I may be the ex-maintainer of serial-core, given that I had already
investigated the issues there and had an understanding of the problems,
-and that was known-, copying me with the patches before they went into
mainline would've been the decent thing to have done, so that someone
with the knowledge of the breakage could have said "yes lets take those
patches" and "no, those shouldn't go in because it'll cause breakage"
such as I describe above.
I know how this situation arose; TI are desperate to get rid of the legacy
OMAP DMA API, and wanted me to look at the crypto drivers for DMA engine
support. In the mean time, they silently took the serial issues away from
me and gave them other people to look at. Reality is, I could have sorted
out the serial issues while I wait for responses from Dan Williams on the
async tx API issues.
Eventually, I got bored of waiting for Dan's responses, that I looked at
the serial issues anyway, and produced _my_ patch set which fixes the
issues _properly_, so at least I can say that I had done something producive.
The sad thing is, most of that is now having to be reworked to sort out an
entirely new set of problems caused by TI's attitude towards this stuff,
and this rework is consuming a lot more time than it needed to.
As for Dan, an update for the situation from Monday's call. I have a reply
to my email I sent during that call, and Dan is looking at getting back up
to speed with DMA engine stuff - but he no longer has the hardware. He
seems to want to keep hold of the responsibility for that, so I think we're
rather stuck at the moment over anything OMAP which uses the crypto stuff.
That's fine for the time being; the schedule for the removal of the legacy
OMAP DMA stuff that I put into feature-removal.txt says "2013" and I _never_
intended that to mean the start of 2013.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 15:54 Errors at boot time from OMAP4430SDP (and a whinge about serial stuff) Russell King - ARM Linux
@ 2012-10-12 16:24 ` Tony Lindgren
2012-10-12 16:31 ` Russell King - ARM Linux
` (5 more replies)
2012-10-23 10:10 ` Russell King - ARM Linux
1 sibling, 6 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-12 16:24 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: linux-omap, Santosh Shilimkar, Cousson, Benoit, Paul Walmsley,
Kevin Hilman, Ohad Ben-Cohen, Afzal Mohammed, Péter Ujfalusi
* Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
> For those who don't bother looking at my kautobuild boot tests on the OMAP
> boards I have, here's the errors which get spat out at boot time. Note
> that some of these I've reported in the past, and one of them is missing
> a newline character at the end of its string.
Thanks, let's get those fixed ASAP.
> twd: can't register interrupt 45 (-22)
> twd_local_timer_register failed -22
Hmm I think this regression was caused by my sparse IRQ changes,
looks like I have a typo using OMAP_INTC_START in stead of the
GIC base. Will do a patch for this.
> omap_hwmod: mcpdm: cannot be enabled for reset (3)
Paul, Benoit, care to take a look at this?
> omap-gpmc omap-gpmc: error: clk_get
> omap-gpmc: probe of omap-gpmc failed with error -2
I think Afzal posted something about this already? Looks
like this too could be sparse IRQ related regression..
> Error setting wl12xx data: -38
Hmm I wonder if wl12xx_set_platform_data() is really
supposed to return -EBUSY if platform_data exists?
Ohad, can you please take a look?
> omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
These should be optional AFAIK, so no warning should be
printed.
> twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
Peter, can you take a look please?
> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
Kevin?
> mmc1: host does not support reading read-only switch. assuming write-enable.
This too should be optional.
> As of today, I've rebased my serial changes as far forward as I dare at
> the moment (to the commit before removal of DMA), and then merged it
> into the latest trees from armsoc and myself, fixing up all the horrid
> conflicts. I've finally got it to a stage where at least it compiles,
> but unfortunately something has broken serial output from userspace
> quite badly to the point that it doesn't work.
>
> I know that my serial changes were fine before I tried rebasing them (the
> set I posted to the mailing list certainly did work) so I suspect that
> it's down to incompatibilities between the fixes done by others (who didn't
> really understand all issues involved) and those done by myself.
Have you been able to locate the breaking patches, maybe those could
be reverted?
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
@ 2012-10-12 16:31 ` Russell King - ARM Linux
2012-10-12 16:34 ` Benoit Cousson
` (4 subsequent siblings)
5 siblings, 0 replies; 31+ messages in thread
From: Russell King - ARM Linux @ 2012-10-12 16:31 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, Santosh Shilimkar, Cousson, Benoit, Paul Walmsley,
Kevin Hilman, Ohad Ben-Cohen, Afzal Mohammed, Péter Ujfalusi
On Fri, Oct 12, 2012 at 09:24:52AM -0700, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
> > As of today, I've rebased my serial changes as far forward as I dare at
> > the moment (to the commit before removal of DMA), and then merged it
> > into the latest trees from armsoc and myself, fixing up all the horrid
> > conflicts. I've finally got it to a stage where at least it compiles,
> > but unfortunately something has broken serial output from userspace
> > quite badly to the point that it doesn't work.
> >
> > I know that my serial changes were fine before I tried rebasing them (the
> > set I posted to the mailing list certainly did work) so I suspect that
> > it's down to incompatibilities between the fixes done by others (who didn't
> > really understand all issues involved) and those done by myself.
>
> Have you been able to locate the breaking patches, maybe those could
> be reverted?
Not yet; I'll look into it this weekend. I've only recently got stuff
back into a state where the kautobuild kernels don't error out during
the build for the OMAP and SA11x0 stuff. OMAP ended up in that
situation because of the duplicated serial efforts causing rather
disgusting and horrid conflicts.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
2012-10-12 16:31 ` Russell King - ARM Linux
@ 2012-10-12 16:34 ` Benoit Cousson
2012-10-12 16:56 ` Tony Lindgren
2012-10-12 18:47 ` Kevin Hilman
` (3 subsequent siblings)
5 siblings, 1 reply; 31+ messages in thread
From: Benoit Cousson @ 2012-10-12 16:34 UTC (permalink / raw)
To: Tony Lindgren
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Paul Walmsley, Kevin Hilman, Ohad Ben-Cohen, Afzal Mohammed,
Péter Ujfalusi
Hi Tony,
On 10/12/2012 06:24 PM, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
>> For those who don't bother looking at my kautobuild boot tests on the OMAP
>> boards I have, here's the errors which get spat out at boot time. Note
>> that some of these I've reported in the past, and one of them is missing
>> a newline character at the end of its string.
>
> Thanks, let's get those fixed ASAP.
>
>> twd: can't register interrupt 45 (-22)
>> twd_local_timer_register failed -22
>
> Hmm I think this regression was caused by my sparse IRQ changes,
> looks like I have a typo using OMAP_INTC_START in stead of the
> GIC base. Will do a patch for this.
>
>> omap_hwmod: mcpdm: cannot be enabled for reset (3)
>
> Paul, Benoit, care to take a look at this?
Yeah, that one is a warning. The mcpdm is not accessible at boot time if
the external clock (from twl6040) is not enabled.
Paul introduced a HWMOD_EXT_OPT_MAIN_CLK flag to avoid the warning [1],
but it looks like that code is not merged.
I'll check where that patch is stuck.
Regards,
Benoit
[1]
http://lists.infradead.org/pipermail/linux-arm-kernel/2012-June/103019.html
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:34 ` Benoit Cousson
@ 2012-10-12 16:56 ` Tony Lindgren
0 siblings, 0 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-12 16:56 UTC (permalink / raw)
To: Benoit Cousson
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Paul Walmsley, Kevin Hilman, Ohad Ben-Cohen, Afzal Mohammed,
Péter Ujfalusi
* Benoit Cousson <b-cousson@ti.com> [121012 09:36]:
> Hi Tony,
>
> On 10/12/2012 06:24 PM, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
> >> For those who don't bother looking at my kautobuild boot tests on the OMAP
> >> boards I have, here's the errors which get spat out at boot time. Note
> >> that some of these I've reported in the past, and one of them is missing
> >> a newline character at the end of its string.
> >
> > Thanks, let's get those fixed ASAP.
> >
> >> twd: can't register interrupt 45 (-22)
> >> twd_local_timer_register failed -22
Posted a fix for this as "ARM: OMAP4: Fix twd_local_timer_register
regression".
> > Hmm I think this regression was caused by my sparse IRQ changes,
> > looks like I have a typo using OMAP_INTC_START in stead of the
> > GIC base. Will do a patch for this.
> >
> >> omap_hwmod: mcpdm: cannot be enabled for reset (3)
> >
> > Paul, Benoit, care to take a look at this?
>
> Yeah, that one is a warning. The mcpdm is not accessible at boot time if
> the external clock (from twl6040) is not enabled.
>
> Paul introduced a HWMOD_EXT_OPT_MAIN_CLK flag to avoid the warning [1],
> but it looks like that code is not merged.
> I'll check where that patch is stuck.
Thanks, seems like that would be OK to do during the early -rc
cycle to fix the warning.
Regards,
Tony
> [1]
> http://lists.infradead.org/pipermail/linux-arm-kernel/2012-June/103019.html
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
2012-10-12 16:31 ` Russell King - ARM Linux
2012-10-12 16:34 ` Benoit Cousson
@ 2012-10-12 18:47 ` Kevin Hilman
2012-10-14 18:30 ` Ohad Ben-Cohen
` (2 subsequent siblings)
5 siblings, 0 replies; 31+ messages in thread
From: Kevin Hilman @ 2012-10-12 18:47 UTC (permalink / raw)
To: Tony Lindgren
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Ohad Ben-Cohen, Afzal Mohammed,
Péter Ujfalusi
Tony Lindgren <tony@atomide.com> writes:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
>> For those who don't bother looking at my kautobuild boot tests on the OMAP
>> boards I have, here's the errors which get spat out at boot time. Note
>> that some of these I've reported in the past, and one of them is missing
>> a newline character at the end of its string.
[...]
>
>> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
>> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
>
> Kevin?
Have had a fix for this for awhile, but it's currently part of a broader
VC/VP feature set. I thought about breaking it out as its own fix, but
since voltage scaling is currently not supported/working on OMAP4
anyways, I decided it was not urgent.
Kevin
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
` (2 preceding siblings ...)
2012-10-12 18:47 ` Kevin Hilman
@ 2012-10-14 18:30 ` Ohad Ben-Cohen
2012-10-16 18:10 ` Tony Lindgren
2012-10-15 5:54 ` Mohammed, Afzal
2012-10-15 7:37 ` Péter Ujfalusi
5 siblings, 1 reply; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-14 18:30 UTC (permalink / raw)
To: Tony Lindgren
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Kevin Hilman, Afzal Mohammed,
Péter Ujfalusi
[-- Attachment #1: Type: text/plain, Size: 7155 bytes --]
On Fri, Oct 12, 2012 at 6:24 PM, Tony Lindgren <tony@atomide.com> wrote:
>> Error setting wl12xx data: -38
..
> Ohad, can you please take a look?
Sure, -38 is -ENOSYS which is returned when the wl12xx driver isn't configured.
This isn't an error (it's a user decision, and it shouldn't elicit any
error) and the patch below (also attached) should make it go away on:
>From 374f145568585c8d6a8d5e4b8b5d3e6baedd2f39 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 7 ++++++-
arch/arm/mach-omap2/board-4430sdp.c | 13 ++++++++++--
arch/arm/mach-omap2/board-omap3evm.c | 11 +++++++++-
arch/arm/mach-omap2/board-omap3pandora.c | 9 ++++++++-
arch/arm/mach-omap2/board-omap4panda.c | 30 ++++++++++++++++++++++------
arch/arm/mach-omap2/board-zoom-peripherals.c | 20 ++++++++++++++++---
6 files changed, 76 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c
b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..1b19415 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1404,8 +1404,13 @@ static __init int da850_wl12xx_init(void)
da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ goto free_wlan_irq;
+
+ /* bail out verbosely on any other error */
if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ pr_err("error setting wl12xx data: %d\n", ret);
goto free_wlan_irq;
}
diff --git a/arch/arm/mach-omap2/board-4430sdp.c
b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..d1dd81a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -826,9 +826,18 @@ static void __init omap4_sdp4430_wifi_init(void)
omap4_sdp4430_wifi_mux_init();
omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
+
ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
- if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c
b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..7f72e44 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -637,9 +637,18 @@ static void __init omap3_evm_wl12xx_init(void)
/* WL12xx WLAN Init */
omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
+
ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
- if (ret)
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bbc4001 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -549,8 +549,15 @@ static void __init pandora_wl1251_init(void)
pandora_wl1251_pdata.use_eeprom = true;
ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ goto fail_irq;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
goto fail_irq;
+ }
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c
b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..cc5cdd6 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,42 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
+
+ ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
+
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..3506ed2 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,33 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
+
ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
- if (ret)
+ /* bail out verbosely on any other error */
+ if (ret) {
pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.10.rc3.1067.gb129051
[-- Attachment #2: 0001-ARM-OMAP-don-t-print-any-error-when-wl12xx-isn-t-con.patch --]
[-- Type: application/octet-stream, Size: 6800 bytes --]
From 374f145568585c8d6a8d5e4b8b5d3e6baedd2f39 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 7 ++++++-
arch/arm/mach-omap2/board-4430sdp.c | 13 ++++++++++--
arch/arm/mach-omap2/board-omap3evm.c | 11 +++++++++-
arch/arm/mach-omap2/board-omap3pandora.c | 9 ++++++++-
arch/arm/mach-omap2/board-omap4panda.c | 30 ++++++++++++++++++++++------
arch/arm/mach-omap2/board-zoom-peripherals.c | 20 ++++++++++++++++---
6 files changed, 76 insertions(+), 14 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..1b19415 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1404,8 +1404,13 @@ static __init int da850_wl12xx_init(void)
da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ goto free_wlan_irq;
+
+ /* bail out verbosely on any other error */
if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ pr_err("error setting wl12xx data: %d\n", ret);
goto free_wlan_irq;
}
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..d1dd81a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -826,9 +826,18 @@ static void __init omap4_sdp4430_wifi_init(void)
omap4_sdp4430_wifi_mux_init();
omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
+
ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
- if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..7f72e44 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -637,9 +637,18 @@ static void __init omap3_evm_wl12xx_init(void)
/* WL12xx WLAN Init */
omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
+
ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
- if (ret)
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bbc4001 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -549,8 +549,15 @@ static void __init pandora_wl1251_init(void)
pandora_wl1251_pdata.use_eeprom = true;
ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ goto fail_irq;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
goto fail_irq;
+ }
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..cc5cdd6 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,42 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
+
+ ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
+
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..3506ed2 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,33 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
+
ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return;
- if (ret)
+ /* bail out verbosely on any other error */
+ if (ret) {
pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+ }
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.10.rc3.1067.gb129051
^ permalink raw reply related [flat|nested] 31+ messages in thread
* RE: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
` (3 preceding siblings ...)
2012-10-14 18:30 ` Ohad Ben-Cohen
@ 2012-10-15 5:54 ` Mohammed, Afzal
2012-10-16 18:12 ` Tony Lindgren
2012-10-15 7:37 ` Péter Ujfalusi
5 siblings, 1 reply; 31+ messages in thread
From: Mohammed, Afzal @ 2012-10-15 5:54 UTC (permalink / raw)
To: Tony Lindgren, Russell King - ARM Linux
Cc: linux-omap@vger.kernel.org, Shilimkar, Santosh, Cousson, Benoit,
Paul Walmsley, Hilman, Kevin, Ohad Ben-Cohen, Ujfalusi, Peter
Hi,
On Fri, Oct 12, 2012 at 21:54:52, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
> > omap-gpmc omap-gpmc: error: clk_get
> > omap-gpmc: probe of omap-gpmc failed with error -2
>
> I think Afzal posted something about this already? Looks
> like this too could be sparse IRQ related regression..
Patch has been posted to resolve the issue,
"ARM: OMAP4: hwmod data: gpmc main clk".
Regards
Afzal
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 16:24 ` Tony Lindgren
` (4 preceding siblings ...)
2012-10-15 5:54 ` Mohammed, Afzal
@ 2012-10-15 7:37 ` Péter Ujfalusi
5 siblings, 0 replies; 31+ messages in thread
From: Péter Ujfalusi @ 2012-10-15 7:37 UTC (permalink / raw)
To: Tony Lindgren
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Kevin Hilman, Ohad Ben-Cohen,
Afzal Mohammed
On 10/12/2012 06:24 PM, Tony Lindgren wrote:
>> twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
>
> Peter, can you take a look please?
Patch to fix this has been already sent:
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-September/055684.html
The same issue has been also fixed for twl4030:
http://mailman.alsa-project.org/pipermail/alsa-devel/2012-September/055683.html
--
Péter
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-14 18:30 ` Ohad Ben-Cohen
@ 2012-10-16 18:10 ` Tony Lindgren
2012-10-16 18:26 ` Tony Lindgren
0 siblings, 1 reply; 31+ messages in thread
From: Tony Lindgren @ 2012-10-16 18:10 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Kevin Hilman, Afzal Mohammed,
Péter Ujfalusi
* Ohad Ben-Cohen <ohad@wizery.com> [121014 11:32]:
> On Fri, Oct 12, 2012 at 6:24 PM, Tony Lindgren <tony@atomide.com> wrote:
> >> Error setting wl12xx data: -38
> ..
> > Ohad, can you please take a look?
>
> Sure, -38 is -ENOSYS which is returned when the wl12xx driver isn't configured.
>
> This isn't an error (it's a user decision, and it shouldn't elicit any
> error) and the patch below (also attached) should make it go away on:
>
> From 374f145568585c8d6a8d5e4b8b5d3e6baedd2f39 Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Sun, 14 Oct 2012 20:16:01 +0200
> Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
> configured
>
> Stop intimidating users with scary wlan error messages in case wl12xx
> support wasn't even built.
>
> In addition, when wl12xx_set_platform_data() fails, don't bother
> registering wl12xx's fixed regulator device (on the relevant
> boards).
>
> While we're at it, extract the wlan init code to a dedicated function to
> make (the relevant boards') init code look a bit nicer.
>
> Reported-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Thanks applying into omap-for-v3.7-rc1/fixes-part2.
Regards,
Tony
> ---
> arch/arm/mach-davinci/board-da850-evm.c | 7 ++++++-
> arch/arm/mach-omap2/board-4430sdp.c | 13 ++++++++++--
> arch/arm/mach-omap2/board-omap3evm.c | 11 +++++++++-
> arch/arm/mach-omap2/board-omap3pandora.c | 9 ++++++++-
> arch/arm/mach-omap2/board-omap4panda.c | 30 ++++++++++++++++++++++------
> arch/arm/mach-omap2/board-zoom-peripherals.c | 20 ++++++++++++++++---
> 6 files changed, 76 insertions(+), 14 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/board-da850-evm.c
> b/arch/arm/mach-davinci/board-da850-evm.c
> index 32ee3f8..1b19415 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -1404,8 +1404,13 @@ static __init int da850_wl12xx_init(void)
> da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
>
> ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + goto free_wlan_irq;
> +
> + /* bail out verbosely on any other error */
> if (ret) {
> - pr_err("Could not set wl12xx data: %d\n", ret);
> + pr_err("error setting wl12xx data: %d\n", ret);
> goto free_wlan_irq;
> }
>
> diff --git a/arch/arm/mach-omap2/board-4430sdp.c
> b/arch/arm/mach-omap2/board-4430sdp.c
> index 3669c12..d1dd81a 100644
> --- a/arch/arm/mach-omap2/board-4430sdp.c
> +++ b/arch/arm/mach-omap2/board-4430sdp.c
> @@ -826,9 +826,18 @@ static void __init omap4_sdp4430_wifi_init(void)
>
> omap4_sdp4430_wifi_mux_init();
> omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> +
> ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
> - if (ret)
> - pr_err("Error setting wl12xx data: %d\n", ret);
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return;
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> + pr_err("error setting wl12xx data: %d\n", ret);
> + return;
> + }
> +
> ret = platform_device_register(&omap_vwlan_device);
> if (ret)
> pr_err("Error registering wl12xx device: %d\n", ret);
> diff --git a/arch/arm/mach-omap2/board-omap3evm.c
> b/arch/arm/mach-omap2/board-omap3evm.c
> index b9b776b..7f72e44 100644
> --- a/arch/arm/mach-omap2/board-omap3evm.c
> +++ b/arch/arm/mach-omap2/board-omap3evm.c
> @@ -637,9 +637,18 @@ static void __init omap3_evm_wl12xx_init(void)
>
> /* WL12xx WLAN Init */
> omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
> +
> ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
> - if (ret)
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return;
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> pr_err("error setting wl12xx data: %d\n", ret);
> + return;
> + }
> +
> ret = platform_device_register(&omap3evm_wlan_regulator);
> if (ret)
> pr_err("error registering wl12xx device: %d\n", ret);
> diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
> b/arch/arm/mach-omap2/board-omap3pandora.c
> index 00a1f4a..bbc4001 100644
> --- a/arch/arm/mach-omap2/board-omap3pandora.c
> +++ b/arch/arm/mach-omap2/board-omap3pandora.c
> @@ -549,8 +549,15 @@ static void __init pandora_wl1251_init(void)
>
> pandora_wl1251_pdata.use_eeprom = true;
> ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
> - if (ret < 0)
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + goto fail_irq;
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> + pr_err("error setting wl12xx data: %d\n", ret);
> goto fail_irq;
> + }
>
> return;
>
> diff --git a/arch/arm/mach-omap2/board-omap4panda.c
> b/arch/arm/mach-omap2/board-omap4panda.c
> index bfcd397..cc5cdd6 100644
> --- a/arch/arm/mach-omap2/board-omap4panda.c
> +++ b/arch/arm/mach-omap2/board-omap4panda.c
> @@ -486,24 +486,42 @@ static void omap4_panda_init_rev(void)
> }
> }
>
> +static void __init omap4_panda_wlan_init(void)
> +{
> + int ret;
> +
> + omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> +
> + ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
> +
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return;
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> + pr_err("error setting wl12xx data: %d\n", ret);
> + return;
> + }
> +
> + ret = platform_device_register(&omap_vwlan_device);
> + if (ret)
> + pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
> +}
> +
> static void __init omap4_panda_init(void)
> {
> int package = OMAP_PACKAGE_CBS;
> - int ret;
>
> if (omap_rev() == OMAP4430_REV_ES1_0)
> package = OMAP_PACKAGE_CBL;
> omap4_mux_init(board_mux, NULL, package);
>
> - omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
> - ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
> - if (ret)
> - pr_err("error setting wl12xx data: %d\n", ret);
> + omap4_panda_wlan_init();
>
> omap4_panda_init_rev();
> omap4_panda_i2c_init();
> platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
> - platform_device_register(&omap_vwlan_device);
> omap_serial_init();
> omap_sdrc_init(NULL, NULL);
> omap4_twl6030_hsmmc_init(mmc);
> diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
> b/arch/arm/mach-omap2/board-zoom-peripherals.c
> index c166fe1..3506ed2 100644
> --- a/arch/arm/mach-omap2/board-zoom-peripherals.c
> +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
> @@ -286,19 +286,33 @@ static void enable_board_wakeup_source(void)
> OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
> }
>
> -void __init zoom_peripherals_init(void)
> +static void __init zoom_wlan_init(void)
> {
> int ret;
>
> omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
> +
> ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return;
>
> - if (ret)
> + /* bail out verbosely on any other error */
> + if (ret) {
> pr_err("error setting wl12xx data: %d\n", ret);
> + return;
> + }
>
> + ret = platform_device_register(&omap_vwlan_device);
> + if (ret)
> + pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
> +}
> +
> +void __init zoom_peripherals_init(void)
> +{
> omap_hsmmc_init(mmc);
> + zoom_wlan_init();
> omap_i2c_init();
> - platform_device_register(&omap_vwlan_device);
> usb_musb_init(NULL);
> enable_board_wakeup_source();
> omap_serial_init();
> --
> 1.7.10.rc3.1067.gb129051
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-15 5:54 ` Mohammed, Afzal
@ 2012-10-16 18:12 ` Tony Lindgren
2012-10-16 19:24 ` Benoit Cousson
0 siblings, 1 reply; 31+ messages in thread
From: Tony Lindgren @ 2012-10-16 18:12 UTC (permalink / raw)
To: Mohammed, Afzal
Cc: Russell King - ARM Linux, linux-omap@vger.kernel.org,
Shilimkar, Santosh, Cousson, Benoit, Paul Walmsley, Hilman, Kevin,
Ohad Ben-Cohen, Ujfalusi, Peter
* Mohammed, Afzal <afzal@ti.com> [121014 23:00]:
> Hi,
>
> On Fri, Oct 12, 2012 at 21:54:52, Tony Lindgren wrote:
> > * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
>
> > > omap-gpmc omap-gpmc: error: clk_get
> > > omap-gpmc: probe of omap-gpmc failed with error -2
> >
> > I think Afzal posted something about this already? Looks
> > like this too could be sparse IRQ related regression..
>
> Patch has been posted to resolve the issue,
> "ARM: OMAP4: hwmod data: gpmc main clk".
OK thanks I'll pick that up.
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-16 18:10 ` Tony Lindgren
@ 2012-10-16 18:26 ` Tony Lindgren
2012-10-17 9:10 ` Ohad Ben-Cohen
0 siblings, 1 reply; 31+ messages in thread
From: Tony Lindgren @ 2012-10-16 18:26 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Kevin Hilman, Afzal Mohammed,
Péter Ujfalusi
* Tony Lindgren <tony@atomide.com> [121016 11:12]:
> * Ohad Ben-Cohen <ohad@wizery.com> [121014 11:32]:
> > On Fri, Oct 12, 2012 at 6:24 PM, Tony Lindgren <tony@atomide.com> wrote:
> > >> Error setting wl12xx data: -38
> > ..
> > > Ohad, can you please take a look?
> >
> > Sure, -38 is -ENOSYS which is returned when the wl12xx driver isn't configured.
> >
> > This isn't an error (it's a user decision, and it shouldn't elicit any
> > error) and the patch below (also attached) should make it go away on:
> >
> > From 374f145568585c8d6a8d5e4b8b5d3e6baedd2f39 Mon Sep 17 00:00:00 2001
> > From: Ohad Ben-Cohen <ohad@wizery.com>
> > Date: Sun, 14 Oct 2012 20:16:01 +0200
> > Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
> > configured
> >
> > Stop intimidating users with scary wlan error messages in case wl12xx
> > support wasn't even built.
> >
> > In addition, when wl12xx_set_platform_data() fails, don't bother
> > registering wl12xx's fixed regulator device (on the relevant
> > boards).
> >
> > While we're at it, extract the wlan init code to a dedicated function to
> > make (the relevant boards') init code look a bit nicer.
> >
> > Reported-by: Russell King <linux@arm.linux.org.uk>
> > Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
>
> Thanks applying into omap-for-v3.7-rc1/fixes-part2.
Hmm looking at it repeats the same code over again. Can you
rather add some wl12xx_board_init() helper function to mach-omap2/devices.c
to do it? Dropping this for now.
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-16 18:12 ` Tony Lindgren
@ 2012-10-16 19:24 ` Benoit Cousson
2012-10-16 19:53 ` Tony Lindgren
0 siblings, 1 reply; 31+ messages in thread
From: Benoit Cousson @ 2012-10-16 19:24 UTC (permalink / raw)
To: Tony Lindgren
Cc: Mohammed, Afzal, Russell King - ARM Linux,
linux-omap@vger.kernel.org, Shilimkar, Santosh, Paul Walmsley,
Hilman, Kevin, Ohad Ben-Cohen, Ujfalusi, Peter
Hi Tony,
On 10/16/2012 08:12 PM, Tony Lindgren wrote:
> * Mohammed, Afzal <afzal@ti.com> [121014 23:00]:
>> Hi,
>>
>> On Fri, Oct 12, 2012 at 21:54:52, Tony Lindgren wrote:
>>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
>>
>>>> omap-gpmc omap-gpmc: error: clk_get
>>>> omap-gpmc: probe of omap-gpmc failed with error -2
>>>
>>> I think Afzal posted something about this already? Looks
>>> like this too could be sparse IRQ related regression..
>>
>> Patch has been posted to resolve the issue,
>> "ARM: OMAP4: hwmod data: gpmc main clk".
>
> OK thanks I'll pick that up.
In fact you should not pick that one, the one I sent superseded it:
[PATCH] ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
BTW, I cannot find your omap-for-v3.7-rc1/fixes-part2 branch, did you
already pushed it?
Regards,
Benoit
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-16 19:24 ` Benoit Cousson
@ 2012-10-16 19:53 ` Tony Lindgren
0 siblings, 0 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-16 19:53 UTC (permalink / raw)
To: Benoit Cousson
Cc: Mohammed, Afzal, Russell King - ARM Linux,
linux-omap@vger.kernel.org, Shilimkar, Santosh, Paul Walmsley,
Hilman, Kevin, Ohad Ben-Cohen, Ujfalusi, Peter
* Benoit Cousson <b-cousson@ti.com> [121016 12:26]:
> Hi Tony,
>
> On 10/16/2012 08:12 PM, Tony Lindgren wrote:
> > * Mohammed, Afzal <afzal@ti.com> [121014 23:00]:
> >> Hi,
> >>
> >> On Fri, Oct 12, 2012 at 21:54:52, Tony Lindgren wrote:
> >>> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121012 08:56]:
> >>
> >>>> omap-gpmc omap-gpmc: error: clk_get
> >>>> omap-gpmc: probe of omap-gpmc failed with error -2
> >>>
> >>> I think Afzal posted something about this already? Looks
> >>> like this too could be sparse IRQ related regression..
> >>
> >> Patch has been posted to resolve the issue,
> >> "ARM: OMAP4: hwmod data: gpmc main clk".
> >
> > OK thanks I'll pick that up.
>
> In fact you should not pick that one, the one I sent superseded it:
>
> [PATCH] ARM: OMAP2+: clock data: Add dev-id for the omap-gpmc dummy fck
OK yeah looks like I have the right one then.
> BTW, I cannot find your omap-for-v3.7-rc1/fixes-part2 branch, did you
> already pushed it?
Not yet, was running randconfig builds on it while I was out for lunch :)
Just pushed it out.
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-16 18:26 ` Tony Lindgren
@ 2012-10-17 9:10 ` Ohad Ben-Cohen
2012-10-17 12:43 ` Igor Grinberg
0 siblings, 1 reply; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-17 9:10 UTC (permalink / raw)
To: Tony Lindgren
Cc: Russell King - ARM Linux, linux-omap, Santosh Shilimkar,
Cousson, Benoit, Paul Walmsley, Kevin Hilman, Afzal Mohammed,
Péter Ujfalusi
[-- Attachment #1: Type: text/plain, Size: 8463 bytes --]
On Tue, Oct 16, 2012 at 8:26 PM, Tony Lindgren <tony@atomide.com> wrote:
> Hmm looking at it repeats the same code over again. Can you
> rather add some wl12xx_board_init() helper function to mach-omap2/devices.c
> to do it?
Nice, see below. Note that I can only compile test this now, which may
be ok because it's pretty trivial. But do let me know if you want me
to get it tested.
>From b940fb88a97494ad3a0a093279a5f176c0b29e44 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 8 ++------
arch/arm/mach-omap2/board-4430sdp.c | 7 ++++---
arch/arm/mach-omap2/board-omap3evm.c | 6 +++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++------
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++++------
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++++-----
arch/arm/mach-omap2/common-board-devices.h | 2 ++
arch/arm/mach-omap2/devices.c | 26 ++++++++++++++++++++++++++
8 files changed, 64 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c
b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..7243c22 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1401,13 +1401,9 @@ static __init int da850_wl12xx_init(void)
goto free_wlan_en;
}
- da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
-
- ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
- if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ ret = wl12xx_board_init(&da850_wl12xx_wlan_data, DA850_WLAN_IRQ);
+ if (ret)
goto free_wlan_irq;
- }
return 0;
diff --git a/arch/arm/mach-omap2/board-4430sdp.c
b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c
b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c
b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.h
b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..52e91424 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c8c2117..9e86bb9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -19,6 +19,7 @@
#include <linux/of.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_data/omap4-keypad.h>
+#include <linux/wl12xx.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
@@ -38,6 +39,31 @@
#define L3_MODULES_MAX_LEN 12
#define L3_MODULES 3
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
static int __init omap3_l3_init(void)
{
struct omap_hwmod *oh;
--
1.7.10.rc3.1067.gb129051
[-- Attachment #2: 0001-ARM-OMAP-don-t-print-any-error-when-wl12xx-isn-t-con.patch --]
[-- Type: application/octet-stream, Size: 8098 bytes --]
From b940fb88a97494ad3a0a093279a5f176c0b29e44 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 8 ++------
arch/arm/mach-omap2/board-4430sdp.c | 7 ++++---
arch/arm/mach-omap2/board-omap3evm.c | 6 +++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++------
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++++------
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++++-----
arch/arm/mach-omap2/common-board-devices.h | 2 ++
arch/arm/mach-omap2/devices.c | 26 ++++++++++++++++++++++++++
8 files changed, 64 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..7243c22 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1401,13 +1401,9 @@ static __init int da850_wl12xx_init(void)
goto free_wlan_en;
}
- da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
-
- ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
- if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ ret = wl12xx_board_init(&da850_wl12xx_wlan_data, DA850_WLAN_IRQ);
+ if (ret)
goto free_wlan_irq;
- }
return 0;
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..52e91424 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index c8c2117..9e86bb9 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -19,6 +19,7 @@
#include <linux/of.h>
#include <linux/pinctrl/machine.h>
#include <linux/platform_data/omap4-keypad.h>
+#include <linux/wl12xx.h>
#include <asm/mach-types.h>
#include <asm/mach/map.h>
@@ -38,6 +39,31 @@
#define L3_MODULES_MAX_LEN 12
#define L3_MODULES 3
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+
static int __init omap3_l3_init(void)
{
struct omap_hwmod *oh;
--
1.7.10.rc3.1067.gb129051
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-17 9:10 ` Ohad Ben-Cohen
@ 2012-10-17 12:43 ` Igor Grinberg
2012-10-18 16:58 ` Ohad Ben-Cohen
0 siblings, 1 reply; 31+ messages in thread
From: Igor Grinberg @ 2012-10-17 12:43 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Tony Lindgren, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
Hi Ohad,
On 10/17/12 11:10, Ohad Ben-Cohen wrote:
> On Tue, Oct 16, 2012 at 8:26 PM, Tony Lindgren <tony@atomide.com> wrote:
>> Hmm looking at it repeats the same code over again. Can you
>> rather add some wl12xx_board_init() helper function to mach-omap2/devices.c
>> to do it?
>
> Nice, see below. Note that I can only compile test this now, which may
> be ok because it's pretty trivial. But do let me know if you want me
> to get it tested.
The patch looks good, though minor comment below.
>
>>From b940fb88a97494ad3a0a093279a5f176c0b29e44 Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Sun, 14 Oct 2012 20:16:01 +0200
> Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
> configured
>
> Stop intimidating users with scary wlan error messages in case wl12xx
> support wasn't even built.
>
> In addition, when wl12xx_set_platform_data() fails, don't bother
> registering wl12xx's fixed regulator device (on the relevant
> boards).
>
> While we're at it, extract the wlan init code to a dedicated function to
> make (the relevant boards') init code look a bit nicer.
>
> Compile tested only.
>
> Reported-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
> ---
> arch/arm/mach-davinci/board-da850-evm.c | 8 ++------
> arch/arm/mach-omap2/board-4430sdp.c | 7 ++++---
> arch/arm/mach-omap2/board-omap3evm.c | 6 +++---
> arch/arm/mach-omap2/board-omap3pandora.c | 9 +++------
> arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++++------
> arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++++-----
> arch/arm/mach-omap2/common-board-devices.h | 2 ++
> arch/arm/mach-omap2/devices.c | 26 ++++++++++++++++++++++++++
> 8 files changed, 64 insertions(+), 29 deletions(-)
[...]
> diff --git a/arch/arm/mach-omap2/common-board-devices.h
> b/arch/arm/mach-omap2/common-board-devices.h
> index a0b4a428..52e91424 100644
> --- a/arch/arm/mach-omap2/common-board-devices.h
> +++ b/arch/arm/mach-omap2/common-board-devices.h
> @@ -7,9 +7,11 @@
>
> struct mtd_partition;
> struct ads7846_platform_data;
> +struct wl12xx_platform_data;
>
> void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
> struct ads7846_platform_data *board_pdata);
> void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
> +int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
You are adding declarations inside the common-board-devices.h,
but the implementation inside the devices.c.
I can see that devices.c has only on-soc devices in it.
So, I would expect to have the wl12xx_board_init() function implementation
inside the common-board-devices.c file.
Another minor nit: I don't think you need to mark the declaration as __init,
only the implementation, or is it for documenting it so?
>
> #endif /* __OMAP_COMMON_BOARD_DEVICES__ */
> diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
> index c8c2117..9e86bb9 100644
> --- a/arch/arm/mach-omap2/devices.c
> +++ b/arch/arm/mach-omap2/devices.c
> @@ -19,6 +19,7 @@
> #include <linux/of.h>
> #include <linux/pinctrl/machine.h>
> #include <linux/platform_data/omap4-keypad.h>
> +#include <linux/wl12xx.h>
>
> #include <asm/mach-types.h>
> #include <asm/mach/map.h>
> @@ -38,6 +39,31 @@
> #define L3_MODULES_MAX_LEN 12
> #define L3_MODULES 3
>
> +int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
> +{
> + int ret;
> +
> + wlan_data->irq = gpio_to_irq(gpio);
> + if (wlan_data->irq < 0) {
> + ret = wlan_data->irq;
> + pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
> + return ret;
> + }
> +
> + ret = wl12xx_set_platform_data(wlan_data);
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return ret;
Instead of the above, wouldn't it be better to have:
#if defined(CONFIG_WL12XX_PLATFORM_DATA)
int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
{
...
}
#else
inline int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
{
return 0;
}
#endif
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> + pr_err("error setting wl12xx data: %d\n", ret);
> + return ret;
> + }
> +
> + return 0;
> +}
> +
> static int __init omap3_l3_init(void)
> {
> struct omap_hwmod *oh;
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-17 12:43 ` Igor Grinberg
@ 2012-10-18 16:58 ` Ohad Ben-Cohen
2012-10-19 17:07 ` Tony Lindgren
0 siblings, 1 reply; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-18 16:58 UTC (permalink / raw)
To: Igor Grinberg
Cc: Tony Lindgren, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
Hi Igor,
On Wed, Oct 17, 2012 at 2:43 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
> You are adding declarations inside the common-board-devices.h,
> but the implementation inside the devices.c.
> I can see that devices.c has only on-soc devices in it.
> So, I would expect to have the wl12xx_board_init() function implementation
> inside the common-board-devices.c file.
I really don't mind. Tony do you have any preference?
> Another minor nit: I don't think you need to mark the declaration as __init,
> only the implementation, or is it for documenting it so?
It may be, but I don't really mind removing it. Let's remove it if
we'll move to common-board-devices.c, otherwise it probably isn't
worth the noise.
> Instead of the above, wouldn't it be better to have:
> #if defined(CONFIG_WL12XX_PLATFORM_DATA)
> int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
> {
> ...
> }
> #else
> inline int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
> {
> return 0;
> }
> #endif
I think readability-wise we're probably better off without the #ifdef.
Thanks,
Ohad.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-18 16:58 ` Ohad Ben-Cohen
@ 2012-10-19 17:07 ` Tony Lindgren
2012-10-21 14:54 ` Ohad Ben-Cohen
0 siblings, 1 reply; 31+ messages in thread
From: Tony Lindgren @ 2012-10-19 17:07 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Igor Grinberg, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
* Ohad Ben-Cohen <ohad@wizery.com> [121018 10:00]:
> Hi Igor,
>
> On Wed, Oct 17, 2012 at 2:43 PM, Igor Grinberg <grinberg@compulab.co.il> wrote:
> > You are adding declarations inside the common-board-devices.h,
> > but the implementation inside the devices.c.
> > I can see that devices.c has only on-soc devices in it.
> > So, I would expect to have the wl12xx_board_init() function implementation
> > inside the common-board-devices.c file.
>
> I really don't mind. Tony do you have any preference?
Yes common-board-devices.c would be better.
> > Another minor nit: I don't think you need to mark the declaration as __init,
> > only the implementation, or is it for documenting it so?
>
> It may be, but I don't really mind removing it. Let's remove it if
> we'll move to common-board-devices.c, otherwise it probably isn't
> worth the noise.
OK
> > Instead of the above, wouldn't it be better to have:
> > #if defined(CONFIG_WL12XX_PLATFORM_DATA)
> > int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
> > {
> > ...
> > }
> > #else
> > inline int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int irq_gpio)
> > {
> > return 0;
> > }
> > #endif
>
> I think readability-wise we're probably better off without the #ifdef.
We could optimize away a minimal amount of code for many configurations
with the ifdef? :)
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-19 17:07 ` Tony Lindgren
@ 2012-10-21 14:54 ` Ohad Ben-Cohen
2012-10-23 7:37 ` Igor Grinberg
2012-10-24 1:54 ` Tony Lindgren
0 siblings, 2 replies; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-21 14:54 UTC (permalink / raw)
To: Tony Lindgren
Cc: Igor Grinberg, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
[-- Attachment #1: Type: text/plain, Size: 8504 bytes --]
On Fri, Oct 19, 2012 at 7:07 PM, Tony Lindgren <tony@atomide.com> wrote:
...
> We could optimize away a minimal amount of code for many configurations
> with the ifdef? :)
Sure, here goes (compile tested only):
>From 6b82365da2c04986e647d06c285197efece7cb34 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 8 ++-----
arch/arm/mach-omap2/board-4430sdp.c | 7 +++---
arch/arm/mach-omap2/board-omap3evm.c | 6 ++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++-----
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++-----
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++-----
arch/arm/mach-omap2/common-board-devices.c | 33 ++++++++++++++++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 2 ++
8 files changed, 71 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c
b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..7243c22 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1401,13 +1401,9 @@ static __init int da850_wl12xx_init(void)
goto free_wlan_en;
}
- da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
-
- ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
- if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ ret = wl12xx_board_init(&da850_wl12xx_wlan_data, DA850_WLAN_IRQ);
+ if (ret)
goto free_wlan_irq;
- }
return 0;
diff --git a/arch/arm/mach-omap2/board-4430sdp.c
b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c
b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c
b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.c
b/arch/arm/mach-omap2/common-board-devices.c
index 48daac2..02351e9 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -23,6 +23,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
+#include <linux/wl12xx.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/mtd-nand-omap2.h>
@@ -141,3 +142,35 @@ void __init omap_nand_flash_init(int options,
struct mtd_partition *parts,
{
}
#endif
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+#else /* !CONFIG_WL12XX_PLATFORM_DATA */
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ return 0;
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h
b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..0e7398f 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.10.rc3.1067.gb129051
[-- Attachment #2: 0001-ARM-OMAP-don-t-print-any-error-when-wl12xx-isn-t-con.patch --]
[-- Type: application/octet-stream, Size: 8310 bytes --]
From 6b82365da2c04986e647d06c285197efece7cb34 Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-davinci/board-da850-evm.c | 8 ++-----
arch/arm/mach-omap2/board-4430sdp.c | 7 +++---
arch/arm/mach-omap2/board-omap3evm.c | 6 ++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++-----
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++-----
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++-----
arch/arm/mach-omap2/common-board-devices.c | 33 ++++++++++++++++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 2 ++
8 files changed, 71 insertions(+), 29 deletions(-)
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 32ee3f8..7243c22 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1401,13 +1401,9 @@ static __init int da850_wl12xx_init(void)
goto free_wlan_en;
}
- da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
-
- ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
- if (ret) {
- pr_err("Could not set wl12xx data: %d\n", ret);
+ ret = wl12xx_board_init(&da850_wl12xx_wlan_data, DA850_WLAN_IRQ);
+ if (ret)
goto free_wlan_irq;
- }
return 0;
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 48daac2..02351e9 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -23,6 +23,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
+#include <linux/wl12xx.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/mtd-nand-omap2.h>
@@ -141,3 +142,35 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
{
}
#endif
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+#else /* !CONFIG_WL12XX_PLATFORM_DATA */
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ return 0;
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..0e7398f 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.10.rc3.1067.gb129051
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-21 14:54 ` Ohad Ben-Cohen
@ 2012-10-23 7:37 ` Igor Grinberg
2012-10-23 7:51 ` Ohad Ben-Cohen
2012-10-24 1:54 ` Tony Lindgren
1 sibling, 1 reply; 31+ messages in thread
From: Igor Grinberg @ 2012-10-23 7:37 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Tony Lindgren, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
On 10/21/12 16:54, Ohad Ben-Cohen wrote:
> On Fri, Oct 19, 2012 at 7:07 PM, Tony Lindgren <tony@atomide.com> wrote:
> ...
>> We could optimize away a minimal amount of code for many configurations
>> with the ifdef? :)
>
> Sure, here goes (compile tested only):
>
>>From 6b82365da2c04986e647d06c285197efece7cb34 Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Sun, 14 Oct 2012 20:16:01 +0200
> Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
> configured
>
> Stop intimidating users with scary wlan error messages in case wl12xx
> support wasn't even built.
>
> In addition, when wl12xx_set_platform_data() fails, don't bother
> registering wl12xx's fixed regulator device (on the relevant
> boards).
>
> While we're at it, extract the wlan init code to a dedicated function to
> make (the relevant boards') init code look a bit nicer.
>
> Compile tested only.
>
> Reported-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Apart, from the minor comment below,
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> arch/arm/mach-davinci/board-da850-evm.c | 8 ++-----
> arch/arm/mach-omap2/board-4430sdp.c | 7 +++---
> arch/arm/mach-omap2/board-omap3evm.c | 6 ++---
> arch/arm/mach-omap2/board-omap3pandora.c | 9 +++-----
> arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++-----
> arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++-----
> arch/arm/mach-omap2/common-board-devices.c | 33 ++++++++++++++++++++++++++++
> arch/arm/mach-omap2/common-board-devices.h | 2 ++
> 8 files changed, 71 insertions(+), 29 deletions(-)
[...]
> diff --git a/arch/arm/mach-omap2/common-board-devices.c
> b/arch/arm/mach-omap2/common-board-devices.c
> index 48daac2..02351e9 100644
> --- a/arch/arm/mach-omap2/common-board-devices.c
> +++ b/arch/arm/mach-omap2/common-board-devices.c
> @@ -23,6 +23,7 @@
> #include <linux/gpio.h>
> #include <linux/spi/spi.h>
> #include <linux/spi/ads7846.h>
> +#include <linux/wl12xx.h>
>
> #include <linux/platform_data/spi-omap2-mcspi.h>
> #include <linux/platform_data/mtd-nand-omap2.h>
> @@ -141,3 +142,35 @@ void __init omap_nand_flash_init(int options,
> struct mtd_partition *parts,
> {
> }
> #endif
> +
> +#ifdef CONFIG_WL12XX_PLATFORM_DATA
> +int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
> +{
> + int ret;
> +
> + wlan_data->irq = gpio_to_irq(gpio);
> + if (wlan_data->irq < 0) {
> + ret = wlan_data->irq;
> + pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
> + return ret;
> + }
> +
> + ret = wl12xx_set_platform_data(wlan_data);
> + /* bail out silently in case wl12xx isn't configured */
> + if (ret == -ENOSYS)
> + return ret;
Since we have the function ifdef'ed, I don't think we need
the ENOSYS check, do we?
> +
> + /* bail out verbosely on any other error */
> + if (ret) {
> + pr_err("error setting wl12xx data: %d\n", ret);
> + return ret;
> + }
> +
> + return 0;
> +}
> +#else /* !CONFIG_WL12XX_PLATFORM_DATA */
> +int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
> +{
> + return 0;
> +}
> +#endif
[...]
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-23 7:37 ` Igor Grinberg
@ 2012-10-23 7:51 ` Ohad Ben-Cohen
2012-10-23 9:46 ` Igor Grinberg
0 siblings, 1 reply; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-23 7:51 UTC (permalink / raw)
To: Igor Grinberg
Cc: Tony Lindgren, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
On Tue, Oct 23, 2012 at 9:37 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>> + ret = wl12xx_set_platform_data(wlan_data);
>> + /* bail out silently in case wl12xx isn't configured */
>> + if (ret == -ENOSYS)
>> + return ret;
>
> Since we have the function ifdef'ed, I don't think we need
> the ENOSYS check, do we?
If we want to be strict, we better not remove it.
It's an interface that hides the internal implementation, and it's
just better not to assume anything beyond the return values and their
meanings. This way if WLAN folks change something in the future, we
don't need to update all the boards code again.
Thanks,
Ohad.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-23 7:51 ` Ohad Ben-Cohen
@ 2012-10-23 9:46 ` Igor Grinberg
0 siblings, 0 replies; 31+ messages in thread
From: Igor Grinberg @ 2012-10-23 9:46 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Tony Lindgren, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
On 10/23/12 09:51, Ohad Ben-Cohen wrote:
> On Tue, Oct 23, 2012 at 9:37 AM, Igor Grinberg <grinberg@compulab.co.il> wrote:
>>> + ret = wl12xx_set_platform_data(wlan_data);
>>> + /* bail out silently in case wl12xx isn't configured */
>>> + if (ret == -ENOSYS)
>>> + return ret;
>>
>> Since we have the function ifdef'ed, I don't think we need
>> the ENOSYS check, do we?
>
> If we want to be strict, we better not remove it.
>
> It's an interface that hides the internal implementation, and it's
> just better not to assume anything beyond the return values and their
> meanings. This way if WLAN folks change something in the future, we
> don't need to update all the boards code again.
Well, with this argument, we can add this (and many other checks) to
many more places in the code...
I just wanted to point out that most probably ret == -ENOSYS will
never happen since the #ifdef is added, but no problem from my side,
it does not hurt to have 4 more lines just in case, right?
Thanks for the patch and the explanation!
You have my ack already...
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-12 15:54 Errors at boot time from OMAP4430SDP (and a whinge about serial stuff) Russell King - ARM Linux
2012-10-12 16:24 ` Tony Lindgren
@ 2012-10-23 10:10 ` Russell King - ARM Linux
2012-10-25 1:09 ` Tony Lindgren
1 sibling, 1 reply; 31+ messages in thread
From: Russell King - ARM Linux @ 2012-10-23 10:10 UTC (permalink / raw)
To: linux-omap; +Cc: Santosh Shilimkar, Tony Lindgren
On Fri, Oct 12, 2012 at 04:54:34PM +0100, Russell King - ARM Linux wrote:
> For those who don't bother looking at my kautobuild boot tests on the OMAP
> boards I have, here's the errors which get spat out at boot time. Note
> that some of these I've reported in the past, and one of them is missing
> a newline character at the end of its string.
>
> twd: can't register interrupt 45 (-22)
> twd_local_timer_register failed -22
> omap_hwmod: mcpdm: cannot be enabled for reset (3)
> omap-gpmc omap-gpmc: error: clk_get
> omap-gpmc: probe of omap-gpmc failed with error -2
> Error setting wl12xx data: -38
> omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
> twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
> mmc1: host does not support reading read-only switch. assuming write-enable.
Here's the latest set of error like messages, thanks to the kautobuild
system:
omap_hwmod: mcpdm: cannot be enabled for reset (3)
Error setting wl12xx data: -38
omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
mmc1: host does not support reading read-only switch. assuming write-enable.
This looks much better compared to the previous set, but we could still
do with getting a "\n" on at least one of those messages...
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-21 14:54 ` Ohad Ben-Cohen
2012-10-23 7:37 ` Igor Grinberg
@ 2012-10-24 1:54 ` Tony Lindgren
2012-10-24 11:15 ` Ohad Ben-Cohen
1 sibling, 1 reply; 31+ messages in thread
From: Tony Lindgren @ 2012-10-24 1:54 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Igor Grinberg, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
* Ohad Ben-Cohen <ohad@wizery.com> [121021 07:56]:
> On Fri, Oct 19, 2012 at 7:07 PM, Tony Lindgren <tony@atomide.com> wrote:
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -1401,13 +1401,9 @@ static __init int da850_wl12xx_init(void)
> goto free_wlan_en;
> }
>
> - da850_wl12xx_wlan_data.irq = gpio_to_irq(DA850_WLAN_IRQ);
> -
> - ret = wl12xx_set_platform_data(&da850_wl12xx_wlan_data);
> - if (ret) {
> - pr_err("Could not set wl12xx data: %d\n", ret);
> + ret = wl12xx_board_init(&da850_wl12xx_wlan_data, DA850_WLAN_IRQ);
> + if (ret)
> goto free_wlan_irq;
> - }
>
> return 0;
I don't think mach-davinci has wl12xx_board_init() available?
Maybe leave this out or define also also somewhere for mach-davinci?
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-24 1:54 ` Tony Lindgren
@ 2012-10-24 11:15 ` Ohad Ben-Cohen
2012-10-25 19:03 ` Tony Lindgren
0 siblings, 1 reply; 31+ messages in thread
From: Ohad Ben-Cohen @ 2012-10-24 11:15 UTC (permalink / raw)
To: Tony Lindgren
Cc: Igor Grinberg, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
[-- Attachment #1: Type: text/plain, Size: 7866 bytes --]
On Wed, Oct 24, 2012 at 3:54 AM, Tony Lindgren <tony@atomide.com> wrote:
> I don't think mach-davinci has wl12xx_board_init() available?
> Maybe leave this out or define also also somewhere for mach-davinci?
Yeah let's leave davinci out for now:
>From 665bcaa7ef0ed385cf1765f2d4503bf84aaf488a Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 7 +++---
arch/arm/mach-omap2/board-omap3evm.c | 6 ++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++-----
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++-----
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++-----
arch/arm/mach-omap2/common-board-devices.c | 33 ++++++++++++++++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 2 ++
7 files changed, 69 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c
b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c
b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c
b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c
b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c
b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.c
b/arch/arm/mach-omap2/common-board-devices.c
index 48daac2..02351e9 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -23,6 +23,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
+#include <linux/wl12xx.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/mtd-nand-omap2.h>
@@ -141,3 +142,35 @@ void __init omap_nand_flash_init(int options,
struct mtd_partition *parts,
{
}
#endif
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+#else /* !CONFIG_WL12XX_PLATFORM_DATA */
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ return 0;
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h
b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..0e7398f 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.10.rc3.1067.gb129051
[-- Attachment #2: 0001-ARM-OMAP-don-t-print-any-error-when-wl12xx-isn-t-con.patch --]
[-- Type: application/octet-stream, Size: 7634 bytes --]
From 665bcaa7ef0ed385cf1765f2d4503bf84aaf488a Mon Sep 17 00:00:00 2001
From: Ohad Ben-Cohen <ohad@wizery.com>
Date: Sun, 14 Oct 2012 20:16:01 +0200
Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
configured
Stop intimidating users with scary wlan error messages in case wl12xx
support wasn't even built.
In addition, when wl12xx_set_platform_data() fails, don't bother
registering wl12xx's fixed regulator device (on the relevant
boards).
While we're at it, extract the wlan init code to a dedicated function to
make (the relevant boards') init code look a bit nicer.
Compile tested only.
Reported-by: Russell King <linux@arm.linux.org.uk>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
arch/arm/mach-omap2/board-4430sdp.c | 7 +++---
arch/arm/mach-omap2/board-omap3evm.c | 6 ++---
arch/arm/mach-omap2/board-omap3pandora.c | 9 +++-----
arch/arm/mach-omap2/board-omap4panda.c | 20 ++++++++++++-----
arch/arm/mach-omap2/board-zoom-peripherals.c | 15 ++++++++-----
arch/arm/mach-omap2/common-board-devices.c | 33 ++++++++++++++++++++++++++++
arch/arm/mach-omap2/common-board-devices.h | 2 ++
7 files changed, 69 insertions(+), 23 deletions(-)
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 3669c12..bc48679 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -825,10 +825,11 @@ static void __init omap4_sdp4430_wifi_init(void)
int ret;
omap4_sdp4430_wifi_mux_init();
- omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
+
+ ret = wl12xx_board_init(&omap4_sdp4430_wlan_data, GPIO_WIFI_IRQ);
if (ret)
- pr_err("Error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap_vwlan_device);
if (ret)
pr_err("Error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index b9b776b..8e3a075 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -636,10 +636,10 @@ static void __init omap3_evm_wl12xx_init(void)
int ret;
/* WL12xx WLAN Init */
- omap3evm_wlan_data.irq = gpio_to_irq(OMAP3EVM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap3evm_wlan_data);
+ ret = wl12xx_board_init(&omap3evm_wlan_data, OMAP3EVM_WLAN_IRQ_GPIO);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ return;
+
ret = platform_device_register(&omap3evm_wlan_regulator);
if (ret)
pr_err("error registering wl12xx device: %d\n", ret);
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index 00a1f4a..bfdc7aa 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -543,13 +543,10 @@ static void __init pandora_wl1251_init(void)
if (ret < 0)
goto fail;
- pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
- if (pandora_wl1251_pdata.irq < 0)
- goto fail_irq;
-
pandora_wl1251_pdata.use_eeprom = true;
- ret = wl12xx_set_platform_data(&pandora_wl1251_pdata);
- if (ret < 0)
+
+ ret = wl12xx_board_init(&pandora_wl1251_pdata, PANDORA_WIFI_IRQ_GPIO);
+ if (ret)
goto fail_irq;
return;
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index bfcd397..f203cd9 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -486,24 +486,32 @@ static void omap4_panda_init_rev(void)
}
}
+static void __init omap4_panda_wlan_init(void)
+{
+ int ret;
+
+ ret = wl12xx_board_init(&omap_panda_wlan_data, GPIO_WIFI_IRQ);
+ if (ret)
+ return;
+
+ ret = platform_device_register(&omap_vwlan_device);
+ if (ret)
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+
static void __init omap4_panda_init(void)
{
int package = OMAP_PACKAGE_CBS;
- int ret;
if (omap_rev() == OMAP4430_REV_ES1_0)
package = OMAP_PACKAGE_CBL;
omap4_mux_init(board_mux, NULL, package);
- omap_panda_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
- ret = wl12xx_set_platform_data(&omap_panda_wlan_data);
- if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ omap4_panda_wlan_init();
omap4_panda_init_rev();
omap4_panda_i2c_init();
platform_add_devices(panda_devices, ARRAY_SIZE(panda_devices));
- platform_device_register(&omap_vwlan_device);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index c166fe1..c81a2c7 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -286,19 +286,24 @@ static void enable_board_wakeup_source(void)
OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}
-void __init zoom_peripherals_init(void)
+static void __init zoom_wlan_init(void)
{
int ret;
- omap_zoom_wlan_data.irq = gpio_to_irq(OMAP_ZOOM_WLAN_IRQ_GPIO);
- ret = wl12xx_set_platform_data(&omap_zoom_wlan_data);
+ ret = wl12xx_board_init(&omap_zoom_wlan_data, OMAP_ZOOM_WLAN_IRQ_GPIO);
+ if (ret)
+ return;
+ ret = platform_device_register(&omap_vwlan_device);
if (ret)
- pr_err("error setting wl12xx data: %d\n", ret);
+ pr_err("error registering wl12xx's fixed regulator: %d\n", ret);
+}
+void __init zoom_peripherals_init(void)
+{
omap_hsmmc_init(mmc);
+ zoom_wlan_init();
omap_i2c_init();
- platform_device_register(&omap_vwlan_device);
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
diff --git a/arch/arm/mach-omap2/common-board-devices.c b/arch/arm/mach-omap2/common-board-devices.c
index 48daac2..02351e9 100644
--- a/arch/arm/mach-omap2/common-board-devices.c
+++ b/arch/arm/mach-omap2/common-board-devices.c
@@ -23,6 +23,7 @@
#include <linux/gpio.h>
#include <linux/spi/spi.h>
#include <linux/spi/ads7846.h>
+#include <linux/wl12xx.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/platform_data/mtd-nand-omap2.h>
@@ -141,3 +142,35 @@ void __init omap_nand_flash_init(int options, struct mtd_partition *parts,
{
}
#endif
+
+#ifdef CONFIG_WL12XX_PLATFORM_DATA
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ int ret;
+
+ wlan_data->irq = gpio_to_irq(gpio);
+ if (wlan_data->irq < 0) {
+ ret = wlan_data->irq;
+ pr_err("wl12xx: gpio_to_irq(%d) failed: %d\n", gpio, ret);
+ return ret;
+ }
+
+ ret = wl12xx_set_platform_data(wlan_data);
+ /* bail out silently in case wl12xx isn't configured */
+ if (ret == -ENOSYS)
+ return ret;
+
+ /* bail out verbosely on any other error */
+ if (ret) {
+ pr_err("error setting wl12xx data: %d\n", ret);
+ return ret;
+ }
+
+ return 0;
+}
+#else /* !CONFIG_WL12XX_PLATFORM_DATA */
+int __init wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio)
+{
+ return 0;
+}
+#endif
diff --git a/arch/arm/mach-omap2/common-board-devices.h b/arch/arm/mach-omap2/common-board-devices.h
index a0b4a428..0e7398f 100644
--- a/arch/arm/mach-omap2/common-board-devices.h
+++ b/arch/arm/mach-omap2/common-board-devices.h
@@ -7,9 +7,11 @@
struct mtd_partition;
struct ads7846_platform_data;
+struct wl12xx_platform_data;
void omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
struct ads7846_platform_data *board_pdata);
void omap_nand_flash_init(int opts, struct mtd_partition *parts, int n_parts);
+int wl12xx_board_init(struct wl12xx_platform_data *wlan_data, int gpio);
#endif /* __OMAP_COMMON_BOARD_DEVICES__ */
--
1.7.10.rc3.1067.gb129051
^ permalink raw reply related [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-23 10:10 ` Russell King - ARM Linux
@ 2012-10-25 1:09 ` Tony Lindgren
2012-10-25 16:05 ` Balaji T K
2012-10-25 17:24 ` Kevin Hilman
0 siblings, 2 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-25 1:09 UTC (permalink / raw)
To: Kevin Hilman; +Cc: linux-omap, Santosh Shilimkar, Russell King - ARM Linux
* Russell King - ARM Linux <linux@arm.linux.org.uk> [121023 03:12]:
> On Fri, Oct 12, 2012 at 04:54:34PM +0100, Russell King - ARM Linux wrote:
> > For those who don't bother looking at my kautobuild boot tests on the OMAP
> > boards I have, here's the errors which get spat out at boot time. Note
> > that some of these I've reported in the past, and one of them is missing
> > a newline character at the end of its string.
> >
> > twd: can't register interrupt 45 (-22)
> > twd_local_timer_register failed -22
> > omap_hwmod: mcpdm: cannot be enabled for reset (3)
> > omap-gpmc omap-gpmc: error: clk_get
> > omap-gpmc: probe of omap-gpmc failed with error -2
> > Error setting wl12xx data: -38
> > omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
> > omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
> > omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
> > twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
> > omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
> > omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
> > mmc1: host does not support reading read-only switch. assuming write-enable.
>
> Here's the latest set of error like messages, thanks to the kautobuild
> system:
>
> omap_hwmod: mcpdm: cannot be enabled for reset (3)
> Error setting wl12xx data: -38
That's now fixed up and I've queued it.
> omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
> mmc1: host does not support reading read-only switch. assuming write-enable.
>
> This looks much better compared to the previous set, but we could still
> do with getting a "\n" on at least one of those messages...
Kevin, do you have a patch for some of this?
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-25 1:09 ` Tony Lindgren
@ 2012-10-25 16:05 ` Balaji T K
2012-10-25 17:24 ` Kevin Hilman
1 sibling, 0 replies; 31+ messages in thread
From: Balaji T K @ 2012-10-25 16:05 UTC (permalink / raw)
To: Tony Lindgren
Cc: Kevin Hilman, linux-omap, Santosh Shilimkar,
Russell King - ARM Linux
On Thursday 25 October 2012 06:39 AM, Tony Lindgren wrote:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121023 03:12]:
>> On Fri, Oct 12, 2012 at 04:54:34PM +0100, Russell King - ARM Linux wrote:
>> omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
>> omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
>> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
Hi,
Posted a patch to remove this warning, as debounce clock is not
applicable for most platforms and optional for omap2430.
https://patchwork.kernel.org/patch/1645461/
>> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
>> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
>> mmc1: host does not support reading read-only switch. assuming write-enable.
>>
>> This looks much better compared to the previous set, but we could still
>> do with getting a "\n" on at least one of those messages...
>
> Kevin, do you have a patch for some of this?
>
> Regards,
>
> Tony
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-25 1:09 ` Tony Lindgren
2012-10-25 16:05 ` Balaji T K
@ 2012-10-25 17:24 ` Kevin Hilman
2012-10-25 17:38 ` Kevin Hilman
1 sibling, 1 reply; 31+ messages in thread
From: Kevin Hilman @ 2012-10-25 17:24 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, Santosh Shilimkar, Russell King - ARM Linux,
Tero Kristo
Tony Lindgren <tony@atomide.com> writes:
> * Russell King - ARM Linux <linux@arm.linux.org.uk> [121023 03:12]:
>> On Fri, Oct 12, 2012 at 04:54:34PM +0100, Russell King - ARM Linux wrote:
>> > For those who don't bother looking at my kautobuild boot tests on the OMAP
>> > boards I have, here's the errors which get spat out at boot time. Note
>> > that some of these I've reported in the past, and one of them is missing
>> > a newline character at the end of its string.
>> >
>> > twd: can't register interrupt 45 (-22)
>> > twd_local_timer_register failed -22
>> > omap_hwmod: mcpdm: cannot be enabled for reset (3)
>> > omap-gpmc omap-gpmc: error: clk_get
>> > omap-gpmc: probe of omap-gpmc failed with error -2
>> > Error setting wl12xx data: -38
>> > omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
>> > omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
>> > omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
>> > twl6040-codec twl6040-codec: ASoC: Failed to create Capture debugfs file
>> > omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
>> > omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
>> > mmc1: host does not support reading read-only switch. assuming write-enable.
>>
>> Here's the latest set of error like messages, thanks to the kautobuild
>> system:
>>
>> omap_hwmod: mcpdm: cannot be enabled for reset (3)
>> Error setting wl12xx data: -38
>
> That's now fixed up and I've queued it.
>
>> omap_hsmmc omap_hsmmc.1: Failed to get debounce clk
>> omap_hsmmc omap_hsmmc.0: Failed to get debounce clk
>> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
>> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
>> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
>> mmc1: host does not support reading read-only switch. assuming write-enable.
>>
>> This looks much better compared to the previous set, but we could still
>> do with getting a "\n" on at least one of those messages...
>
> Kevin, do you have a patch for some of this?
>
I'll fix up the missing newline right away.
I was planning to leave the VC mismatch problem because it's fixed in
Tero's auto retention series. However, I haven't been able to get to
that series yet due to all the regressions/bugfixes, so I'll at least
pull out the part that fixes up the mistmatch and submit it for v3.7.
Kevin
[1] http://marc.info/?l=linux-omap&m=134859084918176&w=2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-25 17:24 ` Kevin Hilman
@ 2012-10-25 17:38 ` Kevin Hilman
2012-10-25 17:46 ` Tony Lindgren
0 siblings, 1 reply; 31+ messages in thread
From: Kevin Hilman @ 2012-10-25 17:38 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, Santosh Shilimkar, Russell King - ARM Linux,
Tero Kristo
Kevin Hilman <khilman@deeprootsystems.com> writes:
> Tony Lindgren <tony@atomide.com> writes:
>
[...]
>>> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
>>> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
>>> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
>>> mmc1: host does not support reading read-only switch. assuming write-enable.
>>>
>>> This looks much better compared to the previous set, but we could still
>>> do with getting a "\n" on at least one of those messages...
>>
>> Kevin, do you have a patch for some of this?
>>
>
> I'll fix up the missing newline right away.
Patch sent.
> I was planning to leave the VC mismatch problem because it's fixed in
> Tero's auto retention series. However, I haven't been able to get to
> that series yet due to all the regressions/bugfixes, so I'll at least
> pull out the part that fixes up the mistmatch and submit it for v3.7.
On closer look, I don't think a quick fix is right for this one. Those
I2C config mismatch warnings are legitmate for now, and will be fixed
when Tero's series is merged.
Kevin
> Kevin
>
> [1] http://marc.info/?l=linux-omap&m=134859084918176&w=2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-25 17:38 ` Kevin Hilman
@ 2012-10-25 17:46 ` Tony Lindgren
0 siblings, 0 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-25 17:46 UTC (permalink / raw)
To: Kevin Hilman
Cc: linux-omap, Santosh Shilimkar, Russell King - ARM Linux,
Tero Kristo
* Kevin Hilman <khilman@deeprootsystems.com> [121025 10:39]:
> Kevin Hilman <khilman@deeprootsystems.com> writes:
>
> > Tony Lindgren <tony@atomide.com> writes:
> >
> [...]
>
> >>> omap_hsmmc omap_hsmmc.4: Failed to get debounce clk
> >>> omap_vc_i2c_init: I2C config for vdd_iva does not match other channels (0).
> >>> omap_vc_i2c_init: I2C config for vdd_mpu does not match other channels (0).Power Management for TI OMAP4.
> >>> mmc1: host does not support reading read-only switch. assuming write-enable.
> >>>
> >>> This looks much better compared to the previous set, but we could still
> >>> do with getting a "\n" on at least one of those messages...
> >>
> >> Kevin, do you have a patch for some of this?
> >>
> >
> > I'll fix up the missing newline right away.
>
> Patch sent.
OK thanks.
> > I was planning to leave the VC mismatch problem because it's fixed in
> > Tero's auto retention series. However, I haven't been able to get to
> > that series yet due to all the regressions/bugfixes, so I'll at least
> > pull out the part that fixes up the mistmatch and submit it for v3.7.
>
> On closer look, I don't think a quick fix is right for this one. Those
> I2C config mismatch warnings are legitmate for now, and will be fixed
> when Tero's series is merged.
OK fine with me.
Regards,
Tony
> > [1] http://marc.info/?l=linux-omap&m=134859084918176&w=2
^ permalink raw reply [flat|nested] 31+ messages in thread
* Re: Errors at boot time from OMAP4430SDP (and a whinge about serial stuff)
2012-10-24 11:15 ` Ohad Ben-Cohen
@ 2012-10-25 19:03 ` Tony Lindgren
0 siblings, 0 replies; 31+ messages in thread
From: Tony Lindgren @ 2012-10-25 19:03 UTC (permalink / raw)
To: Ohad Ben-Cohen
Cc: Igor Grinberg, Russell King - ARM Linux, linux-omap,
Santosh Shilimkar, Cousson, Benoit, Paul Walmsley, Kevin Hilman,
Afzal Mohammed, Péter Ujfalusi
* Ohad Ben-Cohen <ohad@wizery.com> [121024 04:17]:
> On Wed, Oct 24, 2012 at 3:54 AM, Tony Lindgren <tony@atomide.com> wrote:
> > I don't think mach-davinci has wl12xx_board_init() available?
> > Maybe leave this out or define also also somewhere for mach-davinci?
>
> Yeah let's leave davinci out for now:
>
> From 665bcaa7ef0ed385cf1765f2d4503bf84aaf488a Mon Sep 17 00:00:00 2001
> From: Ohad Ben-Cohen <ohad@wizery.com>
> Date: Sun, 14 Oct 2012 20:16:01 +0200
> Subject: [PATCH] ARM: OMAP: don't print any error when wl12xx isn't
> configured
>
> Stop intimidating users with scary wlan error messages in case wl12xx
> support wasn't even built.
>
> In addition, when wl12xx_set_platform_data() fails, don't bother
> registering wl12xx's fixed regulator device (on the relevant
> boards).
>
> While we're at it, extract the wlan init code to a dedicated function to
> make (the relevant boards') init code look a bit nicer.
>
> Compile tested only.
Seems to work here, tested on panda es with wlan working and
on sdp with the warning gone.
> Reported-by: Russell King <linux@arm.linux.org.uk>
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Thanks applying into omap-for-v3.7-rc2/fixes-part2.
Regards,
Tony
^ permalink raw reply [flat|nested] 31+ messages in thread
end of thread, other threads:[~2012-10-25 19:03 UTC | newest]
Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 15:54 Errors at boot time from OMAP4430SDP (and a whinge about serial stuff) Russell King - ARM Linux
2012-10-12 16:24 ` Tony Lindgren
2012-10-12 16:31 ` Russell King - ARM Linux
2012-10-12 16:34 ` Benoit Cousson
2012-10-12 16:56 ` Tony Lindgren
2012-10-12 18:47 ` Kevin Hilman
2012-10-14 18:30 ` Ohad Ben-Cohen
2012-10-16 18:10 ` Tony Lindgren
2012-10-16 18:26 ` Tony Lindgren
2012-10-17 9:10 ` Ohad Ben-Cohen
2012-10-17 12:43 ` Igor Grinberg
2012-10-18 16:58 ` Ohad Ben-Cohen
2012-10-19 17:07 ` Tony Lindgren
2012-10-21 14:54 ` Ohad Ben-Cohen
2012-10-23 7:37 ` Igor Grinberg
2012-10-23 7:51 ` Ohad Ben-Cohen
2012-10-23 9:46 ` Igor Grinberg
2012-10-24 1:54 ` Tony Lindgren
2012-10-24 11:15 ` Ohad Ben-Cohen
2012-10-25 19:03 ` Tony Lindgren
2012-10-15 5:54 ` Mohammed, Afzal
2012-10-16 18:12 ` Tony Lindgren
2012-10-16 19:24 ` Benoit Cousson
2012-10-16 19:53 ` Tony Lindgren
2012-10-15 7:37 ` Péter Ujfalusi
2012-10-23 10:10 ` Russell King - ARM Linux
2012-10-25 1:09 ` Tony Lindgren
2012-10-25 16:05 ` Balaji T K
2012-10-25 17:24 ` Kevin Hilman
2012-10-25 17:38 ` Kevin Hilman
2012-10-25 17:46 ` Tony Lindgren
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).