From patchwork Mon Jun 19 10:28:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eugen Hristev X-Patchwork-Id: 1796503 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.a=rsa-sha256 header.s=mail header.b=JF6eoLol; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Ql6ds6vsWz20XQ for ; Mon, 19 Jun 2023 21:16:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id F05A585D7C; Mon, 19 Jun 2023 13:16:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com 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=collabora.com header.i=@collabora.com header.b="JF6eoLol"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6D3CD862ED; Mon, 19 Jun 2023 13:16:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: 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_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 44DC48628C for ; Mon, 19 Jun 2023 13:15:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=eugen.hristev@collabora.com Received: from eugen-station.. (unknown [192.166.149.251]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: ehristev) by madras.collabora.co.uk (Postfix) with ESMTPSA id 0131C6606F59; Mon, 19 Jun 2023 11:28:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1687170540; bh=z05ry7vUWjEbTUTWXFQZxDZRBDU+s1wnp95PGeIHeAg=; h=From:To:Cc:Subject:Date:From; b=JF6eoLolONYyf6XRBSmr0Dv5QARFbDCwh+PvBi42Th5pPV0q3j+NdaVBmQgrRkHSk iC9CFTzubZiFBZI48MiPRnn0uH7Xn2keDkzw/TvVlMwHcR5eiSWMajiOVtzey25gQG 0IG1QxIv6ktdCZ8bLwwWDNYfVIr6bIce/2DqdIFhB+BpKdhF/rmSjboRSE7gG3KX9w RA5VvIElLLegRPIRTBri9m9Bng2c0+RdYHzQG83IVgH0gWKH0FyhNhCfDe2YERbd31 m97alPYDnJB065Y7Fee5Aw9iS9XMIso2DYAuaazrYdlvUuDcgdOk8oTQ05tCRyRMPQ 7Jylg+n+QtVkA== From: Eugen Hristev To: u-boot@lists.denx.de, michal.simek@amd.com Cc: sjg@chromium.org, Eugen Hristev Subject: [PATCH RESEND] spl: spl_fit: add weak prototype for fpga_load Date: Mon, 19 Jun 2023 13:28:39 +0300 Message-Id: <20230619102839.277902-1-eugen.hristev@collabora.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean In case OPTIMIZE_DEBUG is set, unused code will not be optimized out, hence the reference to fpga_load will be compiled. if DM_FPGA and SPL_FPGA are not set, the build will fail with : aarch64-none-linux-gnu-ld.bfd: common/spl/spl_fit.o: in function `spl_fit_upload_fpga': u-boot/common/spl/spl_fit.c:595: undefined reference to `fpga_load' By adding a weak prototype, build is successful. Signed-off-by: Eugen Hristev --- common/spl/spl_fit.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index c51482b3b659..ca2e337b1ec4 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -570,6 +570,12 @@ static void warn_deprecated(const char *msg) printf("\tSee doc/uImage.FIT/source_file_format.txt\n"); } +__weak int fpga_load(int devnum, const void *buf, size_t bsize, + bitstream_type bstype, int flags) +{ + return 0; +} + static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, struct spl_image_info *fpga_image) {