Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp7009342pxb; Wed, 17 Feb 2021 21:39:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7KYF0lbOddbf2BhBd3cFjghPE5jgiJixeIklHxfTljnah0soHnF7gufRThSMLbXTDOGDi X-Received: by 2002:a05:6402:1641:: with SMTP id s1mr2367517edx.272.1613626777059; Wed, 17 Feb 2021 21:39:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613626777; cv=pass; d=google.com; s=arc-20160816; b=cuiM8AUhWKV3XzZK4bTX7a9KFw/P6VFXaiJim/opKfjkfC4hIpe9ujUCPNepk7fcPb jHEu8VCfWMOm8TL7Lb8Jo71eWcjMuXLqE+2TGBrlbt+yckMENptKdpVB+C4SH+WX+3ad yygN1gzce6VEKNP3xdHLIDD6KYufWY2SFmKWxWGF4hBszd7t1aErtI05vQsLBoYurooO RA9g/hiZzPJg73cR20yQUlbC022bqEqg5WUB40u47L+49C6XpFoiu+Pq8QH8tZb/z6Ce MdgVd2XIKV5uil5efLGUfj4kzY3zGE1vUR6bJF5Yuci2DoNfX4bwMwDLKlLdLj5Ne4Ps MQ8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=iN8dWrUpI69gm2uQRF7UqhxjIe9OOLdydPVAMK6H8Ds=; b=NUY8IH9cJU7nJUJa+1LGMdgbjV+VJ/f3GNOzQi++mgZK2f91U5rYPkr2eckLlsS9u/ tl7sQNZvnB/FOPIBK9X/5FhrjRUI23ozaHzN15A7fhIHT4iLg/lmsKsp2p68AiDqX19h tNIm65VuhozetA/ukoifuGjaz7ldca62OpZopWJSwPLkh8YJgt33EwXrk5HzBMlnzXfB 4F2iMqS4FYNqzg4hZXaq+ZYSN1hKlsROTi+2fN+mGLd2KVrR6tYlhQVezLznEySvnEW2 CwEoVa6E19w45ulhYRHLdryDpdD6dmAAJAoOX4ar+oRrwD5POo5PabBsNbj/Rxylc/Nw hCWw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=MGLlEwtk; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o9si2901996edh.236.2021.02.17.21.39.12; Wed, 17 Feb 2021 21:39:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=MGLlEwtk; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231337AbhBRFiU (ORCPT + 99 others); Thu, 18 Feb 2021 00:38:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43758 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbhBRFaw (ORCPT ); Thu, 18 Feb 2021 00:30:52 -0500 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on0603.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe0d::603]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F1B38C061788; Wed, 17 Feb 2021 21:30:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hXskKfnZRrHlop3BPbsasdw9sC5c/F9Y+LLBMZ3bcNsEDb5gV7WqoWljfT6MVyALTgbyXartk0EgGRUz9qJvCSjyC5oI3W+OhTh7t7yds8K9j8IFTgdgDU2a7aYcn0MBM18/Ta9k/dJjkDP40VqSwnAiXaz+YdkyoMwMAludvQ8tdBQL6GwA7t6LNLXHwqQBswITdfRKFfN77HEIPGc8BUyADRbToShicemS8lj1+zu/cIJ+SXozCH5tjt4FO0DreOlvJDSfu07IvzKcGLUC3Ov2hOqi8chppJTjqtoV4MwZAg72Hbsq/ehhMQVTbbDgzLvrDsy6mu9lyC75DpDcHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iN8dWrUpI69gm2uQRF7UqhxjIe9OOLdydPVAMK6H8Ds=; b=BQqZArEenG9luvqRDXiL1o1S3YOR+WUyWGY8El2+P5MiX+wnAyyvn1NIQ2ZufCUEcgMWwG0E9ISyMwZShzvtXcnnAhGOuFSEkkaJYBwdV2Lb+fcCP+/7EmKmxbq8l6qn/yWswHsUM2raAw7KRmk8sdUK9Qw/uFGd+1sTYtjazSidXpZwRs1SkOaddophPxi2evvHca1UuLbZUK5IySa/IoSmHfuGaIOZm99OrdF4Y6hllkuYRw338ujReW286IK/8OGhahgnimbnO3at86csCOeJ/7QiW9EUkAnOaN6Xv54dEu7a5Y0QIS7CcjW+Rqxltokxq1tfMQ8GF+tx0dvxsw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iN8dWrUpI69gm2uQRF7UqhxjIe9OOLdydPVAMK6H8Ds=; b=MGLlEwtkrQKuOeEmLSnboBUT3yllZkfOieUrNPoBPmRcd93Q2FXePMFF7/ZTRFVxOPwNEOwQbsXN8NaZXvqGlc/vg646BPlxCpppPLwNpQl2UfTn8kogQ5JTdbVwEl5Jh11ASoL23T795JFHU4FaoxTOzPTqXiNaBI7bspkz2bE= Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=oss.nxp.com; Received: from AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) by AM8PR04MB7730.eurprd04.prod.outlook.com (2603:10a6:20b:242::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27; Thu, 18 Feb 2021 05:28:49 +0000 Received: from AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42]) by AM0PR04MB5636.eurprd04.prod.outlook.com ([fe80::e90e:b1d6:18a2:2d42%6]) with mapi id 15.20.3846.042; Thu, 18 Feb 2021 05:28:49 +0000 From: Calvin Johnson To: Grant Likely , "Rafael J . Wysocki" , Jeremy Linton , Andrew Lunn , Andy Shevchenko , Florian Fainelli , Russell King - ARM Linux admin , Cristi Sovaiala , Florin Laurentiu Chiculita , Ioana Ciornei , Madalin Bucur , Heikki Krogerus , Marcin Wojtas , Pieter Jansen Van Vuuren , Jon , Saravana Kannan , Randy Dunlap Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-acpi@vger.kernel.org, Laurentiu Tudor , Diana Madalina Craciun , linux-arm-kernel@lists.infradead.org, linux.cj@gmail.com, Calvin Johnson , "David S. Miller" , Jakub Kicinski , Jamie Iles Subject: [net-next PATCH v6 12/15] net/fsl: Use fwnode_mdiobus_register() Date: Thu, 18 Feb 2021 10:56:51 +0530 Message-Id: <20210218052654.28995-13-calvin.johnson@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210218052654.28995-1-calvin.johnson@oss.nxp.com> References: <20210218052654.28995-1-calvin.johnson@oss.nxp.com> Content-Type: text/plain X-Originating-IP: [14.142.151.118] X-ClientProxiedBy: SG2PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:54::15) To AM0PR04MB5636.eurprd04.prod.outlook.com (2603:10a6:208:130::22) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from lsv03152.swis.in-blr01.nxp.com (14.142.151.118) by SG2PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:54::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3868.27 via Frontend Transport; Thu, 18 Feb 2021 05:28:43 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 779a09e1-41de-4b37-7064-08d8d3ce1216 X-MS-TrafficTypeDiagnostic: AM8PR04MB7730: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wCv+geqrVACCTi9R3pmgP72f43OWxtwnWiUxFhqGIdz72AjGR7CPEn8bojNT3Vy6FL2MixW3QoIHbroWToBhUxs5wNAEIeNECleM9WvqAZB3vp2uNzIsws2tz9/c4ROKn07iSandrdenvmEURu85pwbFFCd9HKH/oQrfoN9MMwVa9wftbmaD9uZo3BslAQBaaJojs9dtBjjhmzlug2nP9Bd8Gx5hGUZ57t2wrNdPvSC097+r4MIGT2V/mAEhgzd9FaPqUZxdLdo+Hw0f3THtvglc7zwWH4S173JSsrR9gcAWO/Nz5c1a8duLGJ0BKbdxesuqy6W5dr7XL4wE4LLvuoIAvISD9tLIvYHx0IKY52qwmO9L3mdZDyFXm5vYpmeRbZKS6rQgPMRI+8SCnqcLu3XwUHBPKBnlPQIwCS73ljkLuDuRPqc0G986CteXwaq+17XnVTS8xJVVaKMK3fz/qLyoEMKCn2agYpkeMJxeoVpsO9vPXJmCHi2M8APL+IWN5eS8ViVbe+oJWZvZuhUBWUUfV0s1BNA/v3S41QOsvzOclhwTSCPMXrXBYrO6hcesfl0bE+ViKsRFK5D3cq0es0+GYYoz/Y4exaNNJGbWs4U= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB5636.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(396003)(376002)(346002)(366004)(39860400002)(136003)(26005)(8936002)(52116002)(16526019)(921005)(478600001)(1076003)(6486002)(8676002)(55236004)(83380400001)(5660300002)(186003)(44832011)(110136005)(6512007)(956004)(54906003)(316002)(66946007)(2906002)(2616005)(1006002)(66476007)(86362001)(7416002)(6506007)(6666004)(4326008)(66556008)(110426009);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?us-ascii?Q?5w5TK8yVwHGrfOij9V6wPGZ6xZadJYg33ACMtNZtzDT0wuV9yGNTjwc9P6+o?= =?us-ascii?Q?46RToR++7LDM2W62VB6R/NCjGq1TNpXe0+T8xWjYBVncJpIS/Tqw5x9qGFlN?= =?us-ascii?Q?sFIKeDEqKMagkgLOwFoa01MCrZxTv+y7RfFYU2tHw17PsyYNimyhcea/Wafz?= =?us-ascii?Q?WnmkJkoxANSeVT19gYvVaaXQMii2kZCckRi0DZYtMFXnMfWJSa9gAyLXFvoW?= =?us-ascii?Q?g64Ii9inOXhUHYdH8M/O65pMlzCGAoZPzcnU/GojfaReMYKRydY3hTUE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v+ZilOwHkYyX3vIKD5PS0xatnZuWxap5rZ?= =?us-ascii?Q?koT9bw6JwJGWK5HGBqPKl+hI9AmbTd5zQF59v0Gct3IgQKhotAAbX3VTUxeQ?= =?us-ascii?Q?10UFoe9932mL5QCB56jx316VZFyzfURWhNfd8J+HGJVb0sHM7t+o/ueOV8v/?= =?us-ascii?Q?31SRl//rUpzV7mFFEQu7TkC3?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 779a09e1-41de-4b37-7064-08d8d3ce1216 X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB5636.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Feb 2021 05:28:49.4848 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: LsazGlH7AIpWonF42JOs1mtir73JEHcBr7fvMUiRuPyAZBk5DtyOxazVcUF7CZhv9h6R2panbrSFQK0UoTgE2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7730 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org fwnode_mdiobus_register() internally takes care of both DT and ACPI cases to register mdiobus. Replace existing of_mdiobus_register() with fwnode_mdiobus_register(). Note: For both ACPI and DT cases, endianness of MDIO controller need to be specified using "little-endian" property. Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: - Cleanup xgmac_mdio_probe() Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index bfa2826c5545..dca5305e7185 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -2,6 +2,7 @@ * QorIQ 10G MDIO Controller * * Copyright 2012 Freescale Semiconductor, Inc. + * Copyright 2021 NXP * * Authors: Andy Fleming * Timur Tabi @@ -243,10 +244,9 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum) static int xgmac_mdio_probe(struct platform_device *pdev) { - struct device_node *np = pdev->dev.of_node; - struct mii_bus *bus; - struct resource *res; struct mdio_fsl_priv *priv; + struct resource *res; + struct mii_bus *bus; int ret; /* In DPAA-1, MDIO is one of the many FMan sub-devices. The FMan @@ -279,13 +279,16 @@ static int xgmac_mdio_probe(struct platform_device *pdev) goto err_ioremap; } + /* For both ACPI and DT cases, endianness of MDIO controller + * needs to be specified using "little-endian" property. + */ priv->is_little_endian = device_property_read_bool(&pdev->dev, "little-endian"); priv->has_a011043 = device_property_read_bool(&pdev->dev, "fsl,erratum-a011043"); - ret = of_mdiobus_register(bus, np); + ret = fwnode_mdiobus_register(bus, pdev->dev.fwnode); if (ret) { dev_err(&pdev->dev, "cannot register MDIO bus\n"); goto err_registration; -- 2.17.1