From patchwork Tue May 31 23:08:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksandr Suvorov X-Patchwork-Id: 1637657 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=Lwfa1Iv+; 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 4LCSfh3TTkz9sG6 for ; Wed, 1 Jun 2022 09:10:04 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 267F0842AF; Wed, 1 Jun 2022 01:09:12 +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="Lwfa1Iv+"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0802583E43; Wed, 1 Jun 2022 01:08:54 +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 mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) (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 E69DF83E43 for ; Wed, 1 Jun 2022 01:08:50 +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-wr1-x42d.google.com with SMTP id x17so10444wrg.6 for ; Tue, 31 May 2022 16:08:50 -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=JpUfmvLIwCohG1br5J7xsLMFJnRyUrSsEw2VSBmzP2o=; b=Lwfa1Iv+xIS5WgSErlVrnBfH0N6IbvxlIf1WfEX8emnImG5NqAauoWaYhgg9ZLKfbR F3vdgvv8T0G0xvVg2hyAuudWs9xuTJKcVpCaBZRC4FuTbFpWxKoF4aFnhqyw7h2ebuMd RZptJ1XZXOm3/ubqhuaCX0AxgONNEYw5Fi+oa6PhwSGIIaTIg1803+D+x7Fqk+2BGD2u qILNIA/JTXEt+r6u7ay9uo6UkjKiLl+s3RQZ4sDAjC5Atf1spQTWee6J+Uk5Kgl85IqJ lUmKG1IWQ+F13PjPixGPMAIHR3yYRn3ojCE13ezvLnAE4g1fmLNZJ151hwEpka8RlzfK SyEg== 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=JpUfmvLIwCohG1br5J7xsLMFJnRyUrSsEw2VSBmzP2o=; b=J6/tj6+kHl8bkd6yCg96NtPfJUhJhDpX/xbpHKMIkYxLTKp/rMh5IDcoxYmOAsUJro WjnUgFMkiixfrrOUI1n2Naxxbqrj/J7sIyMIOHoI3cxLpd2Is+XoRHygdTaZT/6LAqNx +GxtufD4sOYyfV3m4vB3JODz9xIFcpC/4iS8W0lG05FMjDXGEm/78dxhMlTlqhQQBaZD ec9aEZOrWtPxrJZZWj/fqZ+xLEwZ9gj2uLIRUcc0NWV977ZjZf+mEG1WbYthxd8E3p1f n6xUf4vRsOALEidBDP6Z6ZGjBcOXTALXzsJLFpyj+54zBjg/xpvh9xmFTipYG63gV0s9 EcRQ== X-Gm-Message-State: AOAM533cLDFep2bPKZgntvO4dIg/sa3eoMJKnhtT55fIvVM2nVC9cidu jnTRtYiF/1j9U8mjzG86oDQpv/Q0WWUtig== X-Google-Smtp-Source: ABdhPJztm2XvaMCuHeAKaw31pCg1TiXLaF4o3s+GsTmePr0CXzCCZrFixZGCLt1RiQayo5zwLVCL+g== X-Received: by 2002:a5d:4151:0:b0:210:316c:7bed with SMTP id c17-20020a5d4151000000b00210316c7bedmr11129294wrq.369.1654038530177; Tue, 31 May 2022 16:08:50 -0700 (PDT) Received: from cryobook.. ([93.188.34.55]) by smtp.gmail.com with ESMTPSA id j12-20020a5d618c000000b002102f4ebf73sm7673539wru.31.2022.05.31.16.08.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 May 2022 16:08:49 -0700 (PDT) From: Oleksandr Suvorov To: u-boot@lists.denx.de Cc: Michal Simek , Adrian Fiergolski , Ricardo Salveti , Jorge Ramirez-Ortiz , Igor Opaniuk , Oleksandr Suvorov , Michal Simek Subject: [PATCH v8 05/14] fpga: zynqmp: add str2flags call Date: Wed, 1 Jun 2022 02:08:30 +0300 Message-Id: <20220531230839.183690-6-oleksandr.suvorov@foundries.io> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220531230839.183690-5-oleksandr.suvorov@foundries.io> References: <20220531230839.183690-1-oleksandr.suvorov@foundries.io> <20220531230839.183690-2-oleksandr.suvorov@foundries.io> <20220531230839.183690-3-oleksandr.suvorov@foundries.io> <20220531230839.183690-4-oleksandr.suvorov@foundries.io> <20220531230839.183690-5-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 Add a call to convert FPGA "compatible" string to a binary flag. Signed-off-by: Oleksandr Suvorov --- (no changes since v1) drivers/fpga/zynqmppl.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/fpga/zynqmppl.c b/drivers/fpga/zynqmppl.c index 8ff12bf50a0..0ffcff0c148 100644 --- a/drivers/fpga/zynqmppl.c +++ b/drivers/fpga/zynqmppl.c @@ -304,10 +304,19 @@ static int zynqmp_pcap_info(xilinx_desc *desc) return ret; } +static int zynqmp_str2flag(xilinx_desc *desc, const char *str) +{ + if (!strncmp(str, "u-boot,fpga-legacy", 18)) + return FPGA_LEGACY; + + return 0; +} + struct xilinx_fpga_op zynqmp_op = { .load = zynqmp_load, #if CONFIG_IS_ENABLED(FPGA_LOAD_SECURE) .loads = zynqmp_loads, #endif .info = zynqmp_pcap_info, + .str2flag = zynqmp_str2flag, };