Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9305BC0015E for ; Fri, 14 Jul 2023 20:43:54 +0000 (UTC) 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) 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 Content-Transfer-Encoding: 8bit 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) -- 2.41.0