Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3374717pxb; Mon, 17 Jan 2022 18:59:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJyfR/7F6EqIka47M0Ft/BEBIZpHDL5p6icZLewqRj4TkQwRN8zarmDFYJ3wn76VlJSXYfA6 X-Received: by 2002:a17:903:2311:b0:14a:8068:a6d with SMTP id d17-20020a170903231100b0014a80680a6dmr22764977plh.70.1642474749142; Mon, 17 Jan 2022 18:59:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642474749; cv=none; d=google.com; s=arc-20160816; b=oyvl/2cXnI78JfDRkON/qWXA9gTx0nb3KGhu4ZVqxbS8wSZDqJ+mJYUdAo7DfFMQQr +O9N8ygh3b9ZiAsp+EiAE1Duu4+de4yGg0awW7Tv+zQrD3aIhJHd7vJ+zOvV/iwEqHZE GByOq2z/za9nnYocr94cQMmWTjuw+FNmYIAZFR2e8mUz/5n80b0EvaJfAcUgHxxAf4o5 vJBbCLiQfGQZl6LTHJ5RjaAMbp0wto7/5De/W94yBNmoDrwBUWzxkhps6m1tPUXKkint qWQMUrW+h++XkNAqmBW2u8CrIyJ3JLIZJ+JvNi+mGVi8rjAe1qvn0ttDFr5V2WUES7wO ddgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vjIp+UiqOSyx1wj8+g5PpQdrfx2cigslZ1HN9GuuKpo=; b=ekb7YClzjRpjP4I+ccP2WtOrWzVkBvsZBMS2Xb4JHKJpZEt/HuAzJC4PSOCeyvUS3t mRaj0INcffAd//dBJHpyc0Qh7kPgVvW52hNKzt7nehFrr0sh1VdT6l7vmnCbQqUnPnMm fnCVLAneRNQn3Yybyk6ZJsSgXh+rvZFDhIjf3CiSf1GkqEUi0kocrpzy6Wf2GvNYklZD mBpy32K/rwPWHHJavX6zVXWqIZ0FjvsaEb9iAbaiiuLJ5AhcOnh9YX2TYce9wJRKWGWA ngTKDB7fAs8lZa9Sve7NNZJbATeB0MYw9DNWNf9yDSWrFKt5YB/REXl5tVuvon77hyqe NPfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k0CQ2BuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si15031197plr.246.2022.01.17.18.58.57; Mon, 17 Jan 2022 18:59:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k0CQ2BuC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242917AbiAQTTB (ORCPT + 99 others); Mon, 17 Jan 2022 14:19:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242898AbiAQTTA (ORCPT ); Mon, 17 Jan 2022 14:19:00 -0500 Received: from mail-ua1-x92e.google.com (mail-ua1-x92e.google.com [IPv6:2607:f8b0:4864:20::92e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA69C061574 for ; Mon, 17 Jan 2022 11:19:00 -0800 (PST) Received: by mail-ua1-x92e.google.com with SMTP id h28so7186558uax.4 for ; Mon, 17 Jan 2022 11:19:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vjIp+UiqOSyx1wj8+g5PpQdrfx2cigslZ1HN9GuuKpo=; b=k0CQ2BuChSX3ouSjKHcFaRNDMkbsOesrlL29L5az9lJ9/1ktY84vG3+v/Lakm4jKNU RliGgEg4I/c0G7Bug565ulDJPXP7R7FM/LLuzVJ2HigfhjyaIYIPO23tPUZhLS5abj+p fTblXAD6q3hh7vYlCJefU4J56xQD0qNNeebT56o4fGsz4t6gUaftpaHUYTb6oTQMrePc tEgxcPmTMeqJXBMA7mRlpLUiprlfkPN3tyOlDVmxHXQiluax8S7Mh9bU+9gJ+wDZOMmc 3XV3wJgaxlujBi9H/Eikg8Jl5eztQ5mz4dM6XJ6GTFF93WjRIvY7NdjA75RPK6mDBG/J ABcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vjIp+UiqOSyx1wj8+g5PpQdrfx2cigslZ1HN9GuuKpo=; b=b9il/kCttLVrlL5TYrRzC6NiG8flfmu6LiyQfZcnxir7fgdQfVo9tDGBkd03nqdTf1 WNTEGPBEtqlhVAei6yWNKwiJX6NxakEGR1S9onPavWPZG/Gv2siQc+kTPv9Ok3kKat+q ADey983CsIPnQ50PNcAYRCXE2UAwKOTT2QpwNSlGR6M9BEWRRH299v+RoeI+nPgs7TBZ oqZ9KJ20/oGms3CNwlXw3UKxQlxF3y9i9J1soJPXb7X16aubII6cLZy7D2h/kmVv36wF +KqAx/DeOA5/Q3HXlKgErX8opA5VprZsfISQwlhxtmsOCA18S8hsf2ZcqQMlf/fD5VgE 6IHA== X-Gm-Message-State: AOAM533+1MWh0cpTgRWFab/un8hieMMmtFUyneZlSJvLqH5u59fKGWkh H1PGiUTLC416jmLYXGVqJ/V0NhznH79d9v1m3qH6Nw== X-Received: by 2002:a67:dd90:: with SMTP id i16mr8097549vsk.86.1642447134814; Mon, 17 Jan 2022 11:18:54 -0800 (PST) MIME-Version: 1.0 References: <20220117165853.1470420-1-sashal@kernel.org> <20220117165853.1470420-2-sashal@kernel.org> In-Reply-To: From: Sam Protsenko Date: Mon, 17 Jan 2022 21:18:43 +0200 Message-ID: Subject: Re: [PATCH AUTOSEL 5.16 02/52] clk: samsung: exynos850: Register clocks early To: Krzysztof Kozlowski Cc: Sasha Levin , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Sylwester Nawrocki , tomasz.figa@gmail.com, cw00.choi@samsung.com, mturquette@baylibre.com, sboyd@kernel.org, matthias.bgg@gmail.com, linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Jan 2022 at 19:11, Krzysztof Kozlowski wrote: > > On 17/01/2022 17:58, Sasha Levin wrote: > > From: Sam Protsenko > > > > [ Upstream commit bcda841f9bf2cddcf2f000cba96f2e27f6f2bdbf ] > > > > Some clocks must be registered before init calls. For example MCT clock > > (from CMU_PERI) is needed for MCT timer driver, which is registered > > with TIMER_OF_DECLARE(). By the time we get to core_initcall() used for > > clk-exynos850 platform driver init, it's already too late. Inability to > > get "mct" clock in MCT driver leads to kernel panic, as functions > > registered with *_OF_DECLARE() can't do deferred calls. MCT timer driver > > can't be fixed either, as it's acting as a clock source and it's > > essential to register it in start_kernel() -> time_init(). > > > > Let's register CMU_PERI clocks early, using CLK_OF_DECLARE(). CMU_TOP > > generates clocks needed for CMU_PERI, but it's already registered early. > > > > While at it, let's cleanup the code a bit, by extracting everything > > related to CMU initialization and registration to the separate function. > > > > Similar issue was discussed at [1] and addressed in commit 1f7db7bbf031 > > ("clk: renesas: cpg-mssr: Add early clock support"), as well as in > > drivers/clk/mediatek/clk-mt2712.c. > > > > [1] https://patchwork.kernel.org/project/linux-renesas-soc/patch/20180829132954.64862-2-chris.brandt@renesas.com/ > > > > Signed-off-by: Sam Protsenko > > Signed-off-by: Sylwester Nawrocki > > Reviewed-by: Krzysztof Kozlowski > > Link: https://lore.kernel.org/r/20211122144206.23134-1-semen.protsenko@linaro.org > > Signed-off-by: Sasha Levin > > --- > > drivers/clk/samsung/clk-exynos850.c | 70 ++++++++++++++++++++--------- > > 1 file changed, 49 insertions(+), 21 deletions(-) > > > > I propose to skip this one. > > Backporting it to v5.16 does not hurt but also does not bring any > benefits for the upstream kernel users. There is no support for > mentioned Exynos850 in v5.16. > > It could have only meaning for some downstream, out-of-tree kernels > which apply Exynos850 support on top of v5.16, but then they can just > take this patch as well. > Agreed. DTS patches will be merged only in v5.17, hopefully. Till that time the whole clock driver is floating with no users. That's historical thing -- I didn't have "Ack" to submit board dts at the time, and SoC dts couldn't be applied without users (board dts). So I focused on driver work, isolated. Not much sense to backport something without having real users. > > Best regards, > Krzysztof