Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp526433ybi; Fri, 24 May 2019 07:29:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl0y4vIEHfSdll9Nwrjr08QcYQ/rKkDl2lFg0cVIERF9BJcTFdd6qiCY/62emvWcpwVKZ4 X-Received: by 2002:a17:90a:fa15:: with SMTP id cm21mr9767033pjb.122.1558708161155; Fri, 24 May 2019 07:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558708161; cv=none; d=google.com; s=arc-20160816; b=mh7/hgkObiy/shE96SrN8SukSCNF2z64mUQsIGCaGsdtLUHoLmwMeZI46mx43rB+mK Q0PtzFAZeuzxIn51DHhqcPerr8ZOQe0kkDAEKXL0mxUaI5AM+tfMb654729Zsd8NFBap 76QPsSybeGakbByIE/dCAHk+QfT7/nO3E1qVQMcTQZZfhXQupcSoT22l5qrf6S7hSZ+W U+35RvwGHVP7jPupZ44+Pc8fr8Jfh/rVX2DZHQvqfOktzUc8dr+8niMp57kHRgeuwuQx 6ENay792R1kwv+b+zgMRx89bpaJc9LlKtVjiSKVgfoRfNyPUxQH5+ZmdcnfILpdv6eDC m6nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Qg8YPqC0sLWiiM2apj3tRNk0cAK9VGI3Riy94bmfmbk=; b=d0kmxZZQnw3hWJVVWcqcsPDJUgi46aAuLU+rZNWtdzVcsmb4q08MzZEYqd6MFlfvZv E7CYn3dYohZ3BLrHKHopEh/EJFdewSw4NtMB6jtUCfWHRmvUU/DWYcCh+QYve0hDfSgN 3x9kgt48Ec1JH8buJSo1XLMJuiVSW5e0zdS1H21efywHCzVhsO2NLjcoqIB+CbV7IYMN WsoMmYMf2DFJM5QzlsrbSy2AoVAglcZfIIM/bVK9qq3MfX9XSwQCc6Adk4L5d4e9ZsEF T/3fx8mIV1t14EYbi869XZ9VjfVGsnMGtsMtrVJtYakig0keIr/dRx7xxq1XnKnK9dOo akGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=NH9RDoNq; 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 j5si4094592plk.229.2019.05.24.07.29.04; Fri, 24 May 2019 07:29:21 -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; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=NH9RDoNq; 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 S2391669AbfEXO1c (ORCPT + 99 others); Fri, 24 May 2019 10:27:32 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:56108 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390885AbfEXO1c (ORCPT ); Fri, 24 May 2019 10:27:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Qg8YPqC0sLWiiM2apj3tRNk0cAK9VGI3Riy94bmfmbk=; b=NH9RDoNq1BbwA3D+/zz9k9LOFC HaPaDOrD60MJ7EjI/YPI7N2i2XgqptON4aeWgXA1l9aqzwW5VC75rEz3KMQAzpdTpjwgfNHTLJlqI Wwa58E47QFJAFtiSYhkYhkCAxLzdU80uaQE4922ZLA8DuZ2cOmxtA9HgRkBPyHX8Cfko=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hUBAO-0001b5-N0; Fri, 24 May 2019 16:27:28 +0200 Date: Fri, 24 May 2019 16:27:28 +0200 From: Andrew Lunn To: Rasmus Villemoes Cc: Vivien Didelot , Florian Fainelli , "David S. Miller" , Rasmus Villemoes , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 5/5] net: dsa: add support for mv88e6250 Message-ID: <20190524142728.GL2979@lunn.ch> References: <20190501193126.19196-1-rasmus.villemoes@prevas.dk> <20190524085921.11108-1-rasmus.villemoes@prevas.dk> <20190524085921.11108-6-rasmus.villemoes@prevas.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190524085921.11108-6-rasmus.villemoes@prevas.dk> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > @@ -4841,6 +4910,10 @@ static const struct of_device_id mv88e6xxx_of_match[] = { > .compatible = "marvell,mv88e6190", > .data = &mv88e6xxx_table[MV88E6190], > }, > + { > + .compatible = "marvell,mv88e6250", > + .data = &mv88e6xxx_table[MV88E6250], > + }, > { /* sentinel */ }, > }; Ah, yes. I had not thought about that. A device at address 0 would be found, but a device at address 16 would be missed. Please add this compatible string to Documentation/devicetree/bindings/net/dsa/marvell.txt > +++ b/drivers/net/dsa/mv88e6xxx/global1.c > @@ -182,6 +182,25 @@ int mv88e6185_g1_reset(struct mv88e6xxx_chip *chip) > return mv88e6185_g1_wait_ppu_polling(chip); > } > > +int mv88e6250_g1_reset(struct mv88e6xxx_chip *chip) > +{ > + u16 val; > + int err; > + > + /* Set the SWReset bit 15 */ > + err = mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &val); > + if (err) > + return err; > + > + val |= MV88E6XXX_G1_CTL1_SW_RESET; > + > + err = mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, val); > + if (err) > + return err; > + > + return mv88e6xxx_g1_wait_init_ready(chip); > +} It looks like you could refactor mv88e6352_g1_reset() to call this function, and then mv88e6352_g1_wait_ppu_polling(chip); Otherwise, this looks good. Andrew