Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp742280rwi; Mon, 31 Oct 2022 07:05:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7P6hjwVdiW/x9nN+I03RXB4MDyHRm3RMqUUilwWUr7BbOor7GthyLqWFZ51lmhmlaKTEfF X-Received: by 2002:a05:6402:1052:b0:459:2c49:1aed with SMTP id e18-20020a056402105200b004592c491aedmr13671644edu.212.1667225152592; Mon, 31 Oct 2022 07:05:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667225152; cv=none; d=google.com; s=arc-20160816; b=Ow+d4fIYzEIzZDH6GHUtzvuVKCOkf5BAqWfS7CgqD23cjr5olQ4tMoSX6wmactx4cI gpxZpmQWEayzlbMl5qrwrJrUW0iKyW3EnQiFtfCKlAsm6GNh/VqOEv3AVWgs5jco9JuO K20limSXt2FeXLPWS3SPf6fyk8CV0QhOT94qO2cxuik62Pmg271U6PhpoqT9xcDCpo8D 49u+7xpS7kXoZ61vQcBO8c1VjdkOI1rfbyNm4dBROo/cJfDqlSDqi5XEYlOTacprOOC4 dkjxuI6jKZOUTTtWUHPURD4mhO/OeMO2+fKjM5BteX9/AEa2GQFhJNPP6jHxZlFA5+Xl 6vhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X9mXfQU2azroHjW2fTPBBkJLznInfmUPZPQXER+vmpQ=; b=Lxm0mE3CwMFCZQshmBq5yKGo8Mxni6+JeZZoBJWCvEZiD+RGoD68lEq45o2DHhhMdh pJLe0wZ695cQm3ZAZtGHxCcqL+2AIXrwTvp0RQ7g/x/IkChM/AHs2zLMy1K6igwuFZvh wMl7BhvWUMSY0IF4aGNv6xANb34eywtCxXubECq6ZwX/B0cDZ+lL3281nhFxi8lBcvEl i+ooyyGFTW66gaUF0bV48xJrZdPq+/x42lRakBdHQh7HXTf44Xx5NdVEnPm9iXNhgjeP ZZgFsYv2fJih2iCEwpVWoCkFW56pab6X4aYLlzz1JizabxP5F5GR5bbMQVLDO4lpbXy9 i9QA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gmeka71Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr7-20020a1709073f8700b0078789399a48si8804014ejc.870.2022.10.31.07.05.20; Mon, 31 Oct 2022 07:05:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=gmeka71Q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbiJaN1j (ORCPT + 98 others); Mon, 31 Oct 2022 09:27:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230505AbiJaN1Z (ORCPT ); Mon, 31 Oct 2022 09:27:25 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9884A10073; Mon, 31 Oct 2022 06:27:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=X9mXfQU2azroHjW2fTPBBkJLznInfmUPZPQXER+vmpQ=; b=gmeka71Q7kSt2ZGYKoTPo7Nnrr cJwdn8qVOkG7+mLn+qf3KQmFuec/MvR2q9J711pCgxpnZzVFFryxTqNwef48sHo5mKEaWYSZF8Cgf m4o9xNpp0tpiRCPBPR3trUz4mi+uQfplAo+lWwoMwsu8QOJuuCDjZkRiZdpH9h3QNrpU=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1opUov-0011OF-Nu; Mon, 31 Oct 2022 14:27:17 +0100 Date: Mon, 31 Oct 2022 14:27:17 +0100 From: Andrew Lunn To: Chester Lin Cc: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jan Petrous , Ondrej Spacek , Ghennadi Procopciuc , Andra-Teodora Ilie , Andreas =?iso-8859-1?Q?F=E4rber?= , Matthias Brugger Subject: Re: [PATCH 5/5] net: stmmac: Add NXP S32 SoC family support Message-ID: References: <20221031101052.14956-1-clin@suse.com> <20221031101052.14956-6-clin@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221031101052.14956-6-clin@suse.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > + /* set interface mode */ > + if (gmac->ctrl_sts) { > + switch (gmac->intf_mode) { > + default: > + dev_info(&pdev->dev, "unsupported mode %u, set the default phy mode.\n", > + gmac->intf_mode); If it is an unsupported mode use dev_err() and return -EINVAL; > + fallthrough; > + case PHY_INTERFACE_MODE_SGMII: > + dev_info(&pdev->dev, "phy mode set to SGMII\n"); dev_dbg() Please don't spam the lock with useless information. > + intf_sel = PHY_INTF_SEL_SGMII; > + break; > + case PHY_INTERFACE_MODE_RGMII: > + case PHY_INTERFACE_MODE_RGMII_ID: > + case PHY_INTERFACE_MODE_RGMII_TXID: > + case PHY_INTERFACE_MODE_RGMII_RXID: > + dev_info(&pdev->dev, "phy mode set to RGMII\n"); dev_dbg() > + intf_sel = PHY_INTF_SEL_RGMII; > + break; > + case PHY_INTERFACE_MODE_RMII: > + dev_info(&pdev->dev, "phy mode set to RMII\n"); dev_dbg() > + intf_sel = PHY_INTF_SEL_RMII; > + break; > + case PHY_INTERFACE_MODE_MII: > + dev_info(&pdev->dev, "phy mode set to MII\n"); dev_dbg() > + intf_sel = PHY_INTF_SEL_MII; > + break; > + } > + > + writel(intf_sel, gmac->ctrl_sts); > + } > + > + return 0; > +} > + > +static int s32cc_config_cache_coherency(struct platform_device *pdev, > + struct plat_stmmacenet_data *plat_dat) > +{ > + plat_dat->axi4_ace_ctrl = > + devm_kzalloc(&pdev->dev, > + sizeof(struct stmmac_axi4_ace_ctrl), > + GFP_KERNEL); > + > + if (!plat_dat->axi4_ace_ctrl) { > + dev_info(&pdev->dev, "Fail to allocate axi4_ace_ctrl\n"); dev_err(). But devm_kzalloc() failing will produce log messages, so you probably don't need this. Andrew