From patchwork Tue Oct 5 11:13:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 1536608 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=DfjDXyIj; dkim-atps=neutral Authentication-Results: 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=) 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 RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HNw250LNgz9sPf for ; Tue, 5 Oct 2021 22:13:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1E1EC829C7; Tue, 5 Oct 2021 13:13:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io 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=foundries.io header.i=@foundries.io header.b="DfjDXyIj"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C97CB81197; Tue, 5 Oct 2021 13:13:34 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B33E681F0B for ; Tue, 5 Oct 2021 13:13:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wm1-x32e.google.com with SMTP id z184-20020a1c7ec1000000b003065f0bc631so2713952wmc.0 for ; Tue, 05 Oct 2021 04:13:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qLN02JIO3+QcWr6E9b5BysZFBVvT4siToXQm4AFl9Jk=; b=DfjDXyIjqktpKX2qTA9xBM6BoyodA2C9ZcWBt6Z5GS82haAM3bQsCytnOmxYpjfLB7 lIhr4IS569CycbaDoipVmSqihhIXlsbXzWIe+0OQ+wZqIbuKSoD19Gzhhc4V2vSHq0ub T9XvRIS5gSuxFzivgcK4QXfeCd+NLETNehH3zWVrBCo0t67/XWXuFSnz013Kmtxz0SA+ 2ZAERCUQzm5EGHMVZnXSKJfvosNcjBYVpIgGKjHMPYdKO5CnzbjQBLORHE7rYHhIdEYP zOwU+AHpd7rX9Hd+2dij5IwYwVhVgG07ceooe2rGCbUiuflNjg327YkPfPPID3SeTc/W 6Juw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qLN02JIO3+QcWr6E9b5BysZFBVvT4siToXQm4AFl9Jk=; b=PBFurzF537OZqqJzyt/zm1TMThwYSYCLb+7doP3BJxA4Rf/Ho6yf8BwlMu7UtGm+R/ MSRgdkv2OE51U6yJYSa6MoCAU+s9gzfXjB2XDhXzn2GutQcISic3kccfypnNGkFBf0ho oKc3N8oaArAAMUmWN2tTJ8uggeh+7fGeIj9mRDseisX4kegKncj9rekVD7AhjdBNpm0O 78qhUkkwWNeBoRinwjEMQQzhiPLjwxp+8tkfNmllyMecsuW2K4MAdHrhHin24fuVcTWg fY0YRzCKHqbiJhnS7zawF9meb9xa/pDjWOsoKVPwKH8hbC/dsjevEPmFy9swwbIGWGCS AdMw== X-Gm-Message-State: AOAM530jGunqAgkg6gzwqRINoUfXLqjZVwLGXPchjfHGhHjqD7I3bLGQ HYTNA9U5A7pbwy1iC5zAb7vwSQ== X-Google-Smtp-Source: ABdhPJw8TO7PREv4AUMIlMGT7gyFqyg3pTUiQeVUP0RNXomMyYzI3e4pgL1hv1i5YIp8TOdyyTI91A== X-Received: by 2002:a05:600c:1c26:: with SMTP id j38mr2861284wms.12.1633432411359; Tue, 05 Oct 2021 04:13:31 -0700 (PDT) Received: from localhost.localdomain (197.red-79-154-202.dynamicip.rima-tde.net. [79.154.202.197]) by smtp.gmail.com with ESMTPSA id i92sm16882825wri.28.2021.10.05.04.13.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 04:13:31 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, michal.simek@xilinx.com, trini@konsulko.com, sjg@chromium.org, mr.nuke.me@gmail.com Cc: u-boot@lists.denx.de, ricardo@foundries.io, mike@foundries.io, igor.opaniuk@foundries.io Subject: [RFC PATCH 1/2] fpga_load: pass compatible string Date: Tue, 5 Oct 2021 13:13:23 +0200 Message-Id: <20211005111324.19749-2-jorge@foundries.io> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211005111324.19749-1-jorge@foundries.io> References: <20211005111324.19749-1-jorge@foundries.io> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Instead of ignoring the mandatory fpga compatible string, let the different implementations decide how to handle it Signed-off-by: Jorge Ramirez-Ortiz Reviewed-by: Simon Glass --- cmd/fpga.c | 8 ++++---- common/image.c | 4 ++-- common/spl/spl_fit.c | 4 +--- drivers/fpga/fpga.c | 11 +++++++++-- include/fpga.h | 2 +- 5 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cmd/fpga.c b/cmd/fpga.c index 3fdd0b35e8..f3ed1fcdff 100644 --- a/cmd/fpga.c +++ b/cmd/fpga.c @@ -178,7 +178,7 @@ static int do_fpga_load(struct cmd_tbl *cmdtp, int flag, int argc, if (ret) return ret; - return fpga_load(dev, (void *)fpga_data, data_size, BIT_FULL); + return fpga_load(dev, (void *)fpga_data, data_size, BIT_FULL, NULL); } static int do_fpga_loadb(struct cmd_tbl *cmdtp, int flag, int argc, @@ -209,7 +209,7 @@ static int do_fpga_loadp(struct cmd_tbl *cmdtp, int flag, int argc, if (ret) return ret; - return fpga_load(dev, (void *)fpga_data, data_size, BIT_PARTIAL); + return fpga_load(dev, (void *)fpga_data, data_size, BIT_PARTIAL, NULL); } #endif @@ -315,7 +315,7 @@ static int do_fpga_loadmk(struct cmd_tbl *cmdtp, int flag, int argc, data_size = image_get_data_size(hdr); } return fpga_load(dev, (void *)data, data_size, - BIT_FULL); + BIT_FULL, NULL); } #endif #if defined(CONFIG_FIT) @@ -355,7 +355,7 @@ static int do_fpga_loadmk(struct cmd_tbl *cmdtp, int flag, int argc, return CMD_RET_FAILURE; } - return fpga_load(dev, fit_data, data_size, BIT_FULL); + return fpga_load(dev, fit_data, data_size, BIT_FULL, NULL); } #endif default: diff --git a/common/image.c b/common/image.c index e199d61a4c..97f3deda24 100644 --- a/common/image.c +++ b/common/image.c @@ -1516,14 +1516,14 @@ int boot_get_fpga(int argc, char *const argv[], bootm_headers_t *images, img_len, BIT_FULL); if (err) err = fpga_load(devnum, (const void *)img_data, - img_len, BIT_FULL); + img_len, BIT_FULL, NULL); } else { name = "partial"; err = fpga_loadbitstream(devnum, (char *)img_data, img_len, BIT_PARTIAL); if (err) err = fpga_load(devnum, (const void *)img_data, - img_len, BIT_PARTIAL); + img_len, BIT_PARTIAL, NULL); } if (err) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index f41abca0cc..4db22efd8c 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -566,11 +566,9 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, compatible = fdt_getprop(ctx->fit, node, "compatible", NULL); if (!compatible) warn_deprecated("'fpga' image without 'compatible' property"); - else if (strcmp(compatible, "u-boot,fpga-legacy")) - printf("Ignoring compatible = %s property\n", compatible); ret = fpga_load(0, (void *)fpga_image->load_addr, fpga_image->size, - BIT_FULL); + BIT_FULL, compatible); if (ret) { printf("%s: Cannot load the image to the FPGA\n", __func__); return ret; diff --git a/drivers/fpga/fpga.c b/drivers/fpga/fpga.c index fe3dfa1233..00aa4190b4 100644 --- a/drivers/fpga/fpga.c +++ b/drivers/fpga/fpga.c @@ -252,7 +252,8 @@ int fpga_loads(int devnum, const void *buf, size_t size, /* * Generic multiplexing code */ -int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype) +int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype, + const char *compatible) { int ret_val = FPGA_FAIL; /* assume failure */ const fpga_desc *desc = fpga_validate(devnum, buf, bsize, @@ -263,13 +264,16 @@ int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype) case fpga_xilinx: #if defined(CONFIG_FPGA_XILINX) ret_val = xilinx_load(desc->devdesc, buf, bsize, - bstype); + bstype, compatible); #else fpga_no_sup((char *)__func__, "Xilinx devices"); #endif break; case fpga_altera: #if defined(CONFIG_FPGA_ALTERA) + if (strcmp(compatible, "u-boot,fpga-legacy")) + printf("Ignoring compatible = %s property\n", + compatible); ret_val = altera_load(desc->devdesc, buf, bsize); #else fpga_no_sup((char *)__func__, "Altera devices"); @@ -277,6 +281,9 @@ int fpga_load(int devnum, const void *buf, size_t bsize, bitstream_type bstype) break; case fpga_lattice: #if defined(CONFIG_FPGA_LATTICE) + if (strcmp(compatible, "u-boot,fpga-legacy")) + printf("Ignoring compatible = %s property\n", + compatible); ret_val = lattice_load(desc->devdesc, buf, bsize); #else fpga_no_sup((char *)__func__, "Lattice devices"); diff --git a/include/fpga.h b/include/fpga.h index ec5144334d..d85ef2cf18 100644 --- a/include/fpga.h +++ b/include/fpga.h @@ -64,7 +64,7 @@ int fpga_count(void); const fpga_desc *const fpga_get_desc(int devnum); int fpga_is_partial_data(int devnum, size_t img_len); int fpga_load(int devnum, const void *buf, size_t bsize, - bitstream_type bstype); + bitstream_type bstype, const char *compatible); int fpga_fsload(int devnum, const void *buf, size_t size, fpga_fs_info *fpga_fsinfo); int fpga_loads(int devnum, const void *buf, size_t size, From patchwork Tue Oct 5 11:13:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jorge Ramirez-Ortiz X-Patchwork-Id: 1536610 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=foundries.io header.i=@foundries.io header.a=rsa-sha256 header.s=google header.b=irj1NObu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4HNw2G25X2z9sPf for ; Tue, 5 Oct 2021 22:13:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 441A882D78; Tue, 5 Oct 2021 13:13:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io 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=foundries.io header.i=@foundries.io header.b="irj1NObu"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9724282900; Tue, 5 Oct 2021 13:13:38 +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 autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id BE4DB8291E for ; Tue, 5 Oct 2021 13:13:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=foundries.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jorge@foundries.io Received: by mail-wr1-x431.google.com with SMTP id o20so18619961wro.3 for ; Tue, 05 Oct 2021 04:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundries.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=myncwlF8c4vmGBNb+0vJ43QeQ4OJtMhWem38MMIBIPE=; b=irj1NObuU89dbe1j0g/VycosyhXuJ9c9CHUKXyCaXd09ADaRm4wI+vFNnSZUZKq+mt Sdi+5oj16HigwIdckPP5g8y60qIRFvs7ryuu9CrtJv5eTdm6VQhUTkP+Nih/BFi5S7Us YxZEPsvYSIBlzbNyMxLBuUSv/jxuv3ScxEEXL+uNgE84q+mFFsChtn2VqS0yaV75+epP jVnmb7WKk6C0nGWtH+umFZDA3F3V/thJL/ZiaKHy3MuaBUki8TsOwVAPLVDcNubNpiR/ JkR/gc1lETkw1Zf0xmnZ/2HGvEIBVMT2t3Ul6b1WGnCgeaq+g2/S1uUFXTIRhZDuWL4z /b3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=myncwlF8c4vmGBNb+0vJ43QeQ4OJtMhWem38MMIBIPE=; b=H8DcLPQfbQEuNsxEjPdDJelbncr6dJTUvDD5k/AgHjCyJd4QXaOehw0ep6cXKKpT1Z erA+Ev+6bQI8zlHJUafBqS4tTuo6t17a9XmIiNn8jPGi0/oKmY7muJUupntau9K7K0Tf Sy9quBoMpg9FUtl2hvVT24f7ugnsmNplneliCdKW85Ixlnpv+hZKEicuu1ViN6timKJi Mg9UN4SefxqmVRh8kOddqVoXOTQRhj5YjQxLEjef9m83mfmzPx7Dfa+lhDqX2XVtAoxF NaHEwP0dJV3qNFsI1QmbbKMdawfhZvUtVxJAXH5XtEQt64X7KxE9dQJOqIkJNyPFWBDa BhSQ== X-Gm-Message-State: AOAM531+mDT98A7a3hpIwz2nIsfyDHfFSAOkcaVRQaBl9s/VwxrC409i 6SMZAS5vKPCLMVz1blhPgbC/DL2W33WWIw== X-Google-Smtp-Source: ABdhPJy5k99qs5pSzmaz3GhrHQ6t8uD9qd5RGk88r6MF3lF1wvMXjIQzmBCkiBt2QoL1GB2kSnrfeA== X-Received: by 2002:a05:6000:1546:: with SMTP id 6mr20751367wry.305.1633432412414; Tue, 05 Oct 2021 04:13:32 -0700 (PDT) Received: from localhost.localdomain (197.red-79-154-202.dynamicip.rima-tde.net. [79.154.202.197]) by smtp.gmail.com with ESMTPSA id i92sm16882825wri.28.2021.10.05.04.13.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Oct 2021 04:13:32 -0700 (PDT) From: Jorge Ramirez-Ortiz To: jorge@foundries.io, michal.simek@xilinx.com, trini@konsulko.com, sjg@chromium.org, mr.nuke.me@gmail.com Cc: u-boot@lists.denx.de, ricardo@foundries.io, mike@foundries.io, igor.opaniuk@foundries.io Subject: [RFC PATCH 2/2] fpga: xilinx: allow loading authenticated images (DDR) Date: Tue, 5 Oct 2021 13:13:24 +0200 Message-Id: <20211005111324.19749-3-jorge@foundries.io> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211005111324.19749-1-jorge@foundries.io> References: <20211005111324.19749-1-jorge@foundries.io> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Add new compatible string u-boot,zynqmp-fpga-ddrauth to handle this use case. Signed-off-by: Jorge Ramirez-Ortiz --- drivers/fpga/xilinx.c | 29 +++++++++++++++++++++++++---- drivers/fpga/zynqmppl.c | 4 ++-- include/xilinx.h | 2 +- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c index cbebefb55f..c8035105e2 100644 --- a/drivers/fpga/xilinx.c +++ b/drivers/fpga/xilinx.c @@ -135,23 +135,44 @@ int fpga_loadbitstream(int devnum, char *fpgadata, size_t size, dataptr += 4; printf(" bytes in bitstream = %d\n", swapsize); - return fpga_load(devnum, dataptr, swapsize, bstype); + return fpga_load(devnum, dataptr, swapsize, bstype, NULL); } int xilinx_load(xilinx_desc *desc, const void *buf, size_t bsize, - bitstream_type bstype) + bitstream_type bstype, const char *compatible) { + struct fpga_secure_info info = { 0 }; + if (!xilinx_validate (desc, (char *)__FUNCTION__)) { printf ("%s: Invalid device descriptor\n", __FUNCTION__); return FPGA_FAIL; } - if (!desc->operations || !desc->operations->load) { + if (!desc->operations) { printf("%s: Missing load operation\n", __func__); return FPGA_FAIL; } - return desc->operations->load(desc, buf, bsize, bstype); + if (!compatible || !strcmp(compatible, "u-boot,fpga-legacy")) { + if (!desc->operations->load) { + printf("%s: Missing load operation\n", __func__); + return FPGA_FAIL; + } + return desc->operations->load(desc, buf, bsize, bstype); + } + + if (!strcmp(compatible, "u-boot,zynqmp-fpga-ddrauth")) { + if (!desc->operations->loads) { + printf("%s: Missing load operation\n", __func__); + return FPGA_FAIL; + } + /* DDR authentication */ + info.authflag = 1; + return desc->operations->loads(desc, buf, bsize, &info); + } + + printf("%s: compatible support not implemented\n", __func__); + return FPGA_FAIL; } #if defined(CONFIG_CMD_FPGA_LOADFS) diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c index 6b394869db..65a9412123 100644 --- a/drivers/fpga/zynqmppl.c +++ b/drivers/fpga/zynqmppl.c @@ -245,7 +245,7 @@ static int zynqmp_load(xilinx_desc *desc, const void *buf, size_t bsize, return ret; } -#if defined(CONFIG_CMD_FPGA_LOAD_SECURE) && !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_CMD_FPGA_LOAD_SECURE) static int zynqmp_loads(xilinx_desc *desc, const void *buf, size_t bsize, struct fpga_secure_info *fpga_sec_info) { @@ -306,7 +306,7 @@ static int zynqmp_pcap_info(xilinx_desc *desc) struct xilinx_fpga_op zynqmp_op = { .load = zynqmp_load, -#if defined(CONFIG_CMD_FPGA_LOAD_SECURE) && !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_CMD_FPGA_LOAD_SECURE) .loads = zynqmp_loads, #endif .info = zynqmp_pcap_info, diff --git a/include/xilinx.h b/include/xilinx.h index ab4537becf..ae78009e6b 100644 --- a/include/xilinx.h +++ b/include/xilinx.h @@ -59,7 +59,7 @@ struct xilinx_fpga_op { /* Generic Xilinx Functions *********************************************************************/ int xilinx_load(xilinx_desc *desc, const void *image, size_t size, - bitstream_type bstype); + bitstream_type bstype, const char *compatible); int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize); int xilinx_info(xilinx_desc *desc); int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,