Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1732479pxb; Fri, 22 Oct 2021 06:40:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwAsqvbUuliXPxWEAM8Hnu4gGQny9siS1/NJnD7Uujda1uWL+Rz/4aVxPUfv0QAIKXOBbRT X-Received: by 2002:a17:903:31d7:b0:13f:16cc:291f with SMTP id v23-20020a17090331d700b0013f16cc291fmr11387400ple.17.1634910037580; Fri, 22 Oct 2021 06:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634910037; cv=none; d=google.com; s=arc-20160816; b=szkgnEla/EEGRa24Wi575W+yj3vXiWmXgZY/jhpsXBielL2n4nrYuv0i3Crd0CY24O InPdMZbU07HddoR/nTJNTVO+7g1iguELwZOfgBIWK5jRMFqaMDAj4DtFBe5po4Tfs6gQ ysRNqxPT19ksIbPFaJJVahzDO1/IEdXCQQDwvHLarMJ+AdJu7gkZmlSgYZ8F8gZQpV+U pIeFY8/U2nlprVBltXOC1IsUMudM5rgB6Ce/aUEqBR2e+ByCXJds5kwo6zrbWk+BeT7M +X0DO4dYFSB79wNF2TucsTGS+IvaN11Kd35RZ9AFLtAhACZKhbURewZMbrzzGVNAf/VW lwtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jjH1AZkHzisZEzNDajZXWL4sIkWjjuq3q0O7XBT8vcY=; b=iB9zJR+KC8U2F5qSGB8tz92fcwfKl6Vcr5d14FnTB8k/R8QkGJKpNdUE+3X1JNnoyW 442IFOi9eT2Wp7WGVRUCZEUQmdA8V++LEU1ylA6GCBa0yKok4GYGJb50Rs+woGWOAmG5 gksSx9WE7UJyVa8blPW6bzuFrGyh9KRrKU83bur/RJnU80ywp1ErS/36U0DdYV4JBDf8 r3gVwgdpSWNrjm/j/ahXFPm7TnK6S3a/Sv3IxRI0JsECiKIFseFzzBChOEpwwl0q3R1x bRSrDYtBa+PvZSnQWxxTiuS5qfqk9jzZfmF97ZLvaV9i4ZAdGP3aaik5zQvhLDzwKBMd EKlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dSvMQAZr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 201si6186423pgg.62.2021.10.22.06.40.23; Fri, 22 Oct 2021 06:40:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=dSvMQAZr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232853AbhJVNlc (ORCPT + 99 others); Fri, 22 Oct 2021 09:41:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231174AbhJVNl3 (ORCPT ); Fri, 22 Oct 2021 09:41:29 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1D01C061764; Fri, 22 Oct 2021 06:39:11 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id d3so1758787edp.3; Fri, 22 Oct 2021 06:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jjH1AZkHzisZEzNDajZXWL4sIkWjjuq3q0O7XBT8vcY=; b=dSvMQAZry0z5cEHt2WuRSPjcgGK+3Gp+e1imsJ9W9jh0QUfeKNpp3oE3jthG+9ITG/ IZDd/O+iU4Kl+/BYsKzWOMkm6FZo3vLXOWjJzI13PE6sEQGI/1t3oyR55iGB1y1s5T/i kJsgfkb7+5Eet/XIbMefWNtmKC82xC4P7F5X6WSK7KE1g6tZf/sA65Yl6+q2eZsNv2G2 71Hz+8sba+4c+fe1pxBHHMbQIC7HaDv7vuipzeuisgPvxuqXA+wXuv48D0eFsV21SQ9N FX1jeSEu/wt28mVP8alksjDR/FIRiQu+eAJJhLgCeW1XSHBU3830aC8eeatj1pKrIgaQ KrdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jjH1AZkHzisZEzNDajZXWL4sIkWjjuq3q0O7XBT8vcY=; b=ZXlwXaR4j6+hvxVgpfFXwDZFmhw9ikXBWWrYnU/KaRv+2c7RqiWCBp7g1ri9Nr0iiL MnuEQvTM3+UHuTZ8LsKBZutfdjVCyzcMp/yt+GBOILHFZhI8Y7DZ1EBBGViLLvDBnPVF uHLSvUL/j2mpjCRjGWUUmSX6ZLAAheBmbBc5lUsb1a0FJpEif7avzI/OpXcNUxRUF2uk LBip6JWOstLXmz3Vhs4s53nOL/HQ7S+idP3okQuH6joO3LA/HXQxYcQdYez6cSCKq79L Zgk+PJhEKfSRlU3wxWg7Cp3hkOwo5tW7pdDypZMBBgAMWzBxUmhV99GV3jHMQE3Zhinq 7rKQ== X-Gm-Message-State: AOAM530dW4fkFft9dJT6CI4S2VN5ghDffM6levFvFnR9n88vfPcW2xak +RiqjfP8RrK2bxz6zha/akw1seRYx0FRcuZAqio= X-Received: by 2002:a17:906:eb86:: with SMTP id mh6mr15592741ejb.141.1634909949961; Fri, 22 Oct 2021 06:39:09 -0700 (PDT) MIME-Version: 1.0 References: <20211021174223.43310-1-kernel@esmil.dk> <20211021174223.43310-10-kernel@esmil.dk> In-Reply-To: From: Andy Shevchenko Date: Fri, 22 Oct 2021 16:38:14 +0300 Message-ID: Subject: Re: [PATCH v2 09/16] reset: starfive-jh7100: Add StarFive JH7100 reset driver To: Emil Renner Berthing Cc: linux-riscv , devicetree , linux-clk , "open list:GPIO SUBSYSTEM" , "open list:SERIAL DRIVERS" , Palmer Dabbelt , Paul Walmsley , Rob Herring , Michael Turquette , Stephen Boyd , Thomas Gleixner , Marc Zyngier , Philipp Zabel , Linus Walleij , Greg Kroah-Hartman , Daniel Lezcano , Andy Shevchenko , Jiri Slaby , Maximilian Luz , Sagar Kadam , Drew Fustini , Geert Uytterhoeven , Michael Zhu , Fu Wei , Anup Patel , Atish Patra , Matteo Croce , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 4:35 PM Emil Renner Berthing wrote: > On Fri, 22 Oct 2021 at 14:56, Andy Shevchenko wrote: > > On Thu, Oct 21, 2021 at 8:43 PM Emil Renner Berthing wrote: ... > > Why all these ugly % 32 against constants? > > Because the JH7100_RST_ values goes higher than 31. There is a > BIT_MASK macro, but that does % BITS_PER_LONG and this is a 64bit > machine. And? It's exactly what you have to use! ... > > Can you convert this to simple > > > > if (assert) > > ret = readl_... > > else > > ret = readl_... > > > > below? > > I don't see how that would work. We're using the done value in in the > readl_poll_timeout. Maybe you can be a bit more explicit. Supply done either == mask or == ^mask. Try it. -- With Best Regards, Andy Shevchenko