From patchwork Mon May 12 11:14:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 4158571 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4E7F39F3AE for ; Mon, 12 May 2014 11:14:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8DB5A2026C for ; Mon, 12 May 2014 11:14:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A7071202BE for ; Mon, 12 May 2014 11:14:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754647AbaELLOl (ORCPT ); Mon, 12 May 2014 07:14:41 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:43656 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754821AbaELLOk (ORCPT ); Mon, 12 May 2014 07:14:40 -0400 Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout4.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5G00INMKKFQ980@mailout4.samsung.com> for linux-mmc@vger.kernel.org; Mon, 12 May 2014 20:14:39 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.113]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id 18.A7.11496.51DA0735; Mon, 12 May 2014 20:14:38 +0900 (KST) X-AuditID: cbfee691-b7f3e6d000002ce8-73-5370ad15a4bb Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 90.80.27725.51DA0735; Mon, 12 May 2014 20:14:29 +0900 (KST) Received: from localhost.localdomain ([10.252.81.186]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N5G00FNEKJVNB30@mmp2.samsung.com>; Mon, 12 May 2014 20:14:29 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: chris@printf.net, ulf.hansson@linaro.org, tgih.jun@samsung.com, zhangfei.gao@linaro.org, dinguyen@altera.com, Jaehoon Chung Subject: [PATCH 4/5] mmc: dw_mmc: add the specified capbilities2 of controller. Date: Mon, 12 May 2014 20:14:15 +0900 Message-id: <1399893256-7071-5-git-send-email-jh80.chung@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1399893256-7071-1-git-send-email-jh80.chung@samsung.com> References: <1399893256-7071-1-git-send-email-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrKLMWRmVeSWpSXmKPExsWyRsSkUFdubUGwwfYFRhYTLm9ntDh+aTGz xY1fbawWR/73M1p8uH+R2eL42nCLm2susDuwe7TuncDmcefaHjaPG68WMnn0bVnF6PF5k1wA axSXTUpqTmZZapG+XQJXxpdzN5kLjvBUnO08xt7AuJuri5GTQ0LAROLg60ZmCFtM4sK99Wxd jFwcQgJLGSUWtO9mgynq3bKaGSIxnVGiceEnVginjUniwpS/rCBVbAI6Etu/HWcCsUUEZCV+ /rkANopZYA6jxI9ZfUDtHBzCAv4Sq86IgtSwCKhKPLg2mRHE5hVwlVi+6zUTSImEgILEnEk2 IGFOATeJ+TNngo0XAip58Xc/C8hICYF57BJfnn5ngpgjIPFt8iEWiF5ZiU0HoL6RlDi44gbL BEbhBYwMqxhFUwuSC4qT0otM9YoTc4tL89L1kvNzNzECg/z0v2cTdzDeP2B9iDEZaNxEZinR 5HxglOSVxBsamxlZmJqYGhuZW5qRJqwkzpv+KClISCA9sSQ1OzW1ILUovqg0J7X4ECMTB6dU A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DgRAN5td6Tl AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 To use capabilities2, add the caps2 into dw_mci_drv_data. Signed-off-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 3 +++ drivers/mmc/host/dw_mmc.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 75d7d4e..e0e933d 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2088,6 +2088,9 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (host->pdata->caps2) mmc->caps2 = host->pdata->caps2; + if (drv_data && drv_data->caps2) + mmc->caps2 |= drv_data->caps2[ctrl_id]; + mmc_of_parse(mmc); if (host->pdata->blk_settings) { diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index 738fa24..5541946c 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -237,6 +237,7 @@ struct dw_mci_tuning_data { /** * dw_mci driver data - dw-mshc implementation specific driver data. * @caps: mmc subsystem specified capabilities of the controller(s). + * @caps2: mmc subsystem specified capabilities2 of the controller(s). * @init: early implementation specific initialization. * @setup_clock: implementation specific clock configuration. * @prepare_command: handle CMD register extensions. @@ -250,6 +251,7 @@ struct dw_mci_tuning_data { */ struct dw_mci_drv_data { unsigned long *caps; + unsigned long *caps2; int (*init)(struct dw_mci *host); int (*setup_clock)(struct dw_mci *host); void (*prepare_command)(struct dw_mci *host, u32 *cmdr);