From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Wed, 13 Mar 2024 16:43:02 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1rkQkw-004ZuN-2E for lore@lore.pengutronix.de; Wed, 13 Mar 2024 16:43:02 +0100 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rkQkw-0002j8-1D for lore@pengutronix.de; Wed, 13 Mar 2024 16:43:02 +0100 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=QB5Xmg3KluEF5tL+INRehSzH5+8sFcrJ2AdGAPvBJr0=; b=PVAHtI8TydG84/RqfHC8kVhSAR +MHcXiivDNZ1Rj4LvwwCw7uNWXcKgMf2VMQutqRQdtS9TsBKgjAppiZurEoGNFD29xvx9Uy6Vxg47 2zM+YLqPuVxHK/Cu4dNQjGcVrClp7YqaltA9pMO/CyhzQk7ux8kMiEhYmclCsAqnGWimj1V54Q245 +0MdxAa/Y3P1UW5mnm4YuTIm3A56j0xSTdI+UQVBKtGVBtS/Y2eMH+Ce9YKNMJVI6dJI20K08rGMy qk2aXxh9k5mJEZ5R9Tw5S5H+JAfO3S8ehqCfRCjw8t4QOKekjQwbYirzyAaa8f1UfxrshFGAqL0NI ajGHTQfw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkQkL-0000000AeKF-3PUr; Wed, 13 Mar 2024 15:42:25 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkQkG-0000000AeJV-0Q5c for barebox@lists.infradead.org; Wed, 13 Mar 2024 15:42:22 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rkQkE-00022G-B9; Wed, 13 Mar 2024 16:42:18 +0100 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rkQkD-0068rQ-Uz; Wed, 13 Mar 2024 16:42:17 +0100 Received: from localhost ([::1] helo=dude05.red.stw.pengutronix.de) by dude05.red.stw.pengutronix.de with esmtp (Exim 4.96) (envelope-from ) id 1rkQkD-00BWvH-14; Wed, 13 Mar 2024 16:42:17 +0100 From: Ahmad Fatoum To: barebox@lists.infradead.org Cc: Ahmad Fatoum Date: Wed, 13 Mar 2024 16:42:17 +0100 Message-Id: <20240313154217.2747582-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240313_084220_505712_9144D602 X-CRM114-Status: GOOD ( 13.40 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.6 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Subject: [PATCH] ddr: imx8m: add deprecation warnings for ddrphy_trained_csr X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) ddrphy_trained_csr and ddrphy_trained_csr_num are generated by the spreadsheet, but are unused. Instead a default array with fixed values is unconditionally used. Add a deprecation warning to alert to this fact. It seems GCC doesn't print this deprecation when using C99 designated initializers, but clang(d) does, so it's useful to have for those using clangd in their editors. Signed-off-by: Ahmad Fatoum --- drivers/ddr/imx/helper.c | 7 +++++++ include/soc/imx/ddr.h | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/ddr/imx/helper.c b/drivers/ddr/imx/helper.c index 674ca7e4ac38..f9c25f7180b8 100644 --- a/drivers/ddr/imx/helper.c +++ b/drivers/ddr/imx/helper.c @@ -10,6 +10,13 @@ #include #include +/* + * We deprecate ddrphy_trained_csr(_num) for board code, so we can set it + * ourselves here + */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + void ddrphy_trained_csr_save(struct dram_controller *dram, struct dram_cfg_param *ddrphy_csr, unsigned int num) { diff --git a/include/soc/imx/ddr.h b/include/soc/imx/ddr.h index 8553452ad8a9..0225ac0e033c 100644 --- a/include/soc/imx/ddr.h +++ b/include/soc/imx/ddr.h @@ -54,6 +54,10 @@ struct dram_fsp_msg { unsigned int fsp_cfg_num; }; +#define __deprecated_dram_timing_info \ + __attribute__((deprecated("board-specific data here is ignored in favor of the defaults." \ + " You can probably remove the array"))) + struct dram_timing_info { /* umctl2 config */ struct dram_cfg_param *ddrc_cfg; @@ -68,8 +72,8 @@ struct dram_timing_info { struct dram_fsp_msg *fsp_msg; unsigned int fsp_msg_num; /* ddr phy trained CSR */ - struct dram_cfg_param *ddrphy_trained_csr; - unsigned int ddrphy_trained_csr_num; + struct dram_cfg_param *ddrphy_trained_csr __deprecated_dram_timing_info; + unsigned int ddrphy_trained_csr_num __deprecated_dram_timing_info; /* ddr phy PIE */ struct dram_cfg_param *ddrphy_pie; unsigned int ddrphy_pie_num; -- 2.39.2