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 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 1FCBEC433B4 for ; Tue, 6 Apr 2021 15:49:37 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BCA1A613BD for ; Tue, 6 Apr 2021 15:49:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BCA1A613BD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=uoqSNENx2w3spltbGj0AslgtqRuudjDAT+607qlIo/8=; b=PVO/iAQORo5ZvT9r5/xysTs7P h9hdxXBw698WKviC10byDwksWII91mVK5bsL24QBSZBln/P2XvmxhLO4+HXLW/ny+lntgd9nW4Blo 8yKgQ6YduPVTTqIixJ7qKvba94OOPnm0U3gsaN2hXHn9/sLeXoBPFiL/atenoJsExo2Hxm6NHkUQZ oOQ4pS1i2DYownJKJ4aJ2C204B/T2HSpegPFHyLE49abUjoLYhUwnMYTJ9+/JLvJmG5NyJY35JFQZ VxWunVQKGizyWAiy1kfIhW8sHIb5RTVjegpGlnhtSgPqLermDPjZ8qr0H15sFjqPjr/REGxqP0sFB bevr3v3kA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lTnxB-002xNu-22; Tue, 06 Apr 2021 15:49:23 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lTnx7-002xND-TD for linux-mediatek@lists.infradead.org; Tue, 06 Apr 2021 15:49:19 +0000 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lTnx0-00F8vw-7I; Tue, 06 Apr 2021 17:49:10 +0200 Date: Tue, 6 Apr 2021 17:49:10 +0200 From: Andrew Lunn To: DENG Qingfang Cc: "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Landen Chao , Matthias Brugger , Russell King , Sean Wang , Vivien Didelot , Vladimir Oltean , Rob Herring , Linus Walleij , Greg Kroah-Hartman , Sergio Paracuellos , linux-kernel@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , linux-staging@lists.linux.dev, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , netdev , Weijie Gao , Chuanhong Guo , =?iso-8859-1?Q?Ren=E9?= van Dorst Subject: Re: [RFC net-next 2/4] net: dsa: mt7530: add interrupt support Message-ID: References: <20210406141819.1025864-1-dqfext@gmail.com> <20210406141819.1025864-3-dqfext@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210406_164918_028079_39EB2A4F X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org On Tue, Apr 06, 2021 at 11:39:12PM +0800, DENG Qingfang wrote: > On Tue, Apr 6, 2021 at 11:30 PM Andrew Lunn wrote: > > > > On Tue, Apr 06, 2021 at 10:18:17PM +0800, DENG Qingfang wrote: > > > Add support for MT7530 interrupt controller to handle internal PHYs. > > > > Are the interrupts purely PHY interrupts? Or are there some switch > > operation interrupts, which are currently not used? > > There are other switch operations interrupts as well, such as VLAN > member violation, switch ACL hit. O.K. So that makes it similar to the mv88e6xxx. With that driver, i kept interrupt setup and mdio setup separate. I add the interrupt controller first, and then do mdio setup, calling a helper to map the PHY interrupts and assign them to bus->irq[]. That gives you a cleaner structure when you start using the other interrupts. Andrew _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C30B86D0E for ; Tue, 6 Apr 2021 15:49:17 +0000 (UTC) Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lTnx0-00F8vw-7I; Tue, 06 Apr 2021 17:49:10 +0200 Date: Tue, 6 Apr 2021 17:49:10 +0200 From: Andrew Lunn To: DENG Qingfang Cc: "David S. Miller" , Florian Fainelli , Heiner Kallweit , Jakub Kicinski , Landen Chao , Matthias Brugger , Russell King , Sean Wang , Vivien Didelot , Vladimir Oltean , Rob Herring , Linus Walleij , Greg Kroah-Hartman , Sergio Paracuellos , linux-kernel@vger.kernel.org, "moderated list:ARM/Mediatek SoC support" , linux-staging@lists.linux.dev, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , netdev , Weijie Gao , Chuanhong Guo , =?iso-8859-1?Q?Ren=E9?= van Dorst Subject: Re: [RFC net-next 2/4] net: dsa: mt7530: add interrupt support Message-ID: References: <20210406141819.1025864-1-dqfext@gmail.com> <20210406141819.1025864-3-dqfext@gmail.com> X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Apr 06, 2021 at 11:39:12PM +0800, DENG Qingfang wrote: > On Tue, Apr 6, 2021 at 11:30 PM Andrew Lunn wrote: > > > > On Tue, Apr 06, 2021 at 10:18:17PM +0800, DENG Qingfang wrote: > > > Add support for MT7530 interrupt controller to handle internal PHYs. > > > > Are the interrupts purely PHY interrupts? Or are there some switch > > operation interrupts, which are currently not used? > > There are other switch operations interrupts as well, such as VLAN > member violation, switch ACL hit. O.K. So that makes it similar to the mv88e6xxx. With that driver, i kept interrupt setup and mdio setup separate. I add the interrupt controller first, and then do mdio setup, calling a helper to map the PHY interrupts and assign them to bus->irq[]. That gives you a cleaner structure when you start using the other interrupts. Andrew