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 Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C55B6C433EF for ; Thu, 31 Mar 2022 10:28:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F3FC483FBF; Thu, 31 Mar 2022 12:28:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="X25pfNys"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1697C83989; Thu, 31 Mar 2022 12:28:23 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 6A14B83FBF for ; Thu, 31 Mar 2022 12:28:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPS id E351A1405FA; Thu, 31 Mar 2022 12:28:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1648722499; bh=k1WOEVbQkxpJjoIaCFQGMn12qppCreQRD6n94B3JRPU=; h=Date:From:To; b=X25pfNysj4a+xFlW+iAOBvr5nV99zUdeZtb11bwnv4q4a0KVLrjrpOEHV9fbaJQvZ 7tOjuDtYOhv1En/gtGguVQP9HhvqAkPwuMkmVHYBQzprUU3vG9zNUgODctijhOSr3Y cV1yKpZ5QPM8iW/rF0mSi93BbdXm+Ft9kO2LONfk= Date: Thu, 31 Mar 2022 12:28:18 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Stefan Roese Cc: u-boot@lists.denx.de, Ramon Fried , Joe Hershberger , Aaron Williams , Chandrakala Chavva Subject: Re: [PATCH v2 1/2] net: phy: marvell: Support reg config via "marvell,reg-init" DT property Message-ID: <20220331122818.5e3abf85@thinkpad> In-Reply-To: <20220331094307.1250315-1-sr@denx.de> References: <20220331094307.1250315-1-sr@denx.de> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On Thu, 31 Mar 2022 11:43:06 +0200 Stefan Roese wrote: > This patch adds support for the "marvell,reg-init" DT property, which > is used to describe board specific Marvell PHY register configurations > in the board dts file. This DT property is supported in the Linux Kernel > since a longer time. Adding it to U-Boot now, enables the boards which > describe the register settings in their DT files here as well. >=20 > I've included calling this marvell_of_reg_init() to all foo_config() > functions in this patch as well. If CONFIG_DM_ETH is not set, there is > no ofnode, or no "marvell,reg-init" property, the PHY initialization is > unchanged. >=20 > The function marvell_of_reg_init() is a port of the Linux version. > Please note that I explicitly did not add error checking and handling > to the U-Boot version, as this is basically not done for phy_read/write > in this Marvell PHY code. >=20 > This will be used by the upcoming ethernet support on the MIPS > Octeon EBB 7304 board. >=20 > Signed-off-by: Stefan Roese > Cc: Ramon Fried > Cc: Joe Hershberger > Cc: Aaron Williams > Cc: Chandrakala Chavva > Cc: Marek Beh=C3=BAn I think fdt32_to_cpu() would be better than be32_to_cpup(), but that is just a nitpick. Reviewed-by: Marek Beh=C3=BAn