Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp744272lqt; Tue, 19 Mar 2024 02:27:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU/zEqxbsJrRWmPDAxMJwm/XCgv6LA6Ec9C9+UNxRvI1SfPXGlKda/7GmkO0Bh4SMUIA9X1xlJ8wCvwRkagyknNgYiqbwMHb+F4xY9Ogw== X-Google-Smtp-Source: AGHT+IHEZQ3oEQJLwnJm6+UgaBLfIGSaLPOtlHfL8hjuVn78UbgMbGSLUjXppKjPw9bYvzuMXWam X-Received: by 2002:a05:6a21:328e:b0:1a3:5213:d02c with SMTP id yt14-20020a056a21328e00b001a35213d02cmr2951055pzb.31.1710840475606; Tue, 19 Mar 2024 02:27:55 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q10-20020a656a8a000000b005e438e94b1esi9861394pgu.382.2024.03.19.02.27.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 02:27:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=YeCHUa1p; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-107297-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107297-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 40E0CB2154B for ; Tue, 19 Mar 2024 09:27:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 946017CF27; Tue, 19 Mar 2024 09:27:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YeCHUa1p" Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com [209.85.222.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36B6664CF6; Tue, 19 Mar 2024 09:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710840461; cv=none; b=sUsIMMD15wLHFtixbMKherILm6aVeZkkoPqJaTp1DZdfW1A0JG9Zd3TqLYj6yaZHVwqvQbKrOuagPJCC8QG7/zfQ97rkaOEJsqfjAriFbJUXyxsSsrlbvkf+VMlwWyreMJEtXhLd5wN6VIQMZXGZVpPqFM+3Ru/ipOUHaP1O6p8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710840461; c=relaxed/simple; bh=pjS5J2LAFBWN/x50rbg6snjzZLt3GBdzg+UgDvYER8E=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Izn/ggrjXj1S3xKQadUVmIIKYSrkwcTn727aqK08OAthPpM3AMPkfGYsgiIubsZGQtvJ+sRKc8leHzDPG8VHePsn6awYD2pez98wLMN0LgQgfQ6iTVxYG1lhNAg76cEzg4J7hWUyvcOyBHUKJESGVySXKYQh4Ab8a1OU2dVTtHc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YeCHUa1p; arc=none smtp.client-ip=209.85.222.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ua1-f50.google.com with SMTP id a1e0cc1a2514c-7e07aabfd87so734149241.0; Tue, 19 Mar 2024 02:27:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710840459; x=1711445259; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vDt/qzf3eqYn44q9JzgdESv117en7YhDsjNcNkx/NqM=; b=YeCHUa1pY81Af0xul1OBTDNwM7czkBvNrv63NrXjQqw9qwSTZH5QWjkeWMZlt0gwq1 X17LzP4Gq1gFh06Z9CPiusR5yg2s+EQXqltamsoV8nwZja1YNwR+hBl9WTtFoaCy5xUu PDr3d746/VBKAoND6EQfbqiqYFgXwppjTkmG5NAaFb+2fK6MlE+JEgEBxGZbq8zbVsOY F8YMNlOyzrAqSa5avOsGdMff+AavjvyvyBveFFNg2yL6FM/r/jXKOe7lXZeMuGfP4nTm CEHXwAkOKoAUa0BQliH5xUNlce3AC03d6TVIKCiDb/1VNFhrzirmX/LeIR/5TnUFtQZO L94Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710840459; x=1711445259; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vDt/qzf3eqYn44q9JzgdESv117en7YhDsjNcNkx/NqM=; b=ivDvXs5bbrQYuhbwhg2xW10DP6WfnuKVmDS5HJua+4dk0/D3SuE8BqH7aIELAz5pgy d65BsoF+Hf6fwOJrY6cV2ZeCucO10Nwe2mvq1lHCzcZfWI1gAY/p+hS2ztMvtOW2CsdJ GfY2oFnFsgMJe749NRMlxJ4LB2khKAfPe6zRgW4eSlfj9Po4e4Ce1zoHGP6W4+eph9ZS 0sya/SRytoTmpJ+IOXr3CuMZzrtME1uMEdaotISPHCc7LsolWUPTKETU7BP3gTpZOjXO 5w3IpIydDkT23QAZyu9dCnYqTQIjfvrvFG6QuHY1hbsaLLsY7aLLlMEajo/3lswCvZSw TxEg== X-Forwarded-Encrypted: i=1; AJvYcCXuaJag42AiADPysZaVMD8V7bqEB/8pbg+vGMtYLaGczA7PDiBneXqgCzFH/NF2EDqpyLv2NyOpeh+Bdn8DjeWngk87bQbglCf0+jVoHnfyjsWlv1H5igb5iwy7l0bIfSEOqUn6zKZ/BcMgsm0PcTxn96epMy3FW54327hOvLuxrY/ru3qadcCM+5do X-Gm-Message-State: AOJu0YwCXvdVreqnGgDsMFAlugM9Q5BakH5yNNr3JgBYG4IIaU53Mdd7 BQJAgv6m2Unw+hQZWSmY/CAUhuVZWN+j37Lon0SwuBVkTiaaKgocGEcZrZ33r6tcx4za1tgTjel Yt7HwQEvRz7+Bc+fKaTHsd6GGbP8= X-Received: by 2002:a05:6122:984:b0:4b9:e8bd:3b2 with SMTP id g4-20020a056122098400b004b9e8bd03b2mr1418800vkd.2.1710840458983; Tue, 19 Mar 2024 02:27:38 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240318160731.33960-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20240318160731.33960-3-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: From: "Lad, Prabhakar" Date: Tue, 19 Mar 2024 09:26:14 +0000 Message-ID: Subject: Re: [PATCH 2/2] clocksource/drivers/renesas-ostm: Add OSTM support for RZ/V2H(P) SoC To: Geert Uytterhoeven Cc: Daniel Lezcano , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chris Brandt , Magnus Damm , linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Fabrizio Castro , Lad Prabhakar Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Geert, Thank you for the review. On Tue, Mar 19, 2024 at 8:33=E2=80=AFAM Geert Uytterhoeven wrote: > > Hi Prabhakar, > > Thanks for your patch! > > On Mon, Mar 18, 2024 at 5:08=E2=80=AFPM Prabhakar wrote: > > From: Lad Prabhakar > > > > RZ/V2H(P) (R9A09G057) SoC has Generic Timer Module(a.k.a OSTM) which > > needs to deassert the reset line before accessing any registers just > > like the RZ/G2L SoC. > > > > Enable the entry point for RZ/V2H(P) SoC so that we can deassert > > the reset line in probe callback. > > This is not really what is happening. > As OSTM on RZ/V2H has a reset specified, the early call to ostm_init() > through TIMER_OF_DECLARE() always fails with -EPROBE_DEFER, as resets > are not available that early in the boot process. Hence the driver > needs to be reprobed later through the platform driver probe. > Thank you for clarification. Ill update the commit description as above. > > While at it use IS_ENABLED() macro instead of open coding. > > I don't see how the code was open-coding IS_ENABLED()? > Ahh.. > > > > Signed-off-by: Lad Prabhakar > > > --- a/drivers/clocksource/renesas-ostm.c > > +++ b/drivers/clocksource/renesas-ostm.c > > @@ -224,7 +224,7 @@ static int __init ostm_init(struct device_node *np) > > > > TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init); > > > > -#ifdef CONFIG_ARCH_RZG2L > > +#if IS_ENABLED(CONFIG_ARCH_RZG2L) || IS_ENABLED(CONFIG_ARCH_R9A09G057) > > I think you want to use "defined()" instead of "IS_ENABLED()"? > OK, I will use defined(). Cheers, Prabhakar > > static int __init ostm_probe(struct platform_device *pdev) > > { > > struct device *dev =3D &pdev->dev; > > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m6= 8k.org > > In personal conversations with technical people, I call myself a hacker. = But > when I'm talking to journalists I just say "programmer" or something like= that. > -- Linus Torvalds