Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp308682lqg; Thu, 11 Apr 2024 03:49:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmfhJPT3FcNZPDhbI2qLrSEPVMDOueCwlt+N2UnLAYkOJXAk9MP7zoAB3qV9eQxsi5HDYdcSZviDZ6gfOYV4qDmZU0qKsH6isiGiOD6g== X-Google-Smtp-Source: AGHT+IH9/A7Yy4Ag02hQCCmWeQkOif2H6wGI4XucLddioLLCGOvldL6NFSmzer2RmOIUaWpJHTHO X-Received: by 2002:a17:907:3183:b0:a51:b36e:61c7 with SMTP id xe3-20020a170907318300b00a51b36e61c7mr3982044ejb.13.1712832566807; Thu, 11 Apr 2024 03:49:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712832566; cv=pass; d=google.com; s=arc-20160816; b=YemIQcNoO4oWJxsUfbvqjvYg1gVlfOKtYaM7S/WbnT10T4dpIBnIJHA3Smz2XLJnGr 1DnjchAphgJh14zqynywaKdukfK7hzbj9nZYBMH+r1woot1rlMFSCcc1iMNCCZA4LZZI vU/NiRzG2SsDJCyC5F9Q1SYwUpw0iqnrnAx7MegcSeB4z+WNW/ls2aIuMs6GZpDgIwAU uxFV7FRQt15JhXqTxDJHsF4UmKjKfSigJjrjPS0dtGv73RYdk6mgK6Qo1vn2Vg/uJpnt tiI6hXGnIqEGSaffAvZgezdq4IwVdOm8kmWwhjPE90D8Fb6LBq4SJKftO4uPxuM9sj6w ZCEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=YTQ39MeBm7IxkeCPG27943MJ/tF6Xqm59E9I2nTcOPE=; fh=JrhzXgCkv2cJXEQBudkwJQxyBzpLxOD8BhibnKRpUKw=; b=Qy/ifXuwUR+aM5pBfgyYvELdgaN9zAZNWFkPW4Fri+3NoHm6DSdHgRIG3V9nbbXapa RHPURNiVeJn28xH+gDlM5wb2unTdT3MKiNBnhBssML7daoccqkO0HMXZLZ3/rKJW+HFX aicdMFGZcqsvQdKL/24lc1t0xowcnYpJt/jnthc06wpUqzF61btRhK17bvWEIDUyuut8 XnKQD9l7Jx/b2kz4ZtF3zw59hhE8HCzuRSZ4BYFZvAX0zU5hYq0vLBdCDUq1wx9/f6R7 i9563R8dV19033eOkg+fRwhEE2bbY0VheQ+rp5aeMg4IyTA2lqLvuvLAUQQ40urj4yto HKlQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=skole.hr); spf=pass (google.com: domain of linux-kernel+bounces-140236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140236-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id h17-20020a170906261100b00a519420028asi633993ejc.266.2024.04.11.03.49.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 03:49:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=skole.hr); spf=pass (google.com: domain of linux-kernel+bounces-140236-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140236-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 5C5571F275FB for ; Thu, 11 Apr 2024 10:23:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94D6E146D47; Thu, 11 Apr 2024 10:23:16 +0000 (UTC) Received: from mx.skole.hr (mx2.hosting.skole.hr [161.53.165.186]) (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 9BDFE13FD94; Thu, 11 Apr 2024 10:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=161.53.165.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830996; cv=none; b=rAC6aAeBw3P8DbzClt7OoyTHyYEBUwtVikKlGXKtj2LiqLXa3x+QQusnlo929XOrf9rgoGHVMWlXOd6AqiNgXGD4mPqXGz5qwPvOhaaXrE98wphjRA9sCJcGQs/nI/0qh8t2LT+4EsLy/HzQeOt82A5IQm3mrHkVXQ/RNrsUNEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712830996; c=relaxed/simple; bh=o3uBh7P8788b0SPX+S0so494+ke+vXw80SwMiOnWzOw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=UMwz/PbHtDilDG7nPF6R15OhmqJ7XQz03ubHWY0QY4LGbXmRpXN8Ew+HWAnALjMp4G/uG4xb5WXpN3VstzGmcZFoizOFnyBU8ng+YIF5ArKZjVaxg7aoEkgdVYwlP/1W7J1kG6gSXsK7c+xxJfNXB/FOkRZmKNEb62ReIkjeNfU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=skole.hr; spf=pass smtp.mailfrom=skole.hr; arc=none smtp.client-ip=161.53.165.186 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=skole.hr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=skole.hr Received: from mx2.hosting.skole.hr (localhost.localdomain [127.0.0.1]) by mx.skole.hr (mx.skole.hr) with ESMTP id 60B5B8673B; Thu, 11 Apr 2024 12:15:37 +0200 (CEST) Message-ID: Date: Thu, 11 Apr 2024 12:15:34 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v9 5/9] clk: mmp: Add Marvell PXA1908 clock driver To: Stephen Boyd , Catalin Marinas , Conor Dooley , "Guilherme G. Piccoli" , Haojian Zhuang , Kees Cook , Krzysztof Kozlowski , Linus Walleij , Lubomir Rintel , Michael Turquette , Rob Herring , Rob Herring , Tony Lindgren , Tony Luck , Will Deacon Cc: phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Karel Balej , David Wronek , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20240402-pxa1908-lkml-v9-0-25a003e83c6f@skole.hr> <20240402-pxa1908-lkml-v9-5-25a003e83c6f@skole.hr> <3838e4684f98e1ce3818bfb6983844bc.sboyd@kernel.org> Content-Language: en-CA From: =?UTF-8?Q?Duje_Mihanovi=C4=87?= In-Reply-To: <3838e4684f98e1ce3818bfb6983844bc.sboyd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/11/2024 10:00 AM, Stephen Boyd wrote: > Quoting Duje Mihanović (2024-04-02 13:55:41) >> diff --git a/drivers/clk/mmp/clk-of-pxa1908.c b/drivers/clk/mmp/clk-of-pxa1908.c >> new file mode 100644 >> index 000000000000..6f1f6e25a718 >> --- /dev/null >> +++ b/drivers/clk/mmp/clk-of-pxa1908.c >> @@ -0,0 +1,328 @@ >> +// SPDX-License-Identifier: GPL-2.0-only > [...] >> +static void __init pxa1908_apbc_clk_init(struct device_node *np) >> +{ >> + struct pxa1908_clk_unit *pxa_unit; >> + >> + pxa_unit = kzalloc(sizeof(*pxa_unit), GFP_KERNEL); >> + if (!pxa_unit) >> + return; >> + >> + pxa_unit->apbc_base = of_iomap(np, 0); >> + if (!pxa_unit->apbc_base) { >> + pr_err("failed to map apbc registers\n"); >> + kfree(pxa_unit); >> + return; >> + } >> + >> + mmp_clk_init(np, &pxa_unit->unit, APBC_NR_CLKS); >> + >> + pxa1908_apb_periph_clk_init(pxa_unit); >> +} >> +CLK_OF_DECLARE(pxa1908_apbc, "marvell,pxa1908-apbc", pxa1908_apbc_clk_init); > > Is there a reason this file can't be a platform driver? Not that I know of, I did it like this only because the other in-tree MMP clk drivers do so. I guess the initialization should look like any of the qcom GCC drivers then? While at it, do you think the other MMP clk drivers could use a conversion? Regards, -- Duje