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: 3016261 Return-Path: X-Original-To: patchwork-linux-mmc@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 EE514BF924 for ; Thu, 10 Oct 2013 14:39:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CCF242026F for ; Thu, 10 Oct 2013 14:39:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F50B202F8 for ; Thu, 10 Oct 2013 14:39:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753980Ab3JJOjO (ORCPT ); Thu, 10 Oct 2013 10:39:14 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:54298 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443Ab3JJOjO (ORCPT ); Thu, 10 Oct 2013 10:39:14 -0400 Received: by mail-pa0-f49.google.com with SMTP id ld10so2819897pab.36 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=WELVnQw5klww6uS2eQEhQoxiUHiQACzINqTvV2IIgFWLMdPkxNhArQZ+nONUK+ox1n wGqvp/MR8W60PvuKuaNN9Snc/OE+kmU9v35cSnW9J22mfgRTFfEjTsf7mPYNWoULvMs5 BuZKPwoCLf0eqxh6YY4ZlTIcwSN2fzGvY+zR++iFB65cF9LyBmo9MXOi78jgqJBvc5eP L/EDKvcVgzFa5qw5rvsEBDV0bQqqRuSgbk48DQxkdfuDSWkWSXT5+4wZoX+BHI54aRx0 vckyLSOurqbabuYWKNo73ZViiox8zO6jriPwidimREnDCarGj31oukyjOIA/3WZUyzo2 e8gw== X-Gm-Message-State: ALoCoQnAd1u08XFqQfYQGvxh9XtqzWlgPeWIYG1HSSulGhfksFRxIfEXatYghpdy45njDFlTeoIP 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 Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree-discuss@lists.ozlabs.org, Zhangfei Gao 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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); /*