Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2674787pxj; Sun, 6 Jun 2021 09:57:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmN85BmvO+C4LPSwe9CeKr0D34RBLEVKx+2Gt8CNAmoLCeAO4gGq0pBUoqsFj/k8kilEm7 X-Received: by 2002:a17:906:1e15:: with SMTP id g21mr14094559ejj.241.1622998674538; Sun, 06 Jun 2021 09:57:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622998674; cv=none; d=google.com; s=arc-20160816; b=bGx/3WOYEDervQVQjM3BSOtu4o99Est0uU0TFdP20oEaPUwnZ6X4WU0wPqPagCsInx jRxr/9MQkFemaJVL1IJVrRCcC6WoNTbklC9sMKt4zOfDEJYqnwIySnuZ8i6qyz7MBTGc B8hGOVclpy1jrHqYvrHZQRufUiUZO058iKatAP0NaT9S7DJ9n+bPyeceKUtuUJsSl7dE Tt08xgkvwykhdx4vSls31ZFNf/v4ON/RzVqxfE/Y8lApIEMhJ1eT3lJYKEqPHPLvDV1J +Yxwxaj2810Jq/vBSK6nF7xUYrgnqmU6Lcs9ZTfF/9Z44x8hQBhGerHI6ELu7Y9Pd6RV XK4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=/0s1zGVT+R+N5kSXRP0ZTaxX7gJLho1pW7DrZ8sDw8o=; b=sDHICpFz59X0ewqX5gu9ZuRtooN8+yedBLN1u+YNtHzMqhJNUIQJKauLLBLctCyzox Y0RvvZ6Yhx0KYbJn64U6TBU5L1UJ4gHitAblFmzT7hCyvhWaoC37ygdXe0I6FyZ4aT4B r1nKYZzJfIfaTeoV5Pke3ze2J3r8FfyHt8kr2nRP0CsTK9F5jN4jAlQYlvVO77omMvvw rhIm/08nrBLAGOTkc3u4evhlDm0A8NyvZxP4RsJYz2dYhexGAoNAE6FKzhXU2q8lqDJa 5vP7daYfkPHGYFoqoCmEWA1JJbp02FvhgmIuANRffGlrKRcdf9pGb1UjRFghgUkT9hD/ dZ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gglq4Xlt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c23si10327671ejk.252.2021.06.06.09.57.23; Sun, 06 Jun 2021 09:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gglq4Xlt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230246AbhFFQzW (ORCPT + 99 others); Sun, 6 Jun 2021 12:55:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230183AbhFFQzU (ORCPT ); Sun, 6 Jun 2021 12:55:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F324361408; Sun, 6 Jun 2021 16:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622998411; bh=PCUFcvjW5ZdETuEdS+iuJT4t+i6zWG2NG3M7MxBOHHw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=Gglq4Xlt5gvuQ2fLEjSSCEa4SXhxH8EAJPmIoSJl5R4VFssDmKArB2wk7IQwzfdxd Ky3RQal+ElhyemZkSiSkNAaTf/aaowATH8TQvdmjOV1aH7XcTpzQSu3oDzotcCG+UP ckS4mXSbIRWBHZBHzQNN8MdLQDdHwQHrQlP7jPcGYUhQiQDFGPlEvVtjmfhhkR7xQX s/XW2EjXKdzDyNdNGPAgiwElC+pCxNj24NpgpbWv8IgZsmTSz626fwVkZ5sMTuHBDE Tc1cmWN3CjbJMp8md/019RLT2onFF8K1HK6FSb4A/NCjM0B9IxjUbTlz7+nPRQltOw UiR7do94hc3Qw== Received: by mail-lj1-f181.google.com with SMTP id m3so18596075lji.12; Sun, 06 Jun 2021 09:53:30 -0700 (PDT) X-Gm-Message-State: AOAM530wzO4XSAZWFETeTVftPEyfaWyqoTO3xJKdX6EqL95paqS+59vv wSgDCxRj5/LwBTHzDyPx1Pegn2jh44QfDoNzirU= X-Received: by 2002:a05:651c:502:: with SMTP id o2mr11713139ljp.105.1622998409312; Sun, 06 Jun 2021 09:53:29 -0700 (PDT) MIME-Version: 1.0 References: <1622970249-50770-1-git-send-email-guoren@kernel.org> <1622970249-50770-15-git-send-email-guoren@kernel.org> <811499816.OAcyhOWOk8@jernej-laptop> In-Reply-To: <811499816.OAcyhOWOk8@jernej-laptop> From: Guo Ren Date: Mon, 7 Jun 2021 00:53:17 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v2 11/11] riscv: soc: Allwinner D1 GMAC driver only for temp use To: =?UTF-8?Q?Jernej_=C5=A0krabec?= Cc: Arnd Bergmann , Anup Patel , Palmer Dabbelt , Chen-Yu Tsai , Maxime Ripard , Drew Fustini , liush@allwinnertech.com, =?UTF-8?B?V2VpIFd1ICjlkLTkvJ8p?= , wefu@redhat.com, linux-riscv , Linux Kernel Mailing List , linux-arch , linux-sunxi@lists.linux.dev, Maxime Ripard , Corentin Labbe , Samuel Holland , Icenowy Zheng , LABBE Corentin , Michael Walle , Guo Ren Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 7, 2021 at 12:32 AM Jernej =C5=A0krabec wrote: > > Dne nedelja, 06. junij 2021 ob 18:16:44 CEST je Arnd Bergmann napisal(a): > > On Sun, Jun 6, 2021 at 11:04 AM wrote: > > > diff --git a/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts > > > b/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts index > > > cd9f7c9..31b681d 100644 > > > --- a/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts > > > +++ b/arch/riscv/boot/dts/allwinner/allwinner-d1-nezha-kit.dts > > > @@ -11,7 +11,7 @@ > > > > > > compatible =3D "allwinner,d1-nezha-kit"; > > > > > > chosen { > > > > > > - bootargs =3D "console=3DttyS0,115200"; > > > + bootargs =3D "console=3DttyS0,115200 rootwait init=3D= /sbin/init > > > root=3D/dev/nfs rw nfsroot=3D192.168.101.200:/tmp/rootfs_nfs,v3,tcp,n= olock > > > ip=3D192.168.101.23"; > > These are not board specific options, they should be set by the bootloa= der > > according to the network environment. It clearly doens't belong > > into this patch . > > > > > stdout-path =3D &serial0; > > > > > > }; > > > > > > diff --git a/arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi > > > b/arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi index 11cd938..d317= e19 > > > 100644 > > > --- a/arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi > > > +++ b/arch/riscv/boot/dts/allwinner/allwinner-d1.dtsi > > > @@ -80,5 +80,21 @@ > > > > > > clocks =3D <&dummy_apb>; > > > status =3D "disabled"; > > > > > > }; > > > > > > + > > > + eth@4500000 { > > > + compatible =3D "allwinner,sunxi-gmac"; > > > + reg =3D <0x00 0x4500000 0x00 0x10000 0x00 0x3= 000030 > > > 0x00 0x04>; + interrupts-extended =3D <&plic 0x= 3e > > > 0x04>; > > > + interrupt-names =3D "gmacirq"; > > > + device_type =3D "gmac0"; > > > + phy-mode =3D "rgmii"; > > > + use_ephy25m =3D <0x01>; > > > + tx-delay =3D <0x03>; > > > + rx-delay =3D <0x03>; > > > + gmac-power0; > > > + gmac-power1; > > > + gmac-power2; > > > + status =3D "okay"; > > > + }; > > > > Before you add this in the dts file, the properties need to be document= ed in > > the binding file. The "allwinner,sunxi-gmac" identifier does not appear= to > > be specific enough here, and the properties don't match what dwmac uses= , > > which would make it unnecessarily hard to change to the other driver la= ter > > on without breaking compatibility to old dtb files. > > > > > +++ b/drivers/net/ethernet/allwinnertmp/sunxi-gmac-ops.c > > > @@ -0,0 +1,690 @@ > > > +/* > > > + * linux/drivers/net/ethernet/allwinner/sunxi_gmac_ops.c > > > + * > > > + * Copyright =C2=A9 2016-2018, fuzhaoke > > > + * Author: fuzhaoke > > > + * > > > + * This file is provided under a dual BSD/GPL license. When using o= r > > > + * redistributing this file, you may do so under either license. > > > > Are you sure this is the correct copyright information and "fuzhaoke" i= s > > the copyright holder for this file? If this is derived from either the > > designware > > code or the Linux stmmac driver, the authors should be mentioned, > > and the license be compatible with the original license terms. > > > > Andre already commented on the driver quality and code duplication, tho= se > > are also show-stoppers, but the unclear license terms and dt binding > > compatibility are even stronger reasons to not get anywhere close to th= is > > driver. > > I got impression that this patch is not meant to be merged and it's forwa= rd > ported from vendor kernel as a stop gap measure for developers until prop= er > mainline ethernet driver is developed. Yes > > Best regards, > Jernej > > > > --=20 Best Regards Guo Ren ML: https://lore.kernel.org/linux-csky/