Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1403362pxb; Fri, 21 Jan 2022 17:49:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGIP7pod1j8vv1eDS8Ped6Z3JmQG14E7TtMBQ0mSlk/xe3iJ87F6CB05ZGft+MXEwFO7iw X-Received: by 2002:a17:902:bcc8:b0:14a:b277:cdb7 with SMTP id o8-20020a170902bcc800b0014ab277cdb7mr6506693pls.28.1642816166427; Fri, 21 Jan 2022 17:49:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642816166; cv=none; d=google.com; s=arc-20160816; b=teA0m/C2RaqiozbVYy6WGKz9iCLJ7+DuYDXslJMjlVWYZl3beQqyTK3lzAD207bmhx j0aOilYiZhvR1u2CzK6ssw4up8PhOI3zopdR1jnqqqsVWfnVIVxkBK3eoFWmdCkZ+0v/ 3fSIj4Zvg610Aiw3jD8bM5re0kYVSOgOOntnYVyybsqlMENUqe4kmLHAm3RVRiLS9h4E 2QjpzF+LmFzt6ttc9yL0noLc6bd7QKtUSNfL5lKH95mnIP4xpU0/d6ma4QyM0awuyW8L iVzoednYkyeLum6MHW1DWWCU+kGhiwwP8CfFbGkz5kcKg5fb29j151+lbbVPzy7m2h2O 68Eg== 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; bh=vYdykKZxMsqfDJZuGZA6zXC8ig2MT7ctvQRDFMuGve0=; b=iP+3lQ4Q+sgC5cBb7XTyojabYsSNXuY2Izz3Qxm46EPmCGPbdMxj4s98p3idH6Egtq RD4XN94iCB4Tf51Qs0cic5cnbzIGu8aFA9J6UoH4p5GvpRJZB+nrqfqlFN80rU03za6s eT0TjcRm6Spc6nmLCF6xdJw5iGvrbxlEvd7a8JCjHodKGyeRa/6FNoDWFBl91uMRD5M6 dnu2GM3P1CuLOn9F+5GqLdawqQZyxS58hHTK7WGiVBbwdXh+BdRDxGZB2SOQ+5mk5tZV pAAEUkrsx8oqKd9YW4FKgWOdWzDnsdXUDSRw1HP1oFkadpaVWCVbW/6HbgwL/p0jiPja sP6g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k11si7727293pgh.102.2022.01.21.17.49.04; Fri, 21 Jan 2022 17:49:26 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350721AbiAUOqS (ORCPT + 99 others); Fri, 21 Jan 2022 09:46:18 -0500 Received: from mail-ua1-f47.google.com ([209.85.222.47]:42633 "EHLO mail-ua1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348692AbiAUOpj (ORCPT ); Fri, 21 Jan 2022 09:45:39 -0500 Received: by mail-ua1-f47.google.com with SMTP id p1so17222282uap.9; Fri, 21 Jan 2022 06:45:38 -0800 (PST) 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=vYdykKZxMsqfDJZuGZA6zXC8ig2MT7ctvQRDFMuGve0=; b=iUW2GvlPT2a/+dCnz26PgU0//pBBINOZzAiImHoR/JgaAMn8qMR03qhv5eUTMAjwth XTXfGCeu5iRQsuJDxe69poY0yMMulXZW/qI0eU+cKR4O2b8iRqNJsVWMA0y8ipHMomOU 9+m8biTL3GKGq7ysS2A3LgdlhafVFRlyjiiuNfKL8ShsGBUeIY8KtcdZcsZ4D9q22gL+ GbwLC96v+r0NavcqSxmH5vhSqidm0ioMROnurckVuOZx+A5k3mhOKtmmuZCbuG9ClYXG ZSs6Ha7TVyeBxDpa/kOcifFztUee4gKfvd6SBom/02+vtRR8WSextWNqFH+AjtgZ8D7r 2y1g== X-Gm-Message-State: AOAM533lCRwE/EbxGiUyLiyw2ZKe24wLRbNMaytiZmALCi7oxFtUwf9u m06OTQupYwqECBEqzL7cbl8Djbb/9vdGuA== X-Received: by 2002:a9f:2424:: with SMTP id 33mr1822456uaq.67.1642776338265; Fri, 21 Jan 2022 06:45:38 -0800 (PST) Received: from mail-vk1-f178.google.com (mail-vk1-f178.google.com. [209.85.221.178]) by smtp.gmail.com with ESMTPSA id p8sm515138vkm.23.2022.01.21.06.45.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 21 Jan 2022 06:45:38 -0800 (PST) Received: by mail-vk1-f178.google.com with SMTP id w206so5682132vkd.10; Fri, 21 Jan 2022 06:45:37 -0800 (PST) X-Received: by 2002:a05:6122:c89:: with SMTP id ba9mr1626374vkb.39.1642776337605; Fri, 21 Jan 2022 06:45:37 -0800 (PST) MIME-Version: 1.0 References: <20220110134659.30424-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220110134659.30424-6-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20220110134659.30424-6-prabhakar.mahadev-lad.rj@bp.renesas.com> From: Geert Uytterhoeven Date: Fri, 21 Jan 2022 15:45:26 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 05/12] clk: renesas: Add support for RZ/V2L SoC To: Lad Prabhakar Cc: Linux-Renesas , Michael Turquette , Stephen Boyd , Biju Das , Prabhakar , Linux Kernel Mailing List , linux-clk Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Prabhakar, Biju, On Mon, Jan 10, 2022 at 2:47 PM Lad Prabhakar wrote: > From: Biju Das > > The clock structure for RZ/V2L is almost identical to RZ/G2L SoC. The only > difference being RZ/V2L has an additional registers to control clock and > reset for the DRP-AI block. > > This patch adds minimal clock and reset entries required to boot the > system on Renesas RZ/V2L SMARC EVK and binds it with the RZ/G2L CPG core > driver. > > Signed-off-by: Biju Das > Signed-off-by: Lad Prabhakar Thanks for your patch! > --- /dev/null > +++ b/drivers/clk/renesas/r9a07g054-cpg.c > +const struct rzg2l_cpg_info r9a07g054_cpg_info = { > + /* Core Clocks */ > + .core_clks = r9a07g054_core_clks, > + .num_core_clks = ARRAY_SIZE(r9a07g054_core_clks), > + .last_dt_core_clk = LAST_DT_CORE_CLK, > + .num_total_core_clks = MOD_CLK_BASE, > + > + /* Critical Module Clocks */ > + .crit_mod_clks = r9a07g054_crit_mod_clks, > + .num_crit_mod_clks = ARRAY_SIZE(r9a07g054_crit_mod_clks), > + > + /* Module Clocks */ > + .mod_clks = r9a07g054_mod_clks, > + .num_mod_clks = ARRAY_SIZE(r9a07g054_mod_clks), > + .num_hw_mod_clks = R9A07G054_TSU_PCLK + 1, R9A07G054_STPAI_ACLK_DRP > + > + /* Resets */ > + .resets = r9a07g054_resets, > + .num_resets = ARRAY_SIZE(r9a07g054_resets), > +}; Given RZ/V2L is RZ/G2L + DRP-AI, and the common clock IDs are the same, what about reusing r9a07g044-cpg.c, and just adding a separate r9a07g054_cpg_info? When you add DRP-AI clocks and resets later, you just have to make sure .num_{core_clks,mod_clks,resets} are correct, similar to how drivers/pinctrl/renesas/pfc-r8a77951.c handles common and automotive pin groups and functions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds