From patchwork Fri Apr 26 17:12:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 162933 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp992151jan; Fri, 26 Apr 2019 10:13:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyItzb2wbrfHzFA2VI7M1y/3YvJFWY/BoDyyga78+sqYC2C4ndOyrzc6iQW+C2tDgmpTUUl X-Received: by 2002:a17:902:aa83:: with SMTP id d3mr4784303plr.108.1556298800481; Fri, 26 Apr 2019 10:13:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556298800; cv=none; d=google.com; s=arc-20160816; b=o02Yd0Ljk4S5AT8rvxcMOUWsvnYsbki78NDcPpeqflWW7V+iWFkQ8SKR4i8j2iJmPL IF+qt+DqqEZl2Hob+8pE7odq+VDqpt7Ek3A+3gRZNkBWq/VckTmIxJx79tkRnp/ccNiJ zxUPFrfxCOsS5Vzr0Dwms2VTATil9M3qq8qjqcZIdV8O0MVZC/ndFjMtAnE0NqrM+/68 xqGXkYQoArF/sUvOmC4n7AJ/135LVqYDuY0y8cPmvVwuQRvb8OHvY83Y7vPDrH6YaYOy J/eHMIMjAHpVQo+0bCoCAsoUGJaa88SO4Qy8cHuietRajlA/fFbe3Gd/vN7WWjVRYl+H nfMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=XhNtV44sYHgWIKEbTrlTAP9ushUPRnntmrv/oD3Vi78=; b=EYyMg1YiATIL2EKA3pG63r+5JQTzMbtVu0BV0tu6HG6cevfmWPF/VjLo/tAgvGt96S cfMP+uSHdDdYkJXfl+53UiD2dURqE1XIKnwT0kKLPO+MISysoZGfbYxs9YFnXj29GPnY TLDfLxXDqCezVAR2+hBUi9PmIJ13u2zG93kb49wWwKFSP02v++Jp/udXdldURDK1bNgu JgwL7WSJwlTxC/VHQ/xHHvMmLvOak3xOTreso0rQtN57KQryIn52DoaSThUHY2WLzNFU S4MrDV6Iv2U6HgcUQZTYWrqspbKSmUMaN+XZYe8UTUOgFbJ2gH29//iPMOhBjZDH0MSV e9lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uo1MV7oT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i8si25901748pfd.275.2019.04.26.10.13.20; Fri, 26 Apr 2019 10:13:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=uo1MV7oT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726353AbfDZRNT (ORCPT + 30 others); Fri, 26 Apr 2019 13:13:19 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:36800 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbfDZRNP (ORCPT ); Fri, 26 Apr 2019 13:13:15 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3QHDA3E079313; Fri, 26 Apr 2019 12:13:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556298790; bh=XhNtV44sYHgWIKEbTrlTAP9ushUPRnntmrv/oD3Vi78=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=uo1MV7oT7qAgf2GbQESB7+VJLppALAiJdr92O6yh4KR5l/laq6JRjazWg3vIOyHpL GdhhoOuS5pXa0YcSD39+F2zJHDIjx36Uu2hWfEdH/27gE7BCwm4TJa+MnchrZ6TKXR VcJIQBumEoOFyZHbJZOFwyruj2xz1b7YSk9ahWr4= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3QHDA9w030460 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 26 Apr 2019 12:13:10 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 26 Apr 2019 12:13:10 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 26 Apr 2019 12:13:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3QHD9rp114406; Fri, 26 Apr 2019 12:13:09 -0500 From: Grygorii Strashko To: , Ilias Apalodimas , "David S . Miller" , Ivan Khoronzhuk CC: Florian Fainelli , Andrew Lunn , Sekhar Nori , , , Murali Karicheri , Grygorii Strashko Subject: [PATCH net-next v2 13/20] net: ethernet: ti: davinci_mdio: use devm_ioremap() Date: Fri, 26 Apr 2019 20:12:35 +0300 Message-ID: <1556298762-8632-14-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556298762-8632-1-git-send-email-grygorii.strashko@ti.com> References: <1556298762-8632-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Davinci MDIO in most of the case implemented as module inside of TI CPSW subsystem and fully depends on CPSW to be enabled, but historically it's implemented as separate Platform device/driver and defined in DT files in two ways: - as standalone node - as child node of CPSW subsystem. In later case it's required to split CPSW subsystem "reg" property to exclude MDIO I/O range which is not useful. Hence, replace devm_ioremap_resource() with devm_ioremap() to allow define full I/O range in parent CPSW subsystem without spliting. Signed-off-by: Grygorii Strashko --- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c index edb46fcdaddc..11642721c123 100644 --- a/drivers/net/ethernet/ti/davinci_mdio.c +++ b/drivers/net/ethernet/ti/davinci_mdio.c @@ -397,7 +397,7 @@ static int davinci_mdio_probe(struct platform_device *pdev) data->dev = dev; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - data->regs = devm_ioremap_resource(dev, res); + data->regs = devm_ioremap(dev, res->start, resource_size(res)); if (IS_ERR(data->regs)) return PTR_ERR(data->regs);