From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E5D8C433E6 for ; Wed, 23 Dec 2020 09:05:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2DEED207CD for ; Wed, 23 Dec 2020 09:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728187AbgLWJEn (ORCPT ); Wed, 23 Dec 2020 04:04:43 -0500 Received: from esa.microchip.iphmx.com ([68.232.153.233]:18107 "EHLO esa.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727050AbgLWJEm (ORCPT ); Wed, 23 Dec 2020 04:04:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1608714281; x=1640250281; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=OFvTDDSfgKeOYrK3s9uvKjz1XvryNuTpXVGl8F1Tlyk=; b=qifo2ZFoJCkMuw0bDcRJ4za9x/g4O0I4p4V8lll5CTn1CvDgQoK2kXym 4YAgdrJoPYzIihrqW5+53pxU0TqIMHnbFWVJelBj1p547ddccGqCzzAMG 8Fvk5o1EDpC5UvV1uMeiEBbBUjz5QB8Zyxj1QK7Vev3vzOS3Gz79jy0Ih J45mD+4akhIEhbmvBhk7LpfhyrN2QmEazNlppoIjEunmSriOKiyL/PoH2 NkxkMadt7AgZBXLXACEjP3ZpTfnc46S3tHBN+hiK7/FubysaIg7LZyQTU J7Ato2HbYdchhUG5cnZecVhTZtnYeR9EZTBhsXajpYD/U4TV43WP0ik/A Q==; IronPort-SDR: 6y6X9asZAaS3vrtRQxB+CiaEp5geuGyLuMyuPfquiP5Oo4EIB/itzBTUI+gW7P6S9oaoHiUQ2x 0QPPz7Yo5wQOx/V1Jpj4RIZ2p8T5lJDD5Nu6z68vo/t6DJ4vs5TudGUcJq2w+eHcUYxyiP5y6v agkzkBlvoJcYFybHIQhQVv6k/HSt0fbBeX4PyXI25CJQ9z+ob3XCWmKC4c3K6x1hledt3g+M/f ISInzc0TAiVcRFkSSujESoY6c8EI548t1aZ9Ue2Q6w4fKqoCluTY4EqB2XXKLdLrpq1MKYYOxv ltA= X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="103795952" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Dec 2020 02:03:25 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 23 Dec 2020 02:03:25 -0700 Received: from soft-dev10.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Wed, 23 Dec 2020 02:03:22 -0700 References: <20201217075134.919699-1-steen.hegelund@microchip.com> <20201217075134.919699-3-steen.hegelund@microchip.com> <20201219191157.GC3026679@lunn.ch> <37309f64bf0bb94e55bc2db4c482c1e3e7f1be6f.camel@microchip.com> <20201222150122.GM3107610@lunn.ch> <20201222165600.GE3819852@piout.net> User-agent: mu4e 1.2.0; emacs 26.3 From: Lars Povlsen To: Alexandre Belloni CC: Andrew Lunn , Steen Hegelund , "David S. Miller" , Jakub Kicinski , Russell King , "Lars Povlsen" , Bjarni Jonasson , Microchip Linux Driver Support , Madalin Bucur , Nicolas Ferre , Mark Einon , Masahiro Yamada , Arnd Bergmann , , , Subject: Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver In-Reply-To: <20201222165600.GE3819852@piout.net> Date: Wed, 23 Dec 2020 10:03:11 +0100 Message-ID: <874kkcq4hc.fsf@microchip.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Alexandre Belloni writes: > On 22/12/2020 16:01:22+0100, Andrew Lunn wrote: >> > The problem is that the switch core reset also affects (reset) the >> > SGPIO controller. >> > >> > We tried to put this in the reset driver, but it was rejected. If the >> > reset is done at probe time, the SGPIO driver may already have >> > initialized state. >> > >> > The switch core reset will then reset all SGPIO registers. >> >> Ah, O.K. Dumb question. Why is the SGPIO driver a separate driver? It >> sounds like it should be embedded inside this driver if it is sharing >> hardware. >> >> Another option would be to look at the reset subsystem, and have this >> driver export a reset controller, which the SGPIO driver can bind to. >> Given that the GPIO driver has been merged, if this will work, it is >> probably a better solution. >> > > That was my suggestion. Then you can ensure from the reset controller > driver that this is done exactly once, either from the sgpio driver or > from the switchdev driver. IIRC, the sgpio from the other SoCs are not > affected by the reset. I will take a look to see if we can change the implementation to use a reset controller. ---Lars -- Lars Povlsen, Microchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08575C433E0 for ; Wed, 23 Dec 2020 09:04:43 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9CDAC20760 for ; Wed, 23 Dec 2020 09:04:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9CDAC20760 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:In-Reply-To:Subject:To: From:References:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=P6Bs/V5obNajXs4BreB/Zo38gOXyNHxmGOkmg+t2m4I=; b=o70jUzKBo+2pY2QmENcF0T6FY L/L1v34piOmetDiRxvvwAnMtBWnGtZQCjE3TFiiOoLTtvUHq6iTsllTJHd8g6FYk86zFDcrY3tYVw FwJXGWAaFFMTU4c6FREFyzG5UE7ujoGt54z2FDc1JkT/bIvM+rWC0KfzN7nSlllY8pQih7sYt/b8T M3bLb/WBOoPNth+ArB2ZYggRWG4eRWB9JqcLBO2gHhJp/wAi9D+EWvPIAxn/eWTbPq2hTTpwSd2bI F+MFfly23Z6EqWnEXTkNCHdH3Zc63vnwUXIp0XuYuTuaTc1Cwhh7jwzvFOqE7oW+BFPhIrG5rzi0F 8KSk5C9cQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ks03P-0002BF-3j; Wed, 23 Dec 2020 09:03:31 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ks03M-0002Ar-JV for linux-arm-kernel@lists.infradead.org; Wed, 23 Dec 2020 09:03:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1608714208; x=1640250208; h=references:from:to:cc:subject:in-reply-to:date: message-id:mime-version; bh=OFvTDDSfgKeOYrK3s9uvKjz1XvryNuTpXVGl8F1Tlyk=; b=EJur1ZkUY+nQYzxtkf09c3oriEyV8alYXRd5VBG56PIekwhj3cwBuQZW IpMTWFC8F3K5p1Q1gZ3JxUDww1yRptYhLLW42ynFAFTCn1NWezSHvKWsz 42GTCrlK5sGVmR06UhmhDi6aYDsR5y/fG9MM9gcLqnH/5XDPgkw852PuP bbfRQ3E8xT2s0cdUWi3HwUYRmTPR+eJQVfiR34Xhbn6s24sWNeBykfGXA S4YxQWGaF7P7cK9db0ES0Fpa+mrC8Z/ppgjVZrsTOC/OoV43QR+hOiOkW 11rQ6rIzE7DKtq/o9ftycWEr8s1Ih4fTjXvI0QVvZq3lAGRcQ8W+Wl+EZ A==; IronPort-SDR: 6y6X9asZAaS3vrtRQxB+CiaEp5geuGyLuMyuPfquiP5Oo4EIB/itzBTUI+gW7P6S9oaoHiUQ2x 0QPPz7Yo5wQOx/V1Jpj4RIZ2p8T5lJDD5Nu6z68vo/t6DJ4vs5TudGUcJq2w+eHcUYxyiP5y6v agkzkBlvoJcYFybHIQhQVv6k/HSt0fbBeX4PyXI25CJQ9z+ob3XCWmKC4c3K6x1hledt3g+M/f ISInzc0TAiVcRFkSSujESoY6c8EI548t1aZ9Ue2Q6w4fKqoCluTY4EqB2XXKLdLrpq1MKYYOxv ltA= X-IronPort-AV: E=Sophos;i="5.78,441,1599548400"; d="scan'208";a="103795952" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 23 Dec 2020 02:03:25 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Wed, 23 Dec 2020 02:03:25 -0700 Received: from soft-dev10.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Wed, 23 Dec 2020 02:03:22 -0700 References: <20201217075134.919699-1-steen.hegelund@microchip.com> <20201217075134.919699-3-steen.hegelund@microchip.com> <20201219191157.GC3026679@lunn.ch> <37309f64bf0bb94e55bc2db4c482c1e3e7f1be6f.camel@microchip.com> <20201222150122.GM3107610@lunn.ch> <20201222165600.GE3819852@piout.net> User-agent: mu4e 1.2.0; emacs 26.3 From: Lars Povlsen To: Alexandre Belloni Subject: Re: [RFC PATCH v2 2/8] net: sparx5: add the basic sparx5 driver In-Reply-To: <20201222165600.GE3819852@piout.net> Date: Wed, 23 Dec 2020 10:03:11 +0100 Message-ID: <874kkcq4hc.fsf@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201223_040328_849518_E7E879FA X-CRM114-Status: GOOD ( 18.15 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Lunn , linux-kernel@vger.kernel.org, Arnd Bergmann , Bjarni Jonasson , Madalin Bucur , netdev@vger.kernel.org, Steen Hegelund , Russell King , Microchip Linux Driver Support , linux-arm-kernel@lists.infradead.org, Mark Einon , Jakub Kicinski , Masahiro Yamada , "David S. Miller" , Lars Povlsen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Alexandre Belloni writes: > On 22/12/2020 16:01:22+0100, Andrew Lunn wrote: >> > The problem is that the switch core reset also affects (reset) the >> > SGPIO controller. >> > >> > We tried to put this in the reset driver, but it was rejected. If the >> > reset is done at probe time, the SGPIO driver may already have >> > initialized state. >> > >> > The switch core reset will then reset all SGPIO registers. >> >> Ah, O.K. Dumb question. Why is the SGPIO driver a separate driver? It >> sounds like it should be embedded inside this driver if it is sharing >> hardware. >> >> Another option would be to look at the reset subsystem, and have this >> driver export a reset controller, which the SGPIO driver can bind to. >> Given that the GPIO driver has been merged, if this will work, it is >> probably a better solution. >> > > That was my suggestion. Then you can ensure from the reset controller > driver that this is done exactly once, either from the sgpio driver or > from the switchdev driver. IIRC, the sgpio from the other SoCs are not > affected by the reset. I will take a look to see if we can change the implementation to use a reset controller. ---Lars -- Lars Povlsen, Microchip _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel