From patchwork Sat Jun 11 22:06:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Suvorov X-Patchwork-Id: 1642481 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=enVFov1a; 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 (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LLBmj3hcKz9s07 for ; Sun, 12 Jun 2022 08:08:37 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 96A788443E; Sun, 12 Jun 2022 00:07:26 +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="enVFov1a"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 05A688442E; Sun, 12 Jun 2022 00:07:14 +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=unavailable autolearn_force=no version=3.4.2 Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) (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 F0FCF84413 for ; Sun, 12 Jun 2022 00:07:09 +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=oleksandr.suvorov@foundries.io Received: by mail-lj1-x22b.google.com with SMTP id b7so2579772ljr.6 for ; Sat, 11 Jun 2022 15:07:09 -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=gWmcAeY/n997trkjvpsDLKo5+/IP7l5cw3jhGTObwes=; b=enVFov1a6mndBlVM3MhtdI37+gqhdYRpzEu2/xgCBuoLNaboYhiWcJEl7IUfP44bye FeLtSO2X1AYB0D7MBoVl4IMZkF5ymNVyfXuXZcmaY26B9yujW+eaP8PovRjkPBDmc7Dd Yo6FcQh5+/vUbAkyGMcCLJeVtP0A5Y/AvaWgYhIrzLVpc0SpNEst1MQHD6w7mdY1m9DR V2Li6+QXc0s0ACf64B7pEeWoEXg+EutkhGhW0054KJgKudKE/+80aX3Eta0tvHPzGPrS 1+upZpvIGvbs5eLL+ZvxEGFC6/UZ+6rdf4vxhUim33eQNeiz2UPRcaNGSOEVvKV7FzQN Bdww== 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=gWmcAeY/n997trkjvpsDLKo5+/IP7l5cw3jhGTObwes=; b=DIGYxnjT/VcJh6UFVOJXZif/cH3xC/hJvXdF/MUL3pcG2RJ5tEjGdLHAvlLBj6QOVO Lcs0x9esUejt7sBJ7Y97wGIhRGVRkeQcZIGdj+fYsLymYUTzlb82BznP3Koyy0sijmiX XuTJ2jedReotcJr+CJHfWlTIH3sbERiUPHIKXpgRArbfMeIbRHnPgSs4nkFEj5VcyXF1 7KNeDwWbzrZ3lrp+0Ii0eNsvjMffIE0QZxe9+ff1M1mPyA45X8oby+ukjbtb+l6sTTmb 3tK4qBGnbKB08q6RuRWB7ImY1vUmURMPl9WZ/WdXm5X1Yj7fJekCMJeOaxGF1l9ln/I8 bufw== X-Gm-Message-State: AOAM533XA54vF+2MDgSTXYhTNYEG9QGZcmvMpBqL+zoV4UgvUWyZ7CSV JyUjbY2Br4prpO60Bi/MwE74i4x2hQKTMQ== X-Google-Smtp-Source: ABdhPJyiVQoRcwQFqSV202rGOYEuQR2UUOQQyAAgP22+L9NUQGlL8dT+R7FUAacA3SRHrAICL5HDPg== X-Received: by 2002:a2e:8681:0:b0:251:fd91:41a with SMTP id l1-20020a2e8681000000b00251fd91041amr63000898lji.216.1654985229543; Sat, 11 Jun 2022 15:07:09 -0700 (PDT) Received: from cryobook.. ([93.188.34.55]) by smtp.gmail.com with ESMTPSA id c30-20020a2ebf1e000000b0025583eb9becsm433623ljr.69.2022.06.11.15.07.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 15:07:09 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Adrian Fiergolski , Ricardo Salveti , Jorge Ramirez-Ortiz , Michal Simek , Igor Opaniuk , Oleksandr Suvorov , Aswath Govindraju , Heiko Schocher , Michal Simek , Nishanth Menon , Simon Glass Subject: [PATCH v10 08/13] spl: fit: pass real compatible flags to fpga_load() Date: Sun, 12 Jun 2022 01:06:49 +0300 Message-Id: <20220611220654.103236-9-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220611220654.103236-8-oleksandr.suvorov@foundries.io> References: <20220611220654.103236-1-oleksandr.suvorov@foundries.io> <20220611220654.103236-2-oleksandr.suvorov@foundries.io> <20220611220654.103236-3-oleksandr.suvorov@foundries.io> <20220611220654.103236-4-oleksandr.suvorov@foundries.io> <20220611220654.103236-5-oleksandr.suvorov@foundries.io> <20220611220654.103236-6-oleksandr.suvorov@foundries.io> <20220611220654.103236-7-oleksandr.suvorov@foundries.io> <20220611220654.103236-8-oleksandr.suvorov@foundries.io> 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.5 at phobos.denx.de X-Virus-Status: Clean Convert taken FPGA image "compatible" string to a binary compatible flag and pass it to an FPGA driver. Signed-off-by: Oleksandr Suvorov --- Changes in v10: - made the message about ignoring legacy compatibe option as debug common/spl/spl_fit.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index 3c5a91916cc..1bf953b44a4 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -588,10 +588,14 @@ static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node, (u32)fpga_image->load_addr, fpga_image->size); compatible = fdt_getprop(ctx->fit, node, "compatible", NULL); - if (!compatible) + if (!compatible) { warn_deprecated("'fpga' image without 'compatible' property"); - else if (strcmp(compatible, "u-boot,fpga-legacy")) - printf("Ignoring compatible = %s property\n", compatible); + } else { + flags = fpga_compatible2flag(devnum, compatible); + if (strcmp(compatible, "u-boot,fpga-legacy")) + debug("Ignoring compatible = %s property\n", + compatible); + } ret = fpga_load(devnum, (void *)fpga_image->load_addr, fpga_image->size, BIT_FULL, flags);