From patchwork Tue Apr 23 13:09:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grygorii Strashko X-Patchwork-Id: 162680 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3770078jan; Tue, 23 Apr 2019 06:09:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqzw753Lq9MjPuwKaNCdmP8HlcSNvUasrYJpcXoq6mVYIwhpeTqYm9/X0LJd3cMsgX1ePFGL X-Received: by 2002:a17:902:54c:: with SMTP id 70mr26393779plf.210.1556024983010; Tue, 23 Apr 2019 06:09:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556024983; cv=none; d=google.com; s=arc-20160816; b=weMJmNFRiZD9lGoSv+U042fUkDYE76cgpIGvGdxH4XPkAhPZMV5u9LfoZ6/k6Fp2Cm j2uAcdgoX5rrOoWgV9bqf1/k3gaCqq9ku/geMGEhFid0XvBmw8XsneUzn6SdjL60bTTC BKMcfuoACYxPUFxfJnV1a1teSKQZBNqb7jdGH+VCkv82zhwXXhWiC1V/fnqyZL3leVNd O1cTiiz7KdlQqLLkwPx/9eE2jtmulfKGfSAkJZHN1ZrPtoGXv6ItuovqfvaUEdZk0GVt P3D7JfOpWPn4VtBFhkzhto9JXA4lOu6SawOUJqiweAaq0WsocND6soZgFu0Iti2mP4e/ Fc7w== 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=VuFDkXpIsvMUWHCuA2vOkflFQotZBmogVyDUs713PuI=; b=fJJFNs8dgfkNBVzfynE/vB4ChFf/D6/38gkezjngKhH2pMd+oE9UKWDjOQIMO46yvM 9D7DhAIlPHJK+ErZzxfa3ev03Tu22VvB+AIKVm4fGUDivT7vNpH8Nwr1st+v3whATaHV nIyZFnrwwqBtY4jbt37rlYIev3unGxJMyFOqXxTkrtoIKqYqzMmK72tNDF7DiFzZ9O6t PWDlzm0aqHZHaaFJZBALOYtrs6vo2xkL11Lv46bq8H/e6lv5W9VEt/oUgeGKfHKqfNaP yAF0Gc1BVtxlwXd33MCg919VGDxquRYYwBKIF+/B7PH99C6C9co3BEFwlve0IoOUs17W JVYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=mOpsDCbW; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 131si17049666pfw.131.2019.04.23.06.09.42; Tue, 23 Apr 2019 06:09:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=mOpsDCbW; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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 S1727958AbfDWNJm (ORCPT + 9 others); Tue, 23 Apr 2019 09:09:42 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:50022 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727907AbfDWNJj (ORCPT ); Tue, 23 Apr 2019 09:09:39 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x3ND9Z8u023178; Tue, 23 Apr 2019 08:09:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1556024975; bh=VuFDkXpIsvMUWHCuA2vOkflFQotZBmogVyDUs713PuI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=mOpsDCbWO733/34qA7VHFogEn2nDuJHmrHTLUd8mStCo9nBNSF0w1we1xcKrP4ItP 30vZdrCMqI47sV+w+Eod/0V3d4czGIypyRaLJXNIkOzrU9a5xNgDS5s9L+pjNhTSVl cDG8aobn5fmri3saqx5p/JFny+9+bRYnWWe91D7w= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x3ND9ZO4126219 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 Apr 2019 08:09:35 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 23 Apr 2019 08:09:35 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE105.ent.ti.com (157.170.170.35) 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; Tue, 23 Apr 2019 08:09:34 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x3ND9YTA085843; Tue, 23 Apr 2019 08:09:35 -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 13/19] net: ethernet: ti: davinci_mdio: use devm_ioremap() Date: Tue, 23 Apr 2019 16:09:04 +0300 Message-ID: <1556024950-20752-14-git-send-email-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556024950-20752-1-git-send-email-grygorii.strashko@ti.com> References: <1556024950-20752-1-git-send-email-grygorii.strashko@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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 309dddf4a6f4..741770abd73a 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);