From patchwork Fri Jul 14 20:43:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Kettenis X-Patchwork-Id: 1808025 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.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=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=kpnmail.nl header.i=@kpnmail.nl header.a=rsa-sha256 header.s=kpnmail01 header.b=r9ddox9G; dkim-atps=neutral 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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4R2k3K3H1tz20bh for ; Sat, 15 Jul 2023 06:43:57 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C198484F74; Fri, 14 Jul 2023 22:43:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=kpnmail.nl header.i=@kpnmail.nl header.b="r9ddox9G"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 08F4584D10; Fri, 14 Jul 2023 22:43:37 +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=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from ewsoutbound.kpnmail.nl (ewsoutbound.kpnmail.nl [195.121.94.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 7EBF285214 for ; Fri, 14 Jul 2023 22:43:34 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=openbsd.org Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=kettenis@openbsd.org X-KPN-MessageId: d55d9d40-2286-11ee-a2b3-005056992ed3 Received: from smtp.kpnmail.nl (unknown [10.31.155.7]) by ewsoutbound.so.kpn.org (Halon) with ESMTPS id d55d9d40-2286-11ee-a2b3-005056992ed3; Fri, 14 Jul 2023 22:41:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kpnmail.nl; s=kpnmail01; h=mime-version:message-id:date:subject:to:from; bh=RUCGEMG19cpb1UhIACNpp0YDSqFcJv/0auTlIN2Tshs=; b=r9ddox9G8w2dG3LECI6dYCReD0ofjHt21apnNK6OHaWp3gwSxV4uZUN1KV2PYzzMYcizf6QL0c6Pz 5L4BXu7g9Y2ScuWCwpvHpazrwwY7cJv2v5RtS2LgwnabDQFUL0LXai/nbTFlarlvwYKgaVC3ZQPs7M nBpwuvWFtfzI0r6g= X-KPN-MID: 33|o0X565XcZJGK8kU3bZgnpc5YRb2/36eYX9I5VJ7+7qu+d6Clm3IEPszOXKWqPsS B08L+m+99kSrMhj/ZMUYB2IehrDP/OiujVbGBssXWBQM= X-KPN-VerifiedSender: No X-CMASSUN: 33|VKuXraX5IvkSueQtA7kHxi0UOkAiJpddpcTNHWlmLs2jFi1o/NbCMuYapEnWMYo 4qxHeH/ZJdFw4f65rWtB8zg== X-Originating-IP: 80.61.163.207 Received: from copland.sibelius.xs4all.nl (80-61-163-207.fixed.kpn.net [80.61.163.207]) by smtp.xs4all.nl (Halon) with ESMTPSA id 198462c4-2287-11ee-9b69-005056998788; Fri, 14 Jul 2023 22:43:33 +0200 (CEST) From: Mark Kettenis To: u-boot@lists.denx.de Cc: marex@denx.de, bmeng.cn@gmail.com, Mark Kettenis Subject: [PATCH 2/3] iopoll: Add readb_poll_sleep_timeout Date: Fri, 14 Jul 2023 22:43:22 +0200 Message-ID: <20230714204323.27220-3-kettenis@openbsd.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230714204323.27220-1-kettenis@openbsd.org> References: <20230714204323.27220-1-kettenis@openbsd.org> 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.8 at phobos.denx.de X-Virus-Status: Clean Add a variant of readl_poll_sleep_timeout that reads a single byte to match the readb_poll_timeout API that Linux has. Signed-off-by: Mark Kettenis --- include/linux/iopoll.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/iopoll.h b/include/linux/iopoll.h index 0ee2bddaa8..89990e95e9 100644 --- a/include/linux/iopoll.h +++ b/include/linux/iopoll.h @@ -49,6 +49,9 @@ #define readl_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \ readx_poll_sleep_timeout(readl, addr, val, cond, sleep_us, timeout_us) +#define readb_poll_sleep_timeout(addr, val, cond, sleep_us, timeout_us) \ + readx_poll_sleep_timeout(readb, addr, val, cond, sleep_us, timeout_us) + #define readx_poll_timeout(op, addr, val, cond, timeout_us) \ read_poll_timeout(op, val, cond, false, timeout_us, addr)