From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 0/3] omap hsmmc init cleanup and section warning fixes for v3.4 merge window
Date: Fri, 17 Feb 2012 15:03:09 +0530 [thread overview]
Message-ID: <4F3E1ED5.6090305@ti.com> (raw)
In-Reply-To: <20120217091433.GL15338@n2100.arm.linux.org.uk>
[]...
>>>>> 3. Load the gpio-twl4030 module
>>>>
>>>> I was expecting this to now detect the card, but I instead got
>>>> this error which seems to tell gpio-twl4030 has problems
>>>> when built/used as a module, outside of the mmc issues.
>>>
>>> Looks like I was mislead with the errors and though the twl4030
>>> gpio probe was bailing out with errors, which its not.
>>> It does seem to go ahead, does a mmc late init which registers
>>> the mmc omap_device and hence does a platform_device_add, but the
>>> device never seem to get probed. mmc driver is built in and
>>> registered.
>>>
>>>>
>>>> # insmod gpio-twl4030.ko
>>>> [ 16.217864] twl4030_gpio twl4030_gpio: can't dispatch IRQs from modules
>>>> [ 16.242004] gpiochip_add: registered GPIOs 192 to 211 on device: twl4030
>>>>
>>>>
>>>>> 4. Remove the gpio-twl4030 module
>>>>> 5. Re-load the gpio-twl4030.ko module
>>>>>
>>>>> and report back what you get. Thanks.
>>>
>>
>> (4) and (5) are the key bits of what I was asking you to do.
>
> Okay, so that was a total waste of time and effort, because you didn't do
> what I asked.
Sorry, I did'nt repond back because I wanted to get this resolved
completely before I did.
(3) did not probe the inserted mmc device because the driver was
doing a platform_driver_probe() and not a platform_driver_register().
Once I fixed that and removed the __init from probe, I then hit a
failure with gpio_to_irq() call in the mmc driver probe.
This was beacuse the twl gpio driver does not register irqs as said by
this error at driver load...
>>>> [ 16.217864] twl4030_gpio twl4030_gpio: can't dispatch IRQs from
modules
... apparently because there is no way to unregister a irq once the
module is unloaded.
That makes sdmmc pretty much unusable if twl gpio is built as a module.
>
> Tony: I think there's a bug here - if the gpio-twl4030 module is inserted,
> removed and re-inserted, I think we'll end up creating the devices for MMC
> twice with the same name, resulting in sysfs complaining very loudly.
I still went ahead and tried (4) becasue I knew I would hit the above
issue. However I end up with a rmmod complaining 'resource temporarily
unavailable' because I see there are 3 gpio_requests, which I found
were from the .setup callback in the board file (I am using beagle).
The beagle board file does not seem to however register a .teardown
hook provided by twl4030 gpio platform_data structure to do a gpio_free.
So I am now trying to get the teardown function clean stuff up including
unregister the mmc device, which should also fix the problem with
multiple mmc device register that you reported with insmod/rmmod/insmod
sequence.
I will post patches on top of Tony's series to fix all these issues.
next prev parent reply other threads:[~2012-02-17 9:33 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-15 18:28 [PATCH 0/3] omap hsmmc init cleanup and section warning fixes for v3.4 merge window Tony Lindgren
2012-02-15 18:28 ` [PATCH 1/3] ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register} Tony Lindgren
2012-02-15 18:28 ` [PATCH 2/3] ARM: OMAP2+: Split omap2_hsmmc_init() to properly support I2C GPIO pins Tony Lindgren
2012-02-16 10:03 ` Rajendra Nayak
2012-02-16 10:13 ` Rajendra Nayak
2012-02-16 16:35 ` Tony Lindgren
2012-02-16 16:46 ` Cousson, Benoit
2012-02-16 16:51 ` Rajendra Nayak
2012-02-16 17:06 ` Tony Lindgren
2012-02-17 18:10 ` Tony Lindgren
2012-02-16 16:45 ` Tony Lindgren
2012-02-17 19:05 ` Tony Lindgren
2012-02-15 18:28 ` [PATCH 3/3] ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init Tony Lindgren
2012-02-16 10:11 ` Russell King - ARM Linux
2012-02-16 16:41 ` Tony Lindgren
2012-02-17 19:17 ` Tony Lindgren
2012-02-16 12:00 ` [PATCH 0/3] omap hsmmc init cleanup and section warning fixes for v3.4 merge window Nayak, Rajendra
2012-02-16 12:12 ` Russell King - ARM Linux
2012-02-16 12:34 ` Rajendra Nayak
2012-02-16 13:15 ` Rajendra Nayak
2012-02-16 13:51 ` Russell King - ARM Linux
2012-02-17 9:14 ` Russell King - ARM Linux
2012-02-17 9:33 ` Rajendra Nayak [this message]
2012-02-17 9:37 ` Rajendra Nayak
2012-02-17 9:59 ` Rajendra Nayak
2012-02-17 10:06 ` Russell King - ARM Linux
2012-02-17 10:18 ` Rajendra Nayak
2012-02-17 10:26 ` Rajendra Nayak
2012-02-17 21:23 ` Tony Lindgren
2012-02-17 14:24 ` Rajendra Nayak
2012-02-17 20:21 ` Tony Lindgren
2012-02-17 22:37 ` Tony Lindgren
2012-02-21 5:19 ` Rajendra Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F3E1ED5.6090305@ti.com \
--to=rnayak@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).