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 8935FC3DA78 for ; Sat, 14 Jan 2023 20:06:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0ACA6851A4; Sat, 14 Jan 2023 21:06:44 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="PPq4i6mV"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1C64185084; Sat, 14 Jan 2023 21:06:42 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (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 1B36D851A4 for ; Sat, 14 Jan 2023 21:06:39 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8C487B80A06; Sat, 14 Jan 2023 20:06:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC5BDC433EF; Sat, 14 Jan 2023 20:06:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673726797; bh=0HNoh88+4d+gXCx6rj0d5T1xKJ5vPL9j1Eqe7rSx6IM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PPq4i6mVkvbNBJGkIu4W2GGqWD6zT9qfr2b0e8Vj7eKTjbXtG8VvNCXS1W59ne1uG v7/MmK5F5sMjyYKu7SbhqzbMkzs2z4riLjm8Bez9UMlX5sn17BUuWJJ/oLRGNa/Njl 7/gprF/1v/MhhlNo0Mtcx762k3e+i8y/Gct8GGIV07pFpsAFqc3v8Cia/gb/q7Hlms 8PCW7G+P/SmQK/WR4kMtm0cqSp/K3wDovhJ7jAUB5Wz4stnxqdMGhSddp8BSCn6O00 35ZmkXA9+ah5edFH11N7gDYRxBuqAGuVQejX49D/cCZvYh/janpUODk7ECAGRFwus/ jNCwXKqnERT/g== Received: by pali.im (Postfix) id A96B8650; Sat, 14 Jan 2023 21:06:33 +0100 (CET) Date: Sat, 14 Jan 2023 21:06:33 +0100 From: Pali =?utf-8?B?Um9ow6Fy?= To: Tom Rini Cc: Tony Dinh , U-Boot Mailing List , Stefan Roese , Marek =?utf-8?B?QmVo77+9bg==?= , Chris Packham , Michael Trimarchi , Mark Kettenis , Simon Glass , Jaehoon Chung , Marek =?utf-8?B?QmVow4PCum4=?= Subject: Re: [PATCH] ddr: marvell: a38x: Add support for DDR4 from Marvell mv-ddr-marvell repository Message-ID: <20230114200633.lyrleawekk556bpp@pali> References: <20230114003856.9208-1-mibodhi@gmail.com> <20230114014132.mtv5r7kbdl4z4zsf@pali> <20230114020021.GA3880571@bill-the-cat> <20230114185100.kco3bcgka3zg256z@pali> <20230114200341.GH3880571@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230114200341.GH3880571@bill-the-cat> User-Agent: NeoMutt/20180716 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.6 at phobos.denx.de X-Virus-Status: Clean On Saturday 14 January 2023 15:03:41 Tom Rini wrote: > On Sat, Jan 14, 2023 at 07:51:00PM +0100, Pali Rohár wrote: > > On Friday 13 January 2023 21:00:21 Tom Rini wrote: > > > On Sat, Jan 14, 2023 at 02:41:32AM +0100, Pali Rohár wrote: > > > > On Friday 13 January 2023 16:38:55 Tony Dinh wrote: > > > > > @@ -16,4 +19,9 @@ obj-$(CONFIG_SPL_BUILD) += mv_ddr_build_message.o > > > > > obj-$(CONFIG_SPL_BUILD) += mv_ddr_common.o > > > > > obj-$(CONFIG_SPL_BUILD) += mv_ddr_spd.o > > > > > obj-$(CONFIG_SPL_BUILD) += mv_ddr_topology.o > > > > > +obj-$(CONFIG_SPL_BUILD) += mv_ddr4_mpr_pda_if.o > > > > > +obj-$(CONFIG_SPL_BUILD) += mv_ddr4_training.o > > > > > +obj-$(CONFIG_SPL_BUILD) += mv_ddr4_training_calibration.o > > > > > +obj-$(CONFIG_SPL_BUILD) += mv_ddr4_training_db.o > > > > > +obj-$(CONFIG_SPL_BUILD) += mv_ddr4_training_leveling.o > > > > > obj-$(CONFIG_SPL_BUILD) += xor.o > > > > > > > > And all these new files are ddr4 specific, so should be wrapped in makefile section: > > > > ifdef CONFIG_DDR4 > > > > > > Looking at the Makefile in question, I think we might want to make the > > > whole thing ifdef CONFIG_SPL_BUILD ... endif and then more finely > > > control building of what objects are built. Perhaps: > > > drivers/Makefile:obj-$(CONFIG_ARMADA_38X) += ddr/marvell/a38x/ > > > should only be for SPL instead, even? > > > > Some cleanup like this can be done. But it is related to DDR4 support > > and is mostly independent of it. So lets do it after having DDR4 there. > > We're going to also want to not build the DDR3 code on the DDR4 > platforms, right? A little clean up would make adding the DDR4 code a > bit cleaner for both cases. It's not a hard no, if someone really wants > to do the clean-up after. I can look at it _after_ all other stuff is done and merged.