Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1519726imm; Mon, 3 Sep 2018 02:35:32 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZNKmO287l7/+Kz8+Q2CJ5gyZ0QxE5PoCsLHtNcglQK+6x7rslVTpg3JSlx67iUOVLdJytY X-Received: by 2002:a65:6398:: with SMTP id h24-v6mr25768599pgv.245.1535967332214; Mon, 03 Sep 2018 02:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535967332; cv=none; d=google.com; s=arc-20160816; b=jECzu9W8TDNm079jvgz1g/b6JE/SZT4iq56ofbKgEmn/j+ss2BwhiM+wOx8MvZzdSe cm3y9L15Kkb+r9XxsDPtvm9mh1hFsFwaRRErBH+tB1Tz6KquQeZuHkzZljZ+hpKuTGHf qwXlsFzsBmmmdvP/tAgICIBxxPNPhVGWQYKh+eiReff+Uqiorb/9OEsUqY7GRw7LcrL6 h/Qiw+yxGPija9tLCNRNLMPFLK8kVCjrZFRsGOg/O9lE+bW7lWN/e2NgepkqeaQzNmZX CO9rzqu3+XWv9/ZouTIGcSPTzIMqs1GZzn49RzFAZRP7kwW2yaNIsJ/WBGtBytHGI2RY 3NUQ== 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:message-id:date :subject:cc:to:from:arc-authentication-results; bh=6iJvL44MhenOLZrTDuKt1TxAtmE9t0CzEA1UsCIRQL8=; b=Fs7zQljDCvjFFERvlJgkPV8+iksnI0cH75qXTzS5o5Ya5WAWW06nThKHvNhUuQwLEh vZlcqgFtMp+zAGk4mHTBZW8NHuMm5i4IpovQbsUYiooPV95Ec6/MyOnAtVSxseq/XomL X7xXgefkZ6Q1vYvhqRcajH7DV9i0MIDyBpVwZpHu2E1Nee2cDTlkGxlDq6wPmXVaRGyn 44sg4rrfGLeZd/+muq7GzY6DTcn70UMxsUFYW9oPINpHQ7YrdyvbkS+mTduhwUESr2AM NLknNsWucRy8RqKE/zNw9TF5YOy0j5WWPUYmpSGzncaHUGtkpICDOij1kDi6QlIrPyXI l8zA== 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 s12-v6si17320687pgi.320.2018.09.03.02.35.16; Mon, 03 Sep 2018 02:35:32 -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 S1727572AbeICNxD (ORCPT + 99 others); Mon, 3 Sep 2018 09:53:03 -0400 Received: from mail.bootlin.com ([62.4.15.54]:54519 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727434AbeICNxD (ORCPT ); Mon, 3 Sep 2018 09:53:03 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 1532C22A54; Mon, 3 Sep 2018 11:33:44 +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-92-107.w90-88.abo.wanadoo.fr [90.88.33.107]) by mail.bootlin.com (Postfix) with ESMTPSA id 966AD22A3D; Mon, 3 Sep 2018 11:33:24 +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, kishon@ti.com, andrew@lunn.ch, f.fainelli@gmail.com Cc: allan.nielsen@microchip.com, linux-mips@linux-mips.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, thomas.petazzoni@bootlin.com, Quentin Schulz Subject: [PATCH net-next v2 03/11] net: mscc: ocelot: get HSIO regmap from syscon Date: Mon, 3 Sep 2018 11:33:00 +0200 Message-Id: <20180903093308.24366-4-quentin.schulz@bootlin.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180903093308.24366-1-quentin.schulz@bootlin.com> References: <20180903093308.24366-1-quentin.schulz@bootlin.com> 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. Acked-by: Alexandre Belloni 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 26bb3b18f3be..b7d755b90117 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; -- 2.17.1