From patchwork Wed Aug 14 20:40:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 2844785 Return-Path: X-Original-To: patchwork-linux-arm@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 133309F2F4 for ; Wed, 14 Aug 2013 20:40:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3DD2420729 for ; Wed, 14 Aug 2013 20:40:55 +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 49BF120728 for ; Wed, 14 Aug 2013 20:40:54 +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 1V9hsB-0002fs-Gj; Wed, 14 Aug 2013 20:40:51 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9hs9-0005TN-1w; Wed, 14 Aug 2013 20:40:49 +0000 Received: from svenfoo.org ([82.94.215.22] helo=mail.zonque.de) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V9hs5-0005SW-Sn for linux-arm-kernel@lists.infradead.org; Wed, 14 Aug 2013 20:40:46 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.zonque.de (Postfix) with ESMTP id 4467AC1601; Wed, 14 Aug 2013 22:40:22 +0200 (CEST) Received: from mail.zonque.de ([127.0.0.1]) by localhost (rambrand.bugwerft.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J1vyvTPVXXsI; Wed, 14 Aug 2013 22:40:22 +0200 (CEST) Received: from tamtam.fritz.box (p5DDC6E31.dip0.t-ipconnect.de [93.220.110.49]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.zonque.de (Postfix) with ESMTPSA id AC6E7C13FE; Wed, 14 Aug 2013 22:40:21 +0200 (CEST) From: Daniel Mack To: balajitk@ti.com, linux-mmc@vger.kernel.org Subject: [PATCH] mmc: omap_hsmmc: get capabilities from DT Date: Wed, 14 Aug 2013 22:40:13 +0200 Message-Id: <1376512813-27892-1-git-send-email-zonque@gmail.com> X-Mailer: git-send-email 1.8.3.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130814_164046_036184_411AB4AF X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.3 (/) Cc: cjb@laptop.org, linux-arm-kernel@lists.infradead.org, Daniel Mack 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=-7.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,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 When used in DT mode, the omap hsmmc driver has to take capabilites given in DT by calling mmc_of_parse(). Signed-off-by: Daniel Mack --- drivers/mmc/host/omap_hsmmc.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 1865321..31337c1 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1907,7 +1907,15 @@ static int omap_hsmmc_probe(struct platform_device *pdev) if (mmc_slot(host).nonremovable) mmc->caps |= MMC_CAP_NONREMOVABLE; - mmc->pm_caps = mmc_slot(host).pm_caps; + if (pdev->dev.of_node) { + ret = mmc_of_parse(mmc); + if (ret < 0) { + dev_err(&pdev->dev, "mmc_of_parse() failed: %d\n", ret); + goto err_irq; + } + } else { + mmc->pm_caps = mmc_slot(host).pm_caps; + } omap_hsmmc_conf_bus_power(host);