From patchwork Tue Dec 27 10:04:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Bornyakov X-Patchwork-Id: 3328 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1319480wrt; Tue, 27 Dec 2022 02:16:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXuYNMcvPh+UOzalEFawJfgCqYboz5V7pk8POrvP3YXVZh+0DuuFS0sDS7rmwMISPv2WwJCX X-Received: by 2002:aa7:c40a:0:b0:461:c5b4:a7d0 with SMTP id j10-20020aa7c40a000000b00461c5b4a7d0mr21027135edq.24.1672136213119; Tue, 27 Dec 2022 02:16:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672136213; cv=none; d=google.com; s=arc-20160816; b=c8wgPVQjxlgtKN3+hs4AucmK9OrUi2neVJbA2xXSJjQAi9VL7R7URCCBaFQMxtbxxy DvON+HticC4VmRDd8AbphLR2VqZKYW+Vld2VX1rRi82i6ekI2Ap1OXkDF+/gHhCNt2Ky 12/I4GJdpbFLuWiS6oqWUJDDg2+WaHulRcU/g5lwp3IOFIoWD3mK6B7sGWzuLOVciEC2 U8G9v3fVub64Y01qOqQuk0KbNFd8TrtjCS0+DHxk1exs/jZaPaRa+1WBUKq/cp+F63a8 Hq15kQRneog5+pPcI/GzLUFDyahRjW0X/WoXZpSyWn96bKAlm81qAsSH8pPJSr/uxAnT 18xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=I1dmuxKQMwaDDD9UScONa1dzexNZdz+Etd+D/BP5ics=; b=ZrU2C0X7Nj7LZovnqUivtLaDc9KsdPK1lSMs22r6ixxQuKUAFdW/roFQk73it862M1 9MkvJEF4sagLeqoAJjb4YB4de2z0zARJgpcVEkpcO/CucggmySJl1oECaGxepvE2cnrF 9EHj1789Gw+sEU9XBfnGF8dapAcoWu/ypmHP/Zd1zMDkLyRoaBD+UPJ34ohoUPXDx3VH aUIao4QmsU7pAp9n3KO9Uib3Mp/flYJKoOzv/TI80OAHBTWl9S8ex1taRQwlYjRyWUBi EEO7iZU/XoftRANXXKpexBLtQ1OVSyyT8hIuXgAr/eximTj98eGg6YTxKB7MqjVKL0zZ sKrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@metrotek.ru header.s=mail header.b=m0TuOWcT; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd14-20020a056402388e00b00485dd65ad2fsi2860318edb.356.2022.12.27.02.16.28; Tue, 27 Dec 2022 02:16:53 -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=m0TuOWcT; 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 S231204AbiL0KHd (ORCPT + 99 others); Tue, 27 Dec 2022 05:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229987AbiL0KHa (ORCPT ); Tue, 27 Dec 2022 05:07:30 -0500 Received: from mail.pr-group.ru (mail.pr-group.ru [178.18.215.3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B9ED6477; Tue, 27 Dec 2022 02:07:26 -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-transfer-encoding; bh=9VAb8lkRkUO1oko3y3yvtQIrdTIKswb5JUMuGaTrGbM=; b=m0TuOWcTlHJ5yC3nSG/vz3Bdzh2PJQXUOvePloBUn8vc05THbgy2hgLZfUNnz0VPRiF8fXovzSEoy EjQULhDIbcGUO6cSWVqNH9NJUVMtAQWYGuDtgkRdCemey8HL1gx0j82yHbqTHN2tIryYd1Ai+TQfFG Sq+VAVTTijOExenei3KIdC/3U9dYKLCi+zAZ7Qr8FwYzRE2zJ8wyeE9riFTdyMbxlhEDSmujyBAcW8 JodGp6L+aXQLisMUKWzK0Ee1KaYHc3SQxi+mhllwWZoWdRJoFysaffyab0UAtAC8mEqCL7UOCHkJ3h PKUdRZ6WwAVXjxofNgHkbxbuKJbv4Og== X-Kerio-Anti-Spam: Build: [Engines: 2.16.5.1460, Stamp: 3], Multi: [Enabled, t: (0.000013,0.010743)], BW: [Enabled, t: (0.000025,0.000002)], RTDA: [Enabled, t: (0.088120), Hit: No, Details: v2.42.0; Id: 15.52kc2o.1gl9gpneu.3rr; 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Level: X-Footer: bWV0cm90ZWsucnU= Received: from localhost.localdomain ([78.37.162.181]) (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)); Tue, 27 Dec 2022 13:07:08 +0300 From: Ivan Bornyakov To: Conor Dooley , Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , =?utf-8?q?Ilpo_J?= =?utf-8?q?=C3=A4rvinen?= Cc: Ivan Bornyakov , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org, system@metrotek.ru Subject: [PATCH v3 0/3] Reliability improvements for Microchip MPF FPGA manager Date: Tue, 27 Dec 2022 13:04:47 +0300 Message-Id: <20221227100450.2257-1-i.bornyakov@metrotek.ru> X-Mailer: git-send-email 2.38.2 MIME-Version: 1.0 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1753361902203056905?= X-GMAIL-MSGID: =?utf-8?q?1753361902203056905?= A couple of reliability improvements for Microchip Polarfire FPGA manager: * move SPI I/O buffers out of stack * rewrite status polling routine in a time measurable way Also improve mpf_ops_write() code readability by separating single data frame writing routine. ChangeLog: v1: [https://lore.kernel.org/linux-fpga/20221223123854.8023-1-i.bornyakov@metrotek.ru/] v2: * split into 3 distinct patches [https://lore.kernel.org/linux-fpga/20221226142326.8111-1-i.bornyakov@metrotek.ru/] v3: * fix polling stop condition in mpf_poll_status() as Ilpo suggested. Ivan Bornyakov (3): fpga: microchip-spi: move SPI I/O buffers out of stack fpga: microchip-spi: rewrite status polling in a time measurable way fpga: microchip-spi: separate data frame write routine drivers/fpga/microchip-spi.c | 137 ++++++++++++++++++----------------- 1 file changed, 72 insertions(+), 65 deletions(-)