Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp4061205rwb; Fri, 30 Sep 2022 12:12:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6itQyS9A1gunKeCeSEaY4MI5e5wuS/5FDBaQmOL05PQwWdciv77uVpaB3YpHLdvSPqS1vl X-Received: by 2002:a50:fc0a:0:b0:458:73c0:7e04 with SMTP id i10-20020a50fc0a000000b0045873c07e04mr4725173edr.270.1664565172898; Fri, 30 Sep 2022 12:12:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664565172; cv=none; d=google.com; s=arc-20160816; b=FpI1x6Gg6IP4kyNEH0njEEhxF0pVUtz1OejR6B9kP7yYOUxTxXuwbTGI8yqcvMtKQ/ K84VQQS0dO6SXcW7UnPu4YTtc9iWTXJr38osjoCJzprmsxGNerYDqblVnlIAYM38bu09 k9BorDiq2IzdiMbEqYsgXobWG31YCOLHtj0eKHMGVYhw6Vs6Ulut/TQxfxxn5e0csnrF 9kMoTzQ+QVPsg1HNeEIeiUfNY2ZpgoTYAKB8LDTUg3njbUVzjW+nQWLmP8pbvwG/RS4I X8gpOEEcRVf4mTqOn5OzQspWyKgr43X7pvFiQP6qnELXtAUQtTRjTvsxYA0iHzALs3xT vGLQ== 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=SqKA688tcbpurfvzbBe8fTw+3CfJn39LO9edxB10rZw=; b=JaIfBlAXcDkwQg8crPLFpdtRzcv/J+Jlf7rYd2axDgyN0V6RIS9WTKOLzPf9aJmpgt XjClZUI8UkNpkxc/q59mbF8OmdHMflaM6PvSmskL1Q3sRKX1r0oVnNZJNQN2dnvA8eq9 iKprJElFsynKpWM8JHYVZpuRVZG/J6of9fGFyiydnI4yel/1nYqM3NaT3KIoM2JsvHRc Yo9nT5Jnat39JdSjDCfMLcgIntph263kwzpat2lavaaB5oOi76m6vYPWdxsNZ/as+2T2 4j9sRwyp18rpM/4Mvbzk3xI+l5ZPYlwa5VUJ5pKRF+BZ3eZuyVRGiod3h+UTYh7Scfcm hGXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aZSaxoh2; 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 o1-20020a1709064f8100b00741c0bd7061si2205828eju.644.2022.09.30.12.12.26; Fri, 30 Sep 2022 12:12:52 -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=aZSaxoh2; 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 S232290AbiI3S76 (ORCPT + 99 others); Fri, 30 Sep 2022 14:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51618 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229730AbiI3S74 (ORCPT ); Fri, 30 Sep 2022 14:59:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 497AE49B44; Fri, 30 Sep 2022 11:59:54 -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 dfw.source.kernel.org (Postfix) with ESMTPS id DB0A3623D3; Fri, 30 Sep 2022 18:59:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41810C433C1; Fri, 30 Sep 2022 18:59:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664564393; bh=3QNA3zbxcf7C4eGHXviUTx4Mw2lLcI48VnpwYP8Y8s4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=aZSaxoh2EQHcxbPxcxRfp25X3CBDogGpi/oGVPkj8agbdJ9P96s1jidhYhAqXmWEy TcykmDM6A+4IG1bMzW2DyIZ5eeBpaw1Aab0BLIodRJUWZMzrQWXIRrYvekX0P4wU16 6FMiMv2Xhv+f+4mwQEDvLyPrpMi74Cdce3dsWVdJSQHi2loO9vNcd15Y3ywbuQRxeq ambIAp0HAGBnCAzsAzPra/gRV8VYhsfeLiOPZWNb/evVLAOg9WqZw9xksARRYH1Va9 MBPcgUspxQh8oPEtdvbE9+Tv5gOPgK+rETIKKMifAPVIqWqiXiXWYz1+Q6gcR4P/hJ 2FHcjYw24WZYg== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <17c5cc9c-50ea-aeac-04e0-20b6c093c7ec@collabora.com> References: <20220929121031.17523-1-rex-bc.chen@mediatek.com> <17c5cc9c-50ea-aeac-04e0-20b6c093c7ec@collabora.com> Subject: Re: [PATCH v3] reset: mediatek: Move mediatek system clock reset to reset folder From: Stephen Boyd Cc: runyang.chen@mediatek.com, miles.chen@mediatek.com, wenst@chromium.org, nfraprado@collabora.com, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Project_Global_Chrome_Upstream_Group@mediatek.com To: AngeloGioacchino Del Regno , Bo-Chen Chen , matthias.bgg@gmail.com, mturquette@baylibre.com, p.zabel@pengutronix.de Date: Fri, 30 Sep 2022 11:59:51 -0700 User-Agent: alot/0.10 Message-Id: <20220930185953.41810C433C1@smtp.kernel.org> X-Spam-Status: No, score=-7.2 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 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 AngeloGioacchino Del Regno (2022-09-29 05:50:38) > I've just analyzed this idea a bit more, and there's the outcome. >=20 > This driver would be fine, if some MediaTek SoCs weren't shipped with > a bootloader that supports only very small kernels... because then, if > the reset controller is not available at boot time, it's unlikely that > you can probe the eMMC or the uSD, so it won't be possible to actually > compile this driver as a module and load it afterwards. >=20 > Please don't misunderstand me: I like the idea of having the MediaTek > SoC sysclk reset controller as a ... reset controller driver but, to > make that work, one fundamental issue must be solved... >=20 > If the kernel is configured for, let's say, MT2701 and MT2712, we're > always building in reset controller support for MT7622, 7629, 8135, 8173, > 8183, 8186, 8192, 8195 - and this list will grow with MT8188, and others. >=20 > Obviously, it's useless to have support for, say, MT7622, if the MT7622 > system clock controllers aren't built-in, nor modules. >=20 > So, to make this idea to work, we have to find a way to: > 1. Build in support only for the required SoC(s) Use Kconfig > 2. Put the reset index mapping arrays in SoC-specific files, or this > single file driver will see an exponential growth. Split the reset driver into different files compiled for different SoCs based on the SoC Kconfig made in step 1. >=20 > Wrapping it up - as the driver is right now - we're losing flexibility: > we need to maintain the current flexibility while keeping the improvements > that are made with this proposal. >=20 > Ideas? >=20 It should work and your concerns are alleviated?