From patchwork Thu Oct 10 14:36:52 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhangfei Gao X-Patchwork-Id: 3016281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1FFB2BF924 for ; Thu, 10 Oct 2013 14:40:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EB44C2026F for ; Thu, 10 Oct 2013 14:40:16 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 243ED20254 for ; Thu, 10 Oct 2013 14:40:12 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHP6-0002Dm-I9; Thu, 10 Oct 2013 14:39:52 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHP0-00080e-LD; Thu, 10 Oct 2013 14:39:46 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VUHOp-0007yW-7p for linux-arm-kernel@lists.infradead.org; Thu, 10 Oct 2013 14:39:36 +0000 Received: by mail-pd0-f181.google.com with SMTP id g10so2693185pdj.40 for ; Thu, 10 Oct 2013 07:39:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PPHR7TqwREpopvXbwL+nnkaYhq6ZeMgxlbqv2pygOQo=; b=kweONrMHV5EsEMr56th5ab3YwL9i4kn3KcTDtJF2V5xhuQKjrCui03VrhV11mmOc/w xCaibXvw/osaZTgoF4JrlTen7dA+96/rDuihdypBzEUPutXeFjt/hZNHaRrfLolKAaU/ j9lbcA+uApZbLvFIFmaBLgl/RSotmt7/9gu8NeB1ypwmqQmdG0w5dYHG7tnIgJYWCCRi NXUIW3EEMbBStAwIQHS8KPCbO+KKpUaf5aEKm7Jvte0B0Bvp+2YVlSHGQn6j4XPwv7iT Hdl1u7cqUNeV7PihScLOupxfzh+2qm6/y+zLtB3kylTCaEBNATpMLq3oWRMDNiLtQWwk ZP2Q== X-Gm-Message-State: ALoCoQkeHiKeDDxuj9AY1Xhf47M+l1eQCv0w4owwHPNDnkz6J0PCOJDP+bHlfhq5gwv0h35HQbyG X-Received: by 10.68.90.129 with SMTP id bw1mr14172607pbb.111.1381415953704; Thu, 10 Oct 2013 07:39:13 -0700 (PDT) Received: from localhost.localdomain ([101.71.243.138]) by mx.google.com with ESMTPSA id dq3sm53578767pbc.35.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:39:13 -0700 (PDT) From: Zhangfei Gao To: Chris Ball , Jaehoon Chung , Ulf Hansson Subject: [PATCH 1/2] mmc: dw_mmc: change definition of get_cd Date: Thu, 10 Oct 2013 22:36:52 +0800 Message-Id: <1381415813-9395-2-git-send-email-zhangfei.gao@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1381415813-9395-1-git-send-email-zhangfei.gao@linaro.org> References: <1381415813-9395-1-git-send-email-zhangfei.gao@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131010_103935_419371_717F65FE X-CRM114-Status: GOOD ( 11.96 ) X-Spam-Score: -1.9 (-) Cc: Zhangfei Gao , devicetree-discuss@lists.ozlabs.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP int (*get_cd)(struct dw_mci *host, u32 slot_id) Add host info to pass priv, where contains cd pin Signed-off-by: Zhangfei Gao --- drivers/mmc/host/dw_mmc.c | 2 +- include/linux/mmc/dw_mmc.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 018f365..97ec3d3 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -877,7 +877,7 @@ static int dw_mci_get_cd(struct mmc_host *mmc) if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) present = 1; else if (brd->get_cd) - present = !brd->get_cd(slot->id); + present = !brd->get_cd(slot->host, slot->id); else present = (mci_readl(slot->host, CDETECT) & (1 << slot->id)) == 0 ? 1 : 0; diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 198f0fa..5a359dc 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -246,7 +246,7 @@ struct dw_mci_board { int (*init)(u32 slot_id, irq_handler_t , void *); int (*get_ro)(u32 slot_id); - int (*get_cd)(u32 slot_id); + int (*get_cd)(struct dw_mci *host, u32 slot_id); int (*get_ocr)(u32 slot_id); int (*get_bus_wd)(u32 slot_id); /*