Received: by 2002:ac2:464d:0:0:0:0:0 with SMTP id s13csp3261280lfo; Mon, 23 May 2022 00:14:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0KcUgdojnGAF22XtWfmXksfSmq/e5JAGUxM0lVI6AXBVll1kAY2xjFQpWEzldDiyXPOnr X-Received: by 2002:a17:902:edd1:b0:158:8318:b51e with SMTP id q17-20020a170902edd100b001588318b51emr21992967plk.89.1653290054672; Mon, 23 May 2022 00:14:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653290054; cv=none; d=google.com; s=arc-20160816; b=hD0Iz3C8DKfkwrglYbx3sKXTqKxU6a/I2VKJoxr5085hXyPh4WjcyF/kyfadeDfYLC HWg5Tm5DdENXDn/MPB99uSZrjnsQ4ZogS2ZbI65XNN9MpXP71D8gycqbOnQyrm09LImw V4iYXEoY+mboWfZUzBi+/o0VlXgO7Sy6QMEVLN7icr1Pa+CljCKvFfWQ7bDPUNt4xdjy tF706l2T+hBa7StwpAeRPjTBGPbGOitNKGKK/VCl+7KI+5IO+DfPQXRvT36Bjdx5V87G 1Z/MomKdPXYC/K4SK8Tsasa+xn5K74MXSkiv38znWvbPGjDV5WkiAbznI5M/DznkjfCN Xx7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=WOJusE8NHNqjKMNStmuZRo9RH3cwXzoVFMfF94/t6Ck=; b=fcQWtvytTxJd4DCB6qy8uCb/dTD6m9u3pEY+6/FkhXWPaurYgFfw/3QcXz6A0rf+WV dByHTcBkFX/1qCfHkyntuG7NBbMtEg7oNbQd65V9oVwgrvLdKZJt+ffcWW34U2uyfrun ly3DKslFaN1aBDb73mjY7TSlFQ9FBPFOE4kr5aYNfz9fg8U2Lj33G6QoLKcIa3kAqYyR /VrXqk7UegEhvLT2iua4RzqG5vPvxoBtaLV0Ts+5nkhOFys16cYCUPen7MN+l/YGcLNI L+5Ks5vo1WCb4PKHUypU4Kp8/QzSNTbh5ZTM7UQQi1d7rFLYHdwAq1YtpoSkglVxNZ+V NUYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bQ+WBLuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n10-20020a170902d2ca00b00153b2d164afsi9284949plc.183.2022.05.23.00.14.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 May 2022 00:14:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bQ+WBLuz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4E2747A833; Sun, 22 May 2022 23:32:40 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353380AbiETT6O (ORCPT + 99 others); Fri, 20 May 2022 15:58:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353373AbiETT6M (ORCPT ); Fri, 20 May 2022 15:58:12 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18E4619CB6C; Fri, 20 May 2022 12:58:11 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id c19so2995931lfv.5; Fri, 20 May 2022 12:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=WOJusE8NHNqjKMNStmuZRo9RH3cwXzoVFMfF94/t6Ck=; b=bQ+WBLuzBq3aGizqD1+Kwm5uAKpENycXAljdLzTGsAaeq+eESfeAhCSUpZDT5IDNb+ P9zTFv7zoTRkmT/uwyhlZyXGFyiERjKOPBEBQWG4V9rlz1NhEyOqJTV5P3IKQAqYnxva zVb6UFNRlCa1blmb2JCzrbWtoKSq9JCYY/sYf8dT32VU3RaA+dRV/Nq6TJYgh6kmh5LD kSmEw+or1PbtqHPMBqBSOAbmKlV0V+u4GmL78rngDoFH2mA1oDxVQT4Iih9170vjUhFw ebTXGxF75uA7HdFslnlPt6emZADNR7A8pIHxil/1PZB17Xr8krOhd2E1J1pblpk+5/Ar NAcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WOJusE8NHNqjKMNStmuZRo9RH3cwXzoVFMfF94/t6Ck=; b=mgGVOZjulemk2VqRjHC5Yom16+rHbpFqOLBsa+ueRQSQVVEdrPw5h4i8iFjaCGoiLT B1GPQp6Nkd6RiziP4cLoOGebRbAIT/P2MryYVe2ZQM4Y2CErOdOPT6xrXIFbFLMu4D+4 U6YaZfIEEm85ap9ICIhGfUH78MqcsYIKpYYbP8lLX8PtovChonP5KGhaxr7F1lyM0X3s YUtQO6uScGygIU8tkIiLtFfWEyDhACAfPFwNNk+XoGxb5ojqenWCktlojkn3sM39vtzE EmkeTzMJqciRNHx4abfc7h1XysYhexmcHKx06dOI56jAY5lO6qxlDuW/j7y7WTFcfZt1 itKw== X-Gm-Message-State: AOAM532UqEkOHP3sDhMgUz+X9BrbleTr/UI+qdqAgOzU2CNpjVq83A62 7StHZ8BHv3JvouE3I3uQczU= X-Received: by 2002:a05:6512:5cb:b0:472:f7e:a5f5 with SMTP id o11-20020a05651205cb00b004720f7ea5f5mr7867956lfo.358.1653076689178; Fri, 20 May 2022 12:58:09 -0700 (PDT) Received: from pc ([104.28.198.246]) by smtp.gmail.com with ESMTPSA id u5-20020a2e8545000000b0024f3d1dae7csm422051ljj.4.2022.05.20.12.58.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 May 2022 12:58:08 -0700 (PDT) Date: Fri, 20 May 2022 22:58:03 +0300 From: Boris Lysov To: AngeloGioacchino Del Regno Cc: Chen-Yu Tsai , Miles Chen , bgolaszewski@baylibre.com, chun-jie.chen@mediatek.com, ck.hu@mediatek.com, devicetree@vger.kernel.org, fparent@baylibre.com, ikjn@chromium.org, jason-jh.lin@mediatek.com, kernel@collabora.com, konrad.dybcio@somainline.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, marijn.suijten@somainline.org, martin.botka@somainline.org, matthias.bgg@gmail.com, mturquette@baylibre.com, p.zabel@pengutronix.de, paul.bouchara@somainline.org, phone-devel@vger.kernel.org, rex-bc.chen@mediatek.com, robh+dt@kernel.org, sam.shih@mediatek.com, sboyd@kernel.org, tinghan.shen@mediatek.com, weiyi.lu@mediatek.com, y.oudjana@protonmail.com, ~postmarketos/upstreaming@lists.sr.ht Subject: Re: [PATCH v2 7/7] clk: mediatek: Add MediaTek Helio X10 MT6795 clock drivers Message-ID: <20220520225803.193bcda9@pc> In-Reply-To: References: <20220518111652.223727-8-angelogioacchino.delregno@collabora.com> <20220519045340.11198-1-miles.chen@mediatek.com> <11bf21cd-85c4-f64c-2af7-7695e71aee07@collabora.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello, I'd like to chime in with some feedback. > >> Hence, the usecases for this kind of splitting are: > >> 1. Somewhat rare (corner) cases: someone may not want to compile in any of > >> the mm/venc/vdec/mfg clock drivers because they don't need the > >> functionality at all (probably, including the other related drivers), or; > >> 2. It would be possible to compile as built-in only the "main" drivers > >> (apmixed, infra, peri, topck) to achieve a boot (ex.: you need eMMC to > >> boot, at least) and then compile the mm/venc/vdec/mfg as modules to be > >> loaded after mounting a rootfs (where you probably also have mediatek-drm, > >> vcodec, etc as modules). > > > > I assume you mean split them into two groups: > > > > - essential for booting to a state capable of loading modules from > > storage So apmixedsys + topckgen + infra_ao + peri_ao + imp_iic_wrap > > (maybe?) > > - everything else > { snip } > > IMO having two Kconfig symbols for one chip is still much better than > > having ten though. This sounds good. I think it would've been even better if selecting a Kconfig option like MACH_MT6795 would automatically select the base clock driver for booting to a state capable of loading modules from storage. But a quick check showed me that arm64 doesn't use such an approach unlike arm. > For MT8195... and 92, 83, 73... and others from the same era, being them for > chromebooks, iot, smartphones and whatever else... yeah you're totally right. > > The issue starts raising when looking at older SoCs featuring an older > bootloader that does have a kernel size limitation; for example, to make the > loader happy on MT6795, I had to strip the defconfig a lot and keep the > Android-style boot.img smaller than 10MB (that's Image.gz-dtb + ramdisk). This issue gets even more relevant if/when we consider older ARM32 SoCs such as mt65xx series. As far as I know, most of them (with a notable exception of mt6580) have bootloaders that restrict max boot.img size to 6144 kB. However, I think too much granularity in Kconfig might cause unnecessary confusion. The "essential clock infra" + "everything else" split sounds better to me.