Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3776202iob; Tue, 17 May 2022 07:04:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy12LVGiyIsjQwhSroEIzcriRz64fD07AleyaiobHQ8SxrONHbBL1P+dGBzNv7l+18TsBOa X-Received: by 2002:a17:907:1c25:b0:6f4:2d46:52ce with SMTP id nc37-20020a1709071c2500b006f42d4652cemr20230654ejc.25.1652796297166; Tue, 17 May 2022 07:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652796297; cv=none; d=google.com; s=arc-20160816; b=vZq2z4hamExjF8wL1LgD2IdX+/9q8+NL0pP/2NigVFBLeoRea4a4NOo9woEYTblkTI 7gvhGe1Woi5XqlceGLTRyXx91dqhY80zVIQ29KTc4yuqDgd7493MY1KmkVRXUNnpV2pd O1EHmWhnHzIuAFiCrkyJPpcOIOeC0ooYJGiUKcSTr5q1iayedIjhckFJxjSkWCTMy4gv i7NC8ul5LeGOaoXQWTAYs1fn2TkhlVshzpzLb8H4rC9tasGxCB5VVRatJ5huueaLNYTT MsbSTnQlThSj/FqdH6KpUFwnCatNrKfFdBS4RSIbPLSYfgD/ZlU6aTD6gD7QIrrZbpdx nWDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=BfYVvvUOYVh3fH5HpjWPS7nELeVH5liIhBdmhCaRLH0=; b=YF+2Di/59YAUY/rmvHy6Gati/746EMS1LF91Be4cymxyyCzk1OGAJS9w/7/Ht3bwNH 3mLpUJFX1q/fXGFDYl3gBCW7BOZpc+YATRNXrfVFCoew+mF3u0jxv1NUxQqRQpvTYqiW wvo0jDS9CAYJz4ceY9Gp4dKkW5yx65LdDoodJnVRUiX24QI/yj0XIzj4Z6dBweJ4Pgfn GnR1TMjdMLRfu5M0/9XFsCnpNhskkgaxmoSwGtmA8/65KYh5fxGro4C2c2U6JedHqMQu 3Em3HulVZNcOBMNEVLUBXtEabJV8XfA4NEIqppbVmTDb9Xufu0FmROsl1YBcJ+MXbTHX Q1vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=guY8bfkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj2-20020a1709069c8200b006f3d82ce68esi3092405ejc.145.2022.05.17.07.04.30; Tue, 17 May 2022 07:04:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=guY8bfkD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242110AbiEQHj5 (ORCPT + 99 others); Tue, 17 May 2022 03:39:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241951AbiEQHjL (ORCPT ); Tue, 17 May 2022 03:39:11 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE4AA49CAC; Tue, 17 May 2022 00:37:31 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 77DFBB8173A; Tue, 17 May 2022 07:37:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FAE2C385B8; Tue, 17 May 2022 07:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652773049; bh=g7kgBkyM4zj9yW1DzflJG2l9JzxOE2iIeZ0vQz0Vo84=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=guY8bfkDmz9XnbIUdyAiOoxdSGMIwVRZQW+TWRBSHGXVldeIPilXmUTjdxJLqgBdz y76cA62Q7P7J16m0bPZGE+XnbxuVaqhWBAuSCrrwf+gO5TUDMnp8aBlqEtTf6QPf6V DLBlOOYD/KdmiV8N890gnX0VS4opNuU43Wy9zxl1ipRPx2TtbHyUdWDWFy7qY+rMdA 83XnM/y/aLToW/5EWoFT/St4p7RMlfXFGCsdAIRRTAyxXk4UgYZqOeJUC74g2lIoiX qGafMTHj1sRVpDN0BzjOt78zsXMPazIq41YQGhLcW1JaLw+0MqyMYz0t//uxhdgoDq Uo/YTg5vjDxRg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220503205722.24755-4-Sergey.Semin@baikalelectronics.ru> References: <20220503205722.24755-1-Sergey.Semin@baikalelectronics.ru> <20220503205722.24755-4-Sergey.Semin@baikalelectronics.ru> Subject: Re: [PATCH v3 3/4] clk: baikal-t1: Move reset-controls code into a dedicated module From: Stephen Boyd Cc: Serge Semin , Serge Semin , Alexey Malahov , Pavel Parkhomenko , Rob Herring , Krzysztof =?utf-8?q?Wilczy=C5=84ski?= , Bjorn Helgaas , Thomas Bogendoerfer , linux-clk@vger.kernel.org, linux-pci@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org To: Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi , Michael Turquette , Philipp Zabel , Serge Semin Date: Tue, 17 May 2022 00:37:26 -0700 User-Agent: alot/0.10 Message-Id: <20220517073729.2FAE2C385B8@smtp.kernel.org> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Serge Semin (2022-05-03 13:57:21) > Before adding the directly controlled resets support it's reasonable to > move the existing resets control functionality into a dedicated object for > the sake of the CCU dividers clock driver simplification. After the new > functionality is added clk-ccu-div.c would have got to a mixture of the > weakly dependent clocks and resets methods. Splitting the methods up into > the two objects will make code easier to read especially seeing it isn't > that hard to do. >=20 > As before the CCU reset module will support the trigger-like CCU resets > only, which are responsible for the AXI-bus, APB-bus and SATA-ref blocks > reset. The assert/de-assert-capable reset controls support will be added > in the next commit. >=20 > Signed-off-by: Serge Semin > --- > drivers/clk/baikal-t1/Kconfig | 12 +- > drivers/clk/baikal-t1/Makefile | 1 + > drivers/clk/baikal-t1/ccu-rst.c | 258 ++++++++++++++++++++++++++++ > drivers/clk/baikal-t1/ccu-rst.h | 60 +++++++ > drivers/clk/baikal-t1/clk-ccu-div.c | 94 ++-------- Perhaps this should be done via the auxiliary bus by having the clk driver register the reset driver and have some private API to pass any data to the reset driver? Then the whole file could be in drivers/reset/, reviewed and maintained by the reset maintainer.