Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3913374imm; Mon, 30 Jul 2018 05:47:26 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdiHjqwUAPTb1SgYuUFdaixj7rWjLsj+szM2BAgwrdtnPF1ySbEDs9IBPVHnADDZPW3Cwqz X-Received: by 2002:a63:6604:: with SMTP id a4-v6mr16014524pgc.404.1532954846628; Mon, 30 Jul 2018 05:47:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532954846; cv=none; d=google.com; s=arc-20160816; b=LRIfPS5zrS5+U6y7zdD0bxAWc5FBjV723rHjIoTOKHOMelSXRJ2HkO5KOyaj02FjmY K6GTM37Y7PbAYL/8kPUnvJcagzr3pzYt2CqfwiQzSWRnjlsBcr7f4tWXfTNBJL9w13ZS iG2vWu/tGTu6b/3RITjqW7IzGSPcoB/WrWZ91xzbJED335JwNZ9HIqCnW3fvqT73HpQe R2qroWuO4iFQMkuFBElV02B4UMPHnet6nOura1/g7jvnRhqZZ/7nLyu0O+NvlSbNPtZa +II9JYmvnW6E/eQKtSsxFx3d1AlHK+tKzarTWXxIl+iZCMNXsiXWFkzMRWsdfoIFCF7S AFdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=cNRm9PARpfTi12uw7fUw79xDNtC4uAzaoF5DEVi1ccA=; b=PUd9LE3DkjsSr0qwRYkDuzRoTemAaWBM72KOlTWo7AZVJFx0YSzhP+/N719Z2vc4Lg aIEMCnv1o3Zhy1RxfeiiMrKpM64P3csQu41sdZeuqGcZtykeLy0eTiwqXZvhbYIovVZf bz5thwE2Y+AZWXcWiZwBVzR89hF6ujQxnWaAiS90TSvK/4t9jwOxalBF8mdYb1xbDcQH MDgcH0Zqb5sFTcXPBtNTlPPNkdngtRFnBoAk6cECpkZ/UM9bgW9XR2sPg8aMKZ5mzewc IImBkt7ifPj5lEhhWolPYyjortiBsmq2iNY57hCsqi6BQzMnz9SXEbQ5XuTZzuZE0G7T wcVg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s17-v6si10508545pge.99.2018.07.30.05.47.12; Mon, 30 Jul 2018 05:47:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731566AbeG3OTQ (ORCPT + 99 others); Mon, 30 Jul 2018 10:19:16 -0400 Received: from mail.bootlin.com ([62.4.15.54]:58418 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729057AbeG3OTP (ORCPT ); Mon, 30 Jul 2018 10:19:15 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 5E44A20884; Mon, 30 Jul 2018 14:44:24 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost.localdomain (AAubervilliers-681-1-89-120.w90-88.abo.wanadoo.fr [90.88.30.120]) by mail.bootlin.com (Postfix) with ESMTPSA id 00E39207AC; Mon, 30 Jul 2018 14:44:23 +0200 (CEST) From: Quentin Schulz To: alexandre.belloni@bootlin.com, ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, davem@davemloft.net Cc: kishon@ti.com, andrew@lunn.ch, f.fainelli@gmail.com, linux-mips@linux-mips.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, allan.nielsen@microsemi.com, thomas.petazzoni@bootlin.com, Quentin Schulz Subject: [PATCH net-next 03/10] net: mscc: ocelot: get HSIO regmap from syscon Date: Mon, 30 Jul 2018 14:43:48 +0200 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HSIO address space was moved to a syscon, hence we need to get the regmap of this address space from there and no more from the device node. Signed-off-by: Quentin Schulz --- drivers/net/ethernet/mscc/ocelot_board.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_board.c b/drivers/net/ethernet/mscc/ocelot_board.c index 26bb3b1..b7d755b 100644 --- a/drivers/net/ethernet/mscc/ocelot_board.c +++ b/drivers/net/ethernet/mscc/ocelot_board.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "ocelot.h" @@ -162,6 +163,7 @@ static int mscc_ocelot_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct device_node *ports, *portnp; struct ocelot *ocelot; + struct regmap *hsio; u32 val; struct { @@ -173,7 +175,6 @@ static int mscc_ocelot_probe(struct platform_device *pdev) { QSYS, "qsys" }, { ANA, "ana" }, { QS, "qs" }, - { HSIO, "hsio" }, }; if (!np && !pdev->dev.platform_data) @@ -196,6 +197,14 @@ static int mscc_ocelot_probe(struct platform_device *pdev) ocelot->targets[res[i].id] = target; } + hsio = syscon_regmap_lookup_by_compatible("mscc,ocelot-hsio"); + if (IS_ERR(hsio)) { + dev_err(&pdev->dev, "missing hsio syscon\n"); + return PTR_ERR(hsio); + } + + ocelot->targets[HSIO] = hsio; + err = ocelot_chip_init(ocelot); if (err) return err; -- git-series 0.9.1