Message ID | 1556024950-20752-14-git-send-email-grygorii.strashko@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-omap-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 28B7A1515 for <patchwork-linux-omap@patchwork.kernel.org>; Tue, 23 Apr 2019 13:10:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BA3428715 for <patchwork-linux-omap@patchwork.kernel.org>; Tue, 23 Apr 2019 13:10:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1008828896; Tue, 23 Apr 2019 13:10:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 A9FEB2873A for <patchwork-linux-omap@patchwork.kernel.org>; Tue, 23 Apr 2019 13:10:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727943AbfDWNJk (ORCPT <rfc822;patchwork-linux-omap@patchwork.kernel.org>); Tue, 23 Apr 2019 09:09:40 -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 <rfc822;linux-omap@vger.kernel.org>); 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 <grygorii.strashko@ti.com> To: <netdev@vger.kernel.org>, Ilias Apalodimas <ilias.apalodimas@linaro.org>, "David S . Miller" <davem@davemloft.net>, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> CC: Florian Fainelli <f.fainelli@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Sekhar Nori <nsekhar@ti.com>, <linux-kernel@vger.kernel.org>, <linux-omap@vger.kernel.org>, Murali Karicheri <m-karicheri2@ti.com>, Grygorii Strashko <grygorii.strashko@ti.com> 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 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: <linux-omap.vger.kernel.org> X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
net: ethernet: ti: clean up and optimizations
|
expand
|
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);
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 <grygorii.strashko@ti.com> --- drivers/net/ethernet/ti/davinci_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)