From patchwork Fri Feb 1 21:01:18 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Porter X-Patchwork-Id: 2083141 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 0F684DF264 for ; Fri, 1 Feb 2013 21:01:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757533Ab3BAVBR (ORCPT ); Fri, 1 Feb 2013 16:01:17 -0500 Received: from mail-ia0-f176.google.com ([209.85.210.176]:59847 "EHLO mail-ia0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757534Ab3BAVAt (ORCPT ); Fri, 1 Feb 2013 16:00:49 -0500 Received: by mail-ia0-f176.google.com with SMTP id i18so5898321iac.21 for ; Fri, 01 Feb 2013 13:00:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=i7Bn9LovNrfZpAaI4940opi8w1/PGEEvaAUoUid2RlU=; b=bkNz3h+hzJZ3YgJAvHOZF78p2nWLTZJNDhdSGNQU9GABX3nYAY1DQkj4s18HuVYETR 1xdbdLJrgWpNPN2LjTg+h+V6W5VSCgWvIchkSYHMZNaddh2kHV2pBjYfNTuU6NDF47pu 3CJGNnUdDrWFsXvz6r3KGrfNyfNM+Tt1b9IgD9fON/epCZp3NZYqyGeHyx8mao8gFju6 s3KgllSwIOCbBji0O5Vrz77tXL62Yh+JLlT8EbTdpM8qabgJKULZvlzXdtwkYLziNxmM BR4fT3add+BRaADduaczAqOEjwhEXO4Q6FLT/707jTKe+SXYAzd1clDbjMYiEn+rCNAJ tCQg== X-Received: by 10.42.102.71 with SMTP id h7mr10427374ico.44.1359752448186; Fri, 01 Feb 2013 13:00:48 -0800 (PST) Received: from beef.ohporter.com (cpe-24-166-64-7.neo.res.rr.com. [24.166.64.7]) by mx.google.com with ESMTPS id eg7sm3728002igc.7.2013.02.01.13.00.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 01 Feb 2013 13:00:47 -0800 (PST) From: Matt Porter To: Venkatraman S , Chris Ball , Grant Likely , Rob Herring Cc: Vinod Koul , Tony Lindgren , Devicetree Discuss , Linux OMAP List , Linux Kernel Mailing List , Linux MMC List , Arnd Bergmann , Dan Williams , Jon Hunter , Santosh Shilimkar Subject: [PATCH 2/3] mmc: omap_hsmmc: Skip platform_get_resource_byname() for dt case Date: Fri, 1 Feb 2013 16:01:18 -0500 Message-Id: <1359752479-29427-3-git-send-email-mporter@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1359752479-29427-1-git-send-email-mporter@ti.com> References: <1359752479-29427-1-git-send-email-mporter@ti.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Santosh Shilimkar MMC driver probe will abort for DT case because of failed platform_get_resource_byname() lookup. Fix it by skipping resource byname lookup for device tree build. Issue is hidden because hwmod popullates the IO resources which helps to succeed platform_get_resource_byname() and probe. Signed-off-by: Santosh Shilimkar --- drivers/mmc/host/omap_hsmmc.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e79b12d..8ae1225 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1896,21 +1896,23 @@ static int omap_hsmmc_probe(struct platform_device *pdev) omap_hsmmc_conf_bus_power(host); - res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); - if (!res) { - dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); - ret = -ENXIO; - goto err_irq; - } - tx_req = res->start; + if (!pdev->dev.of_node) { + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx"); + if (!res) { + dev_err(mmc_dev(host->mmc), "cannot get DMA TX channel\n"); + ret = -ENXIO; + goto err_irq; + } + tx_req = res->start; - res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); - if (!res) { - dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); - ret = -ENXIO; - goto err_irq; + res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx"); + if (!res) { + dev_err(mmc_dev(host->mmc), "cannot get DMA RX channel\n"); + ret = -ENXIO; + goto err_irq; + } + rx_req = res->start; } - rx_req = res->start; dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask);