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: 20939 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D602A2611D for ; Thu, 10 Oct 2013 14:39:15 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf11104679obc.7 for ; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=PPHR7TqwREpopvXbwL+nnkaYhq6ZeMgxlbqv2pygOQo=; b=WZxprgCla8xtKJaituresQxXUrdXh+USPpxklGi1QNbJBogXxbUsOhlgmqnL/H/NXG qt0ow/1QxRkQaMns11HDCGXdZuqo/dXwoTuAeG/m688kVaRNgCsYnr1rIyOWFHEaftGM jS2aMdtimr8lacgZI+oyUpoLY9sZtG5rYxJAeFHfsUJXfijbv6iP69tSdPCCOS+LjnYJ S95zgPiMiqCWFgPH9TjM9zPL0WcYLlH391FATtXlG+f2kJDx/TAgV7/20wAU7zwqqUvX bXoSStGmA8Fve6uG1gUgfPTRTkt8YksBeSKNN8KxY7AlWmgRre6VPbOwLBCuAf9gNT3t r82Q== X-Received: by 10.43.65.81 with SMTP id xl17mr6508483icb.29.1381415955428; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.105.34 with SMTP id gj2ls1083586qeb.52.gmail; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) X-Received: by 10.52.34.109 with SMTP id y13mr12128175vdi.8.1381415955271; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) Received: from mail-vb0-f52.google.com (mail-vb0-f52.google.com [209.85.212.52]) by mx.google.com with ESMTPS id uy8si14364841vcb.55.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:39:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.52; Received: by mail-vb0-f52.google.com with SMTP id f12so1696414vbg.11 for ; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) X-Gm-Message-State: ALoCoQm6U7B6xapvxHjhT7PlyJH+6X+GEYLACUaNaIyX8lANCFnYHzeemV0owJLuz3mI17dMXEY9 X-Received: by 10.221.47.193 with SMTP id ut1mr14280279vcb.8.1381415955177; Thu, 10 Oct 2013 07:39:15 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp381030vcz; Thu, 10 Oct 2013 07:39:14 -0700 (PDT) X-Received: by 10.68.223.161 with SMTP id qv1mr14448035pbc.79.1381415954272; Thu, 10 Oct 2013 07:39:14 -0700 (PDT) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id bc2si18273918pad.42.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:39:14 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of zhangfei.gao@linaro.org) client-ip=209.85.220.49; Received: by mail-pa0-f49.google.com with SMTP id ld10so2809454pab.22 for ; Thu, 10 Oct 2013 07:39:13 -0700 (PDT) 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> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: zhangfei.gao@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.52 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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); /*