From patchwork Tue Feb 3 16:28:56 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Brownell X-Patchwork-Id: 5251 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n13GT0sI020441 for ; Tue, 3 Feb 2009 16:29:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751761AbZBCQ27 (ORCPT ); Tue, 3 Feb 2009 11:28:59 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751798AbZBCQ27 (ORCPT ); Tue, 3 Feb 2009 11:28:59 -0500 Received: from smtp115.sbc.mail.sp1.yahoo.com ([69.147.64.88]:27388 "HELO smtp115.sbc.mail.sp1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751761AbZBCQ27 (ORCPT ); Tue, 3 Feb 2009 11:28:59 -0500 Received: (qmail 41990 invoked from network); 3 Feb 2009 16:28:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=pacbell.net; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:From:To:Subject:Date:User-Agent:Cc:References:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-Disposition:Message-Id; b=Lr+Wk9hXGEcP0d1Umjo89tKM0CQC1lAKp3sDnckEijx9vH/D5DcFwkpwRPi+Kch/j5em8YozVkNdq4RW/GvzxxSTs8uRN1Tw0QSnmpPuAcCsdneI7MJqj5+B/oCm5FOluZ5fdwgLvons5a9QroYDb+iFT9bC8+QqUv1GcUnmx+w= ; Received: from unknown (HELO pogo) (david-b@69.226.224.20 with plain) by smtp115.sbc.mail.sp1.yahoo.com with SMTP; 3 Feb 2009 16:28:57 -0000 X-YMail-OSG: X34j0XkVM1nJeIWfYHfzjBjnwYTNqMnQu1HBz1U8AleL6el37NiP5UHIt5AGA0ayes6g6jaAIEiLBUqQmcyDPelTKK1wv7xILYpA.iCQVhwMq8EQchbvRQo9YXg8oohKmcHP2XJwn2TSBVjUIs8pjA6WiU.A37xscqdZV4fJxh7UgK7Vkd603zJ2krdwh..3WQopwTbBdt0E6CxKtcakI.19f.lNGxrW9jhgOQ-- X-Yahoo-Newman-Property: ymail-3 From: David Brownell To: "kishore kadiyala" Subject: Re: hotplug problem in MMC due to GPIOlib Date: Tue, 3 Feb 2009 08:28:56 -0800 User-Agent: KMail/1.9.10 Cc: linux-omap@vger.kernel.org References: <003201c985f0$05f94fc0$LocalHost@wipultra796> In-Reply-To: <003201c985f0$05f94fc0$LocalHost@wipultra796> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200902030828.56827.david-b@pacbell.net> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org On Tuesday 03 February 2009, kishore kadiyala wrote: > Hi , > > On 3430 SDP , the MMC card insertion and removal is not working on the linux -omap tree ! > It seems like interrupts are not getting triggered on Card insertion & removal ! > > I wonder if it has to do something with GPIO library ! > Also whether the GPIO library takes care of the requests to TWL4030 ? I wonder if the patch I sent several weeks ago solves the bug for you like it did for me ... fix worked on the sdp. This gets resent soonish for mainline inclusion. - Dave --- 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 =========== CUT HERE From: David Brownell Work around lockdep issue when card detect IRQ handlers run in thread context ... it forces IRQF_DISABLED, which prevents all access to twl4030 card detect signals. Signed-off-by: David Brownell --- drivers/mmc/host/omap_hsmmc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -568,6 +568,9 @@ static void mmc_omap_detect(struct work_ { struct mmc_omap_host *host = container_of(work, struct mmc_omap_host, mmc_carddetect_work); + struct omap_mmc_slot_data *slot = &mmc_slot(host); + + host->carddetect = slot->card_detect(slot->card_detect_irq); sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch"); mmc_omap_fclk_state(host, ON); @@ -591,7 +594,6 @@ static irqreturn_t omap_mmc_cd_handler(i { struct mmc_omap_host *host = (struct mmc_omap_host *)dev_id; - host->carddetect = mmc_slot(host).card_detect(irq); schedule_work(&host->mmc_carddetect_work); return IRQ_HANDLED;