Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3467590pxb; Sun, 20 Feb 2022 21:18:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZQAmSRsOH8U2n7a7mdmXI98YP1fNiZpSnqP+EevQ64nBaGfiKB0sIfrYhhvkvSr2b5Oez X-Received: by 2002:a17:90b:4a50:b0:1b9:50b8:2b8b with SMTP id lb16-20020a17090b4a5000b001b950b82b8bmr24172190pjb.45.1645420691389; Sun, 20 Feb 2022 21:18:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645420691; cv=none; d=google.com; s=arc-20160816; b=ZksUjGEL6x/v/10eB87MaJzf/ICkSCBZHvYumXLNctc92V0XNo3DIlrK5GH/qsAol+ cFVphwbuT5OIviBOZ7qasNIR1dS1wqkZGB5pxKH9Kc4Eke/aiHLYmKS2azS+8jKdYoxP 4YSX2UHKl/M47DdCNg5Ly757J5hzaWwk59qt8W7zI08+zjQOtFKByWVKFDwtIIqG/NVT lLLFfM+ZSyOuuiPPell06Gow+Y1Z9pQxnXEYs3/IHxf2zg29aW3gdEjcUlL5qcANfTtF ycaeaetKObfApRsbAxlcz4Iugc5F5vzPpfebB4wJJY0pSPKOoTN0HyOmz4rxtuhYB0bP bJeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y4pmCks0AXtEcFMTomal0HBIMsTraQJdqlF0dGcH0nA=; b=ICdawGRGiY5m31gaKV2aOFzavIJkCm5cXSShqo3WxdX1jvEe1G68YVM4k8pqjSJxVC n1wjpLVznWi31Ya5r53HyC7wLpScCJcMGffpqIiKsAQHhiDOWydbfMWKhH7bP44WqEkC wjJxJXMBrkyaICtfSbku28wbDHwSJn+rbxa0s7oH4O7xvVd/qlSjvZwgNJvuwNmyfIsM agJKxLdUeTJ6DdkI15/AkqFxxlkFStj6+nLfC+zUraM9Q/dfWzbU+fZUo0t6PXvZTA9k dabpRQExTZhNgk4QPR4OTLRcrE0Y77lN7iYUn1Ek/0JsG3kE5CWeyCg8UO0bTrxbQBa8 ZxYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=dNY7HR+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14si992170plh.385.2022.02.20.21.17.54; Sun, 20 Feb 2022 21:18:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=dNY7HR+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242345AbiBSLEM (ORCPT + 99 others); Sat, 19 Feb 2022 06:04:12 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:44188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240384AbiBSLEF (ORCPT ); Sat, 19 Feb 2022 06:04:05 -0500 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3867A6A075; Sat, 19 Feb 2022 03:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=metrotek.ru; s=mail; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to: references; bh=iYUDiAjoLie13BkDtYO7gp/SKHNnEFJhm4CtBUuVL2E=; b=dNY7HR+O49q7ko5z+fV9Du3c5CZrY2LVT8eNks5f1MuYipM9O0SozDdBy85ZStEcLcyvmhWJf2msA nPKcfhNYKRUnSAzdMEVDdD2rDlntg98TlEvei775JvBv8zKJuYr5OF0SSiZ77zR87FEYE6jmacRx05 hW4gJCz/hf1GAyLNlIXYj8HnxObygmi3n0mHM2VpyG9uob57R8Qo1UhvFzCtmxSO1oB8SkkO4Pcu3n QgnbKnR4GijBtYFQmqrv4izsePd3Gb56UdzwvvPZkEJ74ztR7jpBZ0Skgu6NfdKDfQayxJvrLrz78r lqP2tW6pVPPafnlmcjc9v8jmywdpAQg== X-Kerio-Anti-Spam: Build: [Engines: 2.16.2.1403, Stamp: 3], Multi: [Enabled, t: (0.000009,0.005103)], BW: [Enabled, t: (0.000029,0.000001)], RTDA: [Enabled, t: (0.066537), Hit: No, Details: v2.25.0; Id: 15.52k1vm.1fs8q8lsh.r23u; mclb], total: 0(700) 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.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from x260 ([178.70.66.234]) (authenticated user i.bornyakov@metrotek.ru) by mail.pr-group.ru with ESMTPSA (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256 bits)); Sat, 19 Feb 2022 14:00:54 +0300 Date: Sat, 19 Feb 2022 13:42:55 +0300 From: Ivan Bornyakov To: Xu Yilun Cc: mdf@kernel.org, hao.wu@intel.com, trix@redhat.com, conor.dooley@microchip.com, linux-kernel@vger.kernel.org, linux-fpga@vger.kernel.org, system@metrotek.ru Subject: Re: [PATCH v4] fpga: microchip-spi: add Microchip FPGA manager Message-ID: <20220219104255.smgqcqlez6sdo4hk@x260> References: <20220214133835.25097-1-i.bornyakov@metrotek.ru> <20220217191851.11730-1-i.bornyakov@metrotek.ru> <20220218160555.GA1333893@yilunxu-OptiPlex-7050> <20220219061627.3oanqx5glsyq47xk@x260> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220219061627.3oanqx5glsyq47xk@x260> X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 19, 2022 at 09:16:27AM +0300, Ivan Bornyakov wrote: > On Sat, Feb 19, 2022 at 12:05:55AM +0800, Xu Yilun wrote: > > > > Maybe the bitstream info at the head of the image could be parsed in > > write_init(), and this requires the driver fill the > > fpga_manager_ops.initial_header_size > > > > Header size is not known beforehand and is stored in 25th byte of the > image. > Actually I was not quite accurate here. The header itself seems to be of constant size according to https://coredocs.s3.amazonaws.com/DirectC/2021_2/spi_directc.pdf (4. Data File Format) But the lookup table is definitely of a variable size. Moreover bitstream start and size both are somewhere in the image and needed to be located through lookup table.