From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB5424C98; Fri, 24 Jan 2025 13:00:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737723619; cv=none; b=Ix/dM8nBFJFtMPIMZFU/yfw9FJkbzCak5W8DFrJZrAv5pMOphQSkRs+LQnwD0PzHw4Gr8PzielT9yFuwWcJbgxmYptvs6N+D4B19Bxd+196WKQqYVXxCMKQjTEO9XDLV2iBcfbzKjogCA0aW9uwTnNioEoGH2QKnpVPA+dCdlYg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737723619; c=relaxed/simple; bh=I536iZ5EGUmd3B3kQDDGYHcOETMvIiQtWdCBn5o5yOQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=WJfh/Ws2C/uCAcgBQZogw1hroBNWsEyKAcZ13zy530uF40DKyiPcPTfzuqrTzGK13RA7IDYr1ZFGcy3aLP/u7tlrRTXrFq9sOktb5UFMck3WzLk11cgq7op8EqGZjdp7z1JM7zjI5Lvm5y5lBCFGhmvY6AoF01xDwAesdGAVEhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D5sWSi02; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D5sWSi02" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 74497C4CED2; Fri, 24 Jan 2025 13:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737723619; bh=I536iZ5EGUmd3B3kQDDGYHcOETMvIiQtWdCBn5o5yOQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=D5sWSi02OJnNpSN3SC0wut/g9tza+f51Cop1ypkfsvbviq0gnawNhqSu6jvCRgRZI B9r5lLSraZgx9U4SSs6jeunww9noA/3tB/TF6Y2DayJ24CTzY6VqAhr3Evb2eImANj Tjyof6m6frRCNkfN0An6Ur+jhZkUwmGpdTi9+/dofkK9wkXZfRhCepU0bF+dhSfgBB Uy2uRaLA/mMvU7BJaYYAgBO0JlxGBgdvhBUCTX4ML0aqJZ4vtU97y0TwX5tyUS7THz Qe/V7onc3bFNNCftswV4SANCoN8eYt5UUTOgWff9+mO9P+HW/7FiT1WOPZzDfdL66K 2ORNCDFxqM3Kw== Message-ID: <8bdb2cdf-92cd-46e8-b795-7d5d412a4e07@kernel.org> Date: Fri, 24 Jan 2025 14:00:14 +0100 Precedence: bulk X-Mailing-List: linux-watchdog@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/5] watchdog: Make RZV2HWDT driver depend on ARCH_R9A09G47 To: Biju Das Cc: Wim Van Sebroeck , Guenter Roeck , "linux-watchdog@vger.kernel.org" , Geert Uytterhoeven , Prabhakar Mahadev Lad , "biju.das.au" , "linux-renesas-soc@vger.kernel.org" References: <20250115103858.104709-1-biju.das.jz@bp.renesas.com> <20250115103858.104709-4-biju.das.jz@bp.renesas.com> <20250118-trout-of-luxurious-inquire-aae9aa@krzk-bin> <305ba07f-e5f3-4d2e-b017-8a817418f16c@kernel.org> From: Krzysztof Kozlowski Content-Language: en-US Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGT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U9pPWmu 4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 24/01/2025 13:55, Biju Das wrote: > Hi Krzysztof Kozlowski, > >> -----Original Message----- >> From: Krzysztof Kozlowski >> Sent: 24 January 2025 12:42 >> Subject: Re: [PATCH 3/5] watchdog: Make RZV2HWDT driver depend on ARCH_R9A09G47 >> >> On 24/01/2025 11:57, Biju Das wrote: >>> Hi Krzysztof Kozlowski, >>> >>>> -----Original Message----- >>>> From: Krzysztof Kozlowski >>>> Sent: 24 January 2025 10:35 >>>> Subject: Re: [PATCH 3/5] watchdog: Make RZV2HWDT driver depend on >>>> ARCH_R9A09G47 >>>> >>>> On 24/01/2025 11:20, Biju Das wrote: >>>>>> >>>>>>> + depends on ARCH_R9A09G047 || ARCH_R9A09G057 || COMPILE_TEST >>>>>> >>>>>> But this is just wrong. You are supposed to depend on renesas ARHC, >>>>>> not your individual SoC (and this is what you called here "ARCH_R9A..."). >>>>>> >>>>>> Greg many times gave strong opinion that even full ARCH is wrong >>>>>> and we managed to convince him that it has a meaning (or he did not >>>>>> want to keep discussing). But restricting it per soc is pointless >>>>>> and impossible to defend in >>>> discussion. >>>>> >>>>> Currently for building RZ/G3E WDT, I need to always have RZ/V2H SoC config. >>>>> which is pointless. May be ARCH_RENESAS should ok in this case?? >>>> Assuming ARCH_RENESAS covers your individual SoCs above, yes, that's >>>> the way for driver to limit themselves to usable family. >>> >>> ARCH_RENESAS has ARM, ARM64 and RISC based SoCs. >>> >>> Currently it covers ARCH_RCAR_GEN1, ARCH_RCAR_GEN2, ARCH_RCAR_GEN3, >>> ARCH_RCAR_GEN4, ARCH_RMOBILE, ARCH_RZG2L, ARCH_RZN1 Family SOCs and >>> rest of the individual SoCs such as RZ/V2H abnd RZ/g3E. >> >> >> Rather tell me why this is supposed to be different than other vendors? > > It is not different from other vendors. > > See, for eg: > config S3C2410_WATCHDOG > 557 tristate "S3C6410/S5Pv210/Exynos Watchdog" > 558 depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST You see - only one ARCH_EXYNOS. That's the arch and vendor. Exynos is the entire arch for arm32 and arm64 consisting of all of SoCs. S3C and S5P are entirely different, much older archs - these even could not be combined in one image with Exynos some time ago. > > > 575 config SA1100_WATCHDOG > 576 tristate "SA1100/PXA2xx watchdog" > 577 depends on ARCH_SA1100 || ARCH_PXA || COMPILE_TEST > > and many more. Again: only one SA1100, one PXA. Not per each PXA SoC. So these prove my point - use only your ARCH > > >> >> || ARM64 is already used solution > > If you are correct, then all should depend on either on ARM or ARM64 or RISCV etc... > > >> >>> >>> Since most of IP's in RZ/V2H and RZ/G3E are identical we could >>> introduce a new family SoC ARCH_RZG3E_RZV2H to cover both or top level ARCH_RENESAS?? >> >> You should not write drivers per SoCs (or even two or there SoCs) and there is really no need to >> restrict them per each SoC. > > If I am not wrong, The watchdog subsystem uses similar approach. > >> >> Otherwise come with arguments to my first question: why do you need exception here from generic kernel >> approach? > > It is not deviating from generic kernel approach as lot of vendors are doing this way. > eg: > > config OMAP_WATCHDOG > tristate "OMAP Watchdog" > depends on ARCH_OMAP16XX || ARCH_OMAP2PLUS || COMPILE_TEST Anyway, that's ancient OMAP, we speak about new devices. > > > config DAVINCI_WATCHDOG > tristate "DaVinci watchdog" > depends on ARCH_DAVINCI || ARCH_KEYSTONE || COMPILE_TEST Different ARCH, not SoCs! > > > config K3_RTI_WATCHDOG > tristate "Texas Instruments K3 RTI watchdog" > depends on ARCH_K3 || COMPILE_TEST Dependency on ARCH. Do you understand the difference between ARCH and SoC (ARCH_R9A09G47 is the SoC - individual or family)? Best regards, Krzysztof