From patchwork Fri May 26 20:21:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 9751259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3A45E6032C for ; Sat, 27 May 2017 01:10:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27BBA28506 for ; Sat, 27 May 2017 01:10:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 25CDB28501; Sat, 27 May 2017 01:10:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AC99285D9 for ; Sat, 27 May 2017 01:10:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752385AbdE0BKP (ORCPT ); Fri, 26 May 2017 21:10:15 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:63108 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S944893AbdEZUXY (ORCPT ); Fri, 26 May 2017 16:23:24 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4QKLrpP017179; Fri, 26 May 2017 15:21:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1495830113; bh=jkJ5joqNdNXMeWqZPIsK9JQh9dv3hhi+YBwLBbmgXzA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Xjw18I+6h6G8WCOZmlf7Jk3TabfRJU6F8pBDJBVxogjoHVBztLrgdSz1UML70tHeA N2+D7fmE18QXsAtqBsRtVNaB+UVCqSuppDbaBogdi9lL+vsrsO9/uohUvAw0LhxoEp wuTS55M5haVZ78ubCvlHui2l3seX8D4sWU8VZrE0= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4QKLmpZ003958; Fri, 26 May 2017 15:21:48 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Fri, 26 May 2017 15:21:47 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4QKLlrG027639; Fri, 26 May 2017 15:21:47 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.167]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v4QKLl327277; Fri, 26 May 2017 15:21:47 -0500 (CDT) From: Suman Anna To: Bjorn Andersson , Ohad Ben-Cohen , Rob Herring CC: Mark Rutland , , , Sekhar Nori , Robert Tivy , , , Suman Anna Subject: [PATCH 1/4] remoteproc/davinci: Switch to platform_get_resource_byname() Date: Fri, 26 May 2017 15:21:37 -0500 Message-ID: <20170526202140.10472-2-s-anna@ti.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170526202140.10472-1-s-anna@ti.com> References: <20170526202140.10472-1-s-anna@ti.com> MIME-Version: 1.0 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The davinci remoteproc driver currently uses the platform_get_resource() API for retrieving the IOMEM resources. Switch this function to use the platform_get_resource_byname() API instead in preparation for adding the DT support so that the binding can be agnostic of the IOMEM resource order. Signed-off-by: Suman Anna --- drivers/remoteproc/da8xx_remoteproc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/da8xx_remoteproc.c b/drivers/remoteproc/da8xx_remoteproc.c index c7ad818f7a48..0919176b52c1 100644 --- a/drivers/remoteproc/da8xx_remoteproc.c +++ b/drivers/remoteproc/da8xx_remoteproc.c @@ -195,12 +195,14 @@ static int da8xx_rproc_probe(struct platform_device *pdev) return -EINVAL; } - bootreg_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + bootreg_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "host1cfg"); bootreg = devm_ioremap_resource(dev, bootreg_res); if (IS_ERR(bootreg)) return PTR_ERR(bootreg); - chipsig_res = platform_get_resource(pdev, IORESOURCE_MEM, 1); + chipsig_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "chipsig"); chipsig = devm_ioremap_resource(dev, chipsig_res); if (IS_ERR(chipsig)) return PTR_ERR(chipsig);