Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3683023imw; Mon, 11 Jul 2022 13:35:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t47R+iar02D6UMF6LF2JYOwUJdzB0VmcWy+xU/zypowI6a5+nK0/Ohu5aNkW/VqXShiZUf X-Received: by 2002:a05:6402:328f:b0:43a:8488:1000 with SMTP id f15-20020a056402328f00b0043a84881000mr27322238eda.105.1657571745756; Mon, 11 Jul 2022 13:35:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657571745; cv=none; d=google.com; s=arc-20160816; b=IUOcdabOURONCVwYqTyHHPaBF+gW4RYrQf6Rh/rgqym4T6BBX+yJbDh4aHhOBYWbLo Y2A2bINX2qrP4a0/kA/EAQBBERdlFUp+2LQ28Eu1mF0AChZ4f1l5fz4AG/r7AAfMyL74 l+WDaq7dl8/teHAHK2XcR+a8GEF0UXFZTuhmR2WXQTvlvUdbzoxBEpaF6MwgYfic46aj Wk8NhJ3box9Pw4q2pSONvUVBAoeXl9w38zJgmdtYFjpYJ+XQEK++adlC0PhXaehbmJqW byg1q2IQhPc3/aqK0rLlhjinA2j4KhPpBu89v6mKhcXmx7p51S1o/GY45Neqm/wgNwVd SUaQ== 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=LDNx+9tLOEchCx5oELUq/cifytIb9IuZDrZqvu1S5rk=; b=stV9ibIKNRgmiLwv4tAEcyt3vI4bb+ni1C72rHJPe61ELt/NZy4R+V/Aj4PO2x0BFI h+45BbYbo8X23zjYpzR6JcfeDzPu9160q6n9B3zpkTVi5ZIw+nI7Hx6xV7uUG2TtXfdH 9f+F7H8a9sniZpGw3yBIk5sDC9TijoWFbQahfsazRkV2C/hZaoNCHMsPG32i+6kXpO8s ZEbLs1dSuzoFpmRGDaxay8R2F2IR9agacl2KNXT0FN1Cepi0n/+xpkZMR+TjD/Qv1ozw E5JQXfAa7X5GwYdc+qmbD2FyyJeokcgoh05HKzrqCVc5d9iR99WAutwkdCbAZCzpAvI9 mSoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Qin4VdXG; 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 i27-20020a1709063c5b00b00726a885d35bsi9774731ejg.811.2022.07.11.13.35.20; Mon, 11 Jul 2022 13:35:45 -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=Qin4VdXG; 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 S231902AbiGKU30 (ORCPT + 99 others); Mon, 11 Jul 2022 16:29:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231890AbiGKU3L (ORCPT ); Mon, 11 Jul 2022 16:29:11 -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 BA2B887F66; Mon, 11 Jul 2022 13:27:01 -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 415226162A; Mon, 11 Jul 2022 20:26:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91B1CC341CE; Mon, 11 Jul 2022 20:26:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657571214; bh=yppWtMlpzGxhTVCbUitFL8uc/Qbx8CgTBfd7qCKLRQA=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Qin4VdXGfP4lSvhaVW9agm6dNAbmCuEsi8tD/yw3yjAp402r3CMwbBj/GDujIDNSo /49UbqPjkcCNyFcfGuELL5UzCZVdGgMzaI6+HQj9y43oGLpTbT06yx2/eoaxVATVlP I8Ly2O9fE6fBgHK3bG5ekdNhnUI3meXc6DiyvUUHk3c5a1o7ILjgvyPi9zVfAxO/pb 5c3bUwDMsJLEVxsky74vVIMuETCS7huTqEr3FEVBINGfmUelBNfwZCnfZWAL4koeul 54EVWIWPBJHpf2FryCzxkxQPopx5NJybNX7GgGK3rztQm6McnrIGr76Hen9Dp+WbVw 7CWgEq5jJpz/g== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220505101433.1575096-5-gengcixi@gmail.com> References: <20220505101433.1575096-1-gengcixi@gmail.com> <20220505101433.1575096-5-gengcixi@gmail.com> Subject: Re: [PATCH v5 4/4] clk: sprd: Add clocks support for UMS512 From: Stephen Boyd Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org To: Cixi Geng , baolin.wang7@gmail.com, krzysztof.kozlowski+dt@linaro.org, lee.jones@linaro.org, mturquette@baylibre.com, orsonzhai@gmail.com, robh+dt@kernel.org, zhang.lyra@gmail.com Date: Mon, 11 Jul 2022 13:26:52 -0700 User-Agent: alot/0.10 Message-Id: <20220711202654.91B1CC341CE@smtp.kernel.org> X-Spam-Status: No, score=-7.7 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 Cixi Geng (2022-05-05 03:14:33) > diff --git a/drivers/clk/sprd/ums512-clk.c b/drivers/clk/sprd/ums512-clk.c > new file mode 100644 > index 000000000000..53ed58de61cd > --- /dev/null > +++ b/drivers/clk/sprd/ums512-clk.c > @@ -0,0 +1,2199 @@ > +// SPDX-License-Identifier: GPL Please pick an appropriate license. WARNING: 'SPDX-License-Identifier: GPL' is not supported in LICENSES/... #49: FILE: drivers/clk/sprd/ums512-clk.c:1: +// SPDX-License-Identifier: GPL > +/* > + * Unisoc UMS512 clock driver > + * > + * Copyright (C) 2022 Unisoc, Inc. > + * Author: Xiaolong Zhang > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > + > +#include "common.h" > +#include "composite.h" > +#include "div.h" > +#include "gate.h" > +#include "mux.h" > +#include "pll.h" > + > +#define UMS512_MUX_FLAG \ > + (CLK_GET_RATE_NOCACHE | CLK_SET_RATE_NO_REPARENT) Why do we need nocache? > + > +/* pll gate clock */ > +/* some pll clocks configure CLK_IGNORE_UNUSED because hw dvfs does not = call > + * clock interface. hw dvfs can not gate the pll clock. > + */ > +static CLK_FIXED_FACTOR_FW_NAME(clk_26m_aud, "clk-26m-aud", "ext-26m", 1= , 1, 0); [...] > + .hw_clks =3D &ums512_pmu_gate_hws, > +}; > + > +/* pll clock at g0 */ > +static const u64 itable_dpll0[7] =3D {6, 0, 0, Please put space after '{' and before '}' > + 1173000000ULL, 1475000000ULL, > + 1855000000ULL, 1866000000ULL}; > + [...] > + > +static int ums512_clk_probe(struct platform_device *pdev) > +{ > + const struct sprd_clk_desc *desc; > + > + desc =3D device_get_match_data(&pdev->dev); > + if (!desc) > + return -ENODEV; > + > + sprd_clk_regmap_init(pdev, desc); Check for error please > + > + return sprd_clk_probe(&pdev->dev, desc->hw_clks); > +} > +