From patchwork Tue Oct 23 07:01:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huang Changming-R66093 X-Patchwork-Id: 1629071 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED4F93FC1A for ; Tue, 23 Oct 2012 07:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756689Ab2JWHm1 (ORCPT ); Tue, 23 Oct 2012 03:42:27 -0400 Received: from co1ehsobe003.messaging.microsoft.com ([216.32.180.186]:27213 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752355Ab2JWHm0 (ORCPT ); Tue, 23 Oct 2012 03:42:26 -0400 Received: from mail196-co1-R.bigfish.com (10.243.78.226) by CO1EHSOBE002.bigfish.com (10.243.66.65) with Microsoft SMTP Server id 14.1.225.23; Tue, 23 Oct 2012 07:42:25 +0000 Received: from mail196-co1 (localhost [127.0.0.1]) by mail196-co1-R.bigfish.com (Postfix) with ESMTP id EA14938008E; Tue, 23 Oct 2012 07:42:25 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 0 X-BigFish: VS0(zzzz1202h1d1ah1d2ahzz8275bh8275dhz2dh2a8h668h839hd24he5bhf0ah107ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1155h) Received: from mail196-co1 (localhost.localdomain [127.0.0.1]) by mail196-co1 (MessageSwitch) id 1350978144225447_9247; Tue, 23 Oct 2012 07:42:24 +0000 (UTC) Received: from CO1EHSMHS021.bigfish.com (unknown [10.243.78.239]) by mail196-co1.bigfish.com (Postfix) with ESMTP id 3519B100064; Tue, 23 Oct 2012 07:42:24 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by CO1EHSMHS021.bigfish.com (10.243.66.31) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 23 Oct 2012 07:42:24 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server (TLS) id 14.2.318.3; Tue, 23 Oct 2012 07:42:22 +0000 Received: from localhost (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id q9N7gKt3002502; Tue, 23 Oct 2012 00:42:21 -0700 From: To: CC: Jerry Huang , Anton Vorontsov , Chris Ball Subject: [PATCH] powerpc/esdhc: enable the card insert/remove interrupt Date: Tue, 23 Oct 2012 15:01:17 +0800 Message-ID: <1350975677-8195-1-git-send-email-r66093@freescale.com> X-Mailer: git-send-email 1.6.4 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Jerry Huang The current eSDHC driver use the poll mode to detect if the SD/MMC card is inserted or removed, which will generate many interrupts and impact the performance. Therefore, change the default card detect to interrupt mode, if the board can't support this mode, we still use the poll mode. Signed-off-by: Jerry Huang CC: Anton Vorontsov CC: Chris Ball --- drivers/mmc/host/sdhci-of-esdhc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c index ffc1226..5dc362f 100644 --- a/drivers/mmc/host/sdhci-of-esdhc.c +++ b/drivers/mmc/host/sdhci-of-esdhc.c @@ -196,6 +196,11 @@ static void esdhc_of_detect_limitation(struct platform_device *pdev, if (vvn == VENDOR_V_22) pdata->quirks2 |= SDHCI_QUIRK2_HOST_NO_CMD23; + /* P4080DS and MPC837XMDS board don't support interrupt mode */ + if (of_machine_is_compatible("fsl,mpc837xmds") || + of_machine_is_compatible("fsl,P4080DS")) + pdata->quirks |= SDHCI_QUIRK_BROKEN_CARD_DETECTION; + iounmap(ioaddr); end: return; @@ -223,7 +228,7 @@ static struct sdhci_pltfm_data sdhci_esdhc_pdata = { * card detection could be handled via GPIO * eSDHC cannot support End Attribute in NOP ADMA descriptor */ - .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_BROKEN_CARD_DETECTION + .quirks = ESDHC_DEFAULT_QUIRKS | SDHCI_QUIRK_NO_CARD_NO_RESET | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, .ops = &sdhci_esdhc_ops,