Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1965611ybb; Fri, 29 Mar 2019 15:19:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuFlRatZk8z1dMKIVww49XAXgqrOKt4zu0nz4LuABQkeIBjBOLYcyvpflxohXs5ryaPOlF X-Received: by 2002:a17:902:15a8:: with SMTP id m37mr52860700pla.178.1553897941856; Fri, 29 Mar 2019 15:19:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553897941; cv=none; d=google.com; s=arc-20160816; b=FlI/G7YKC7Hzo5JSbfGSvxGBR47tuS1GmVSdINz1LzyooeCRZvTJ0q7RSg0N4MnG/K OmRm/Z0ukLVEcB5uyq4GyjvVBxsfy6ySCKhvT/oApUw1suWXIYPG2/CaFpcVzRU6AD+q OkyHcZV+MfRcrmpodP/X8oBR/ZrUvPyA5h36n6DE51VrGtjVpgj0G8wepnfsFJps7XDG uPTqHbwOUfElQynHDEhuMJHCJR0i6v5jzcZO0/Oy4Y3CLdKYLHUWxQT1bJSNQkjSWzeT xpxyeYw0P4hqr/x+biou/rjSBq7o4tr/cTlMcouk3VD7mX4b59qcaEnmkgbK9C/KBAQ3 5RfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:user-agent:message-id:to:cc:subject :from:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=HNRuHSc1/3mcWljNkA80oDNNw+nbDAifSIcpsR7ZGug=; b=lOkl8xcH4CCBWGKQJ1UMRv8YoVdAicUJMO2CMaN3KMMFxf/2C/cNqcgv4FyuA4oNAM mlsclBLiPNMx13OLfl4bTGoYNwvbo1GXDG1q7LO6qP6gmjt8t+n4ZqhdRgOJgxne0zm1 OEcAITRdZfjB5wJqJjlS9k3Rb2XHL+NJBx0EgT5qgj9vQIC5jHjS7ofrXqBhsrjQ68Em dBu5K/V7JbPjydY685JZPgWF+9gcRdsub/Sw4qeBFBkjottNK9aH0yz8KMyZw/rWZKkw QumLc8E8DtpawKh7nrURN6y56FH4Y0klGegtTOufKd0+0lTcdJrzzQR9kGls3OBkvCPR dfsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="N+/kEMSi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si2765948pgh.499.2019.03.29.15.18.46; Fri, 29 Mar 2019 15:19:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="N+/kEMSi"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730462AbfC2WSB (ORCPT + 99 others); Fri, 29 Mar 2019 18:18:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:47194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730062AbfC2WSB (ORCPT ); Fri, 29 Mar 2019 18:18:01 -0400 Received: from localhost (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 723B4218A2; Fri, 29 Mar 2019 22:18:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553897880; bh=R34pwDUDjO8Se0nDAvzs0GYjVuxUVhNdHGVyuJkeUBA=; h=In-Reply-To:References:From:Subject:Cc:To:Date:From; b=N+/kEMSi+/ZJwR+oObY31YOkUzAsdfAzH/tbW6vi8lWSs0dz4Up/khi3EaPqfhMse Pqbj2xoHGQn417+aqu43iarGLEjCmfG16wxRk1il7OVR9fT3PsdrbGvH2SGe7iy6hW MXndbiTzNkf4galwQzCLBAYfkXyfKJ563Vl7gja4= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <1553350115-2614-1-git-send-email-qiaozhou@asrmicro.com> References: <1553350115-2614-1-git-send-email-qiaozhou@asrmicro.com> From: Stephen Boyd Subject: Re: [PATCH] clk: asr: clock driver support for ASR AquilaC Soc Cc: Qiao Zhou To: Dan Carpenter , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, qiaozhou Message-ID: <155389787963.20095.9145169286940814698@swboyd.mtv.corp.google.com> User-Agent: alot/0.8 Date: Fri, 29 Mar 2019 15:17:59 -0700 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting qiaozhou (2019-03-23 07:08:35) > From: Qiao Zhou >=20 > add clock driver support for ASR AquilaC SoC. >=20 > We add clk-gate, clk-mix, and clk-pll drivers: > 1. clk-gate driver is for regisers which have different enable/disable bi= ts > to control gating. > 2. clk-mix driver is for registers which request to set div and mux > bits at the same time. > 3. clk-pll driver is for pll configuration. >=20 > Signed-off-by: qiaozhou Please make this match your "From" line above. > + > +static void __init aquilac_clk_init(struct device_node *np) > +{ > + int ret; > + struct asr_clk_data *clock_data; > + > + clock_data =3D kzalloc(sizeof(*clock_data), GFP_KERNEL); > + if (!clock_data) > + return; > + > + ret =3D aquilac_clk_of_iomap(np, clock_data); > + if (ret < 0) > + goto out; > + > + ret =3D asr_clk_init(np, &clock_data->unit, ASR_NR_CLKS); > + if (ret < 0) > + goto out; > + > + aquilac_general_clk_init(clock_data); > + > + aquilac_pll_init(clock_data); > + > + aquilac_mix_clk_init(clock_data); > + > + aquilac_periph_clk_init(clock_data); > + > + asr_clks_enable((const char **)keep_on_clocks_tbl, ARRAY_SIZE(kee= p_on_clocks_tbl)); > + > + return; > +out: > + kfree(clock_data); > +} > +CLK_OF_DECLARE(aquilac_clk, "asr,8751c-clock", aquilac_clk_init); Any reason this can't be a platform driver? > diff --git a/drivers/clk/asr/clk-gate.c b/drivers/clk/asr/clk-gate.c > new file mode 100644 > index 0000000..4ba5587 > --- /dev/null > +++ b/drivers/clk/asr/clk-gate.c > @@ -0,0 +1,151 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * asr gate clock operation source file > + * > + * Copyright (C) 2019 ASR Microelectronics(Shanghai) Co., Ltd. > + * Gang Wu > + * Qiao Zhou > + * > + * This file is licensed under the terms of the GNU General Public > + * License version 2. This program is licensed "as is" without any > + * warranty of any kind, whether express or implied. Please only have the SPDX tag and not this above paragraph. > + */ > + I'm not going to review anymore as I'll wait for a resend for Dan's comments.