From patchwork Thu Jul 27 05:31:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13328804 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2C55C04E69 for ; Thu, 27 Jul 2023 05:38:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=gfzWnvCkf0QSBcjDbIadS0moad3pyG1jsJErkbeXmAw=; b=IZxI+ycCOmJ1VO 5smKiYiF6N+r4IlYy4JeZc2LSLm4nVay+OJjbm0N4qrCUNxa8pKi+HuwLbZHd5c4ObcAPBslDThhk 8F0UFxIZf8eQZvi1PKwARj7yy+HAD0lzCIanletOO6CrNyyciEWs7fjSovH9BcowxTYVIS/cl0Vv5 Mrv0HAHbJIGuiN/SMEGQzSg/z35EEozWItTAdjPbrPBsMBY2Jsc4EAPYGUbA4A96AEbxQebvlJavI 0yRC6iro75Nbpbo+ubxX2AVJyw9T0FP+n4dSWc/g2X8sSfW4pKK/2t2vMYsc7oqiUS0GyK/lT6RpH 85oGrZBgCtrjGXUjJtbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOthA-00CDnc-2z; Thu, 27 Jul 2023 05:37:52 +0000 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOtgJ-00CDUI-0E for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 05:37:07 +0000 Received: by mail-pl1-x62b.google.com with SMTP id d9443c01a7336-1bba2318546so4687255ad.1 for ; Wed, 26 Jul 2023 22:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436218; x=1691041018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rFDKIrER1Q8EDEuXgmXxXy7qiRoYOQyJHV+mlKGKhyM=; b=Q5pItotCSKZWCFdXRGzjghrjkFi3Z+sL99/EwD3Ud+0lavJWRnFGQcG6R/iJ0c0TXT ic/vw6K4bWiQE6uKkhkm3GJFvQyyQK2EfHDZu622BFd72xzRH53btHPRiPzreyUVh/iz lm5zXMA1QdQ0lC4Dx8qpxKISW74rUgtQeRe3s5m8APoc9Kw7Txf4YfsMMN/xrF91WMIj boLQeStCa0Rvxfk9p16kl10ebs4CovIh1JwOtMxDkxCTasP5WYdA7GI3vbvVljYvUyj2 thyshFC6UF1wuFcrV+p5KZwTitrW4H5GTyZ5Ift67NF5kW+oi7mIOhKan6DBuHdfLTjR 63wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436218; x=1691041018; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rFDKIrER1Q8EDEuXgmXxXy7qiRoYOQyJHV+mlKGKhyM=; b=i4qp+pcyOUNBw7kltsXkmbI8UPQeBochzoNWwJk2OhSmDoaFFyqqQ++8MKUu5u+Va/ 8z+FpF+JnGCEaX++xYDRf6u5+VLwCBjhezjEs2C1nwKiMBqJFK8vUo6tcOKZDNZq4xVF QNTtZFRs8UxJK0rzwE4gTXmJK9wtygHavB/GP9Y/slJ43u9IBKynWbyG3sCrnUd7p0IM rb1+K8VeSx3t5Nw5pY99Qc66il0RqwEFacFHrBxaoWPq6DOFqGFwCJ5xktUq6zs9bhjk TMuUhkJZi5FhCROTyulihkTfHVXWldhH4+UOPKKvwREfg/GLQ+slCLQZbAIlGAURH8Xd Xw8g== X-Gm-Message-State: ABy/qLZbg2NmwGc6DyeOJ9fQWAeqITQL0GLIoDk8lgMeJhBAZsV/mvm6 uS2vuRCyUOvDuXTMk5wcxL2Nqw== X-Google-Smtp-Source: APBJJlFsafDnT8kkWkk3yUqoJROLuqetgWn4uUQXGuwpxasw70Gtt8yiGSgxsI8WlcWcysUugjf0SA== X-Received: by 2002:a17:902:f681:b0:1b6:b805:5ae3 with SMTP id l1-20020a170902f68100b001b6b8055ae3mr4943140plg.3.1690436218328; Wed, 26 Jul 2023 22:36:58 -0700 (PDT) Received: from localhost.localdomain ([82.78.167.79]) by smtp.gmail.com with ESMTPSA id 21-20020a170902c11500b001bb889530adsm319059pli.217.2023.07.26.22.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 22:36:58 -0700 (PDT) From: Claudiu Beznea To: mturquette@baylibre.com, sboyd@kernel.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, mripard@kernel.org Cc: linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, varshini.rajendran@microchip.com, Claudiu Beznea Subject: [PATCH 37/42] clk: at91: clk-sam9x60-pll: remove parent_names support Date: Thu, 27 Jul 2023 08:31:51 +0300 Message-Id: <20230727053156.13587-38-claudiu.beznea@tuxon.dev> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230727053156.13587-1-claudiu.beznea@tuxon.dev> References: <20230727053156.13587-1-claudiu.beznea@tuxon.dev> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230726_223659_166711_C46DD13C X-CRM114-Status: GOOD ( 15.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Remove parent_names support as parent_hw support is now available on all platforms using clk-sam9x60-pll driver. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-sam9x60-pll.c | 16 ++++------------ drivers/clk/at91/pmc.h | 6 ++---- drivers/clk/at91/sam9x60.c | 8 ++++---- drivers/clk/at91/sama7g5.c | 4 ++-- 4 files changed, 12 insertions(+), 22 deletions(-) diff --git a/drivers/clk/at91/clk-sam9x60-pll.c b/drivers/clk/at91/clk-sam9x60-pll.c index ff65f7b916f0..787ab36ecdba 100644 --- a/drivers/clk/at91/clk-sam9x60-pll.c +++ b/drivers/clk/at91/clk-sam9x60-pll.c @@ -609,8 +609,7 @@ static const struct clk_ops sam9x60_div_pll_ops_chg = { struct clk_hw * __init sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, u8 id, + const char *name, struct clk_hw *parent_hw, u8 id, const struct clk_pll_characteristics *characteristics, const struct clk_pll_layout *layout, u32 flags) { @@ -629,10 +628,7 @@ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, return ERR_PTR(-ENOMEM); init.name = name; - if (parent_name) - init.parent_names = &parent_name; - else - init.parent_hws = (const struct clk_hw **)&parent_hw; + init.parent_hws = (const struct clk_hw **)&parent_hw; init.num_parents = 1; if (flags & CLK_SET_RATE_GATE) init.ops = &sam9x60_frac_pll_ops; @@ -695,8 +691,7 @@ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, struct clk_hw * __init sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, u8 id, + const char *name, struct clk_hw *parent_hw, u8 id, const struct clk_pll_characteristics *characteristics, const struct clk_pll_layout *layout, u32 flags, u32 safe_div) @@ -720,10 +715,7 @@ sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock, return ERR_PTR(-ENOMEM); init.name = name; - if (parent_hw) - init.parent_hws = (const struct clk_hw **)&parent_hw; - else - init.parent_names = &parent_name; + init.parent_hws = (const struct clk_hw **)&parent_hw; init.num_parents = 1; if (flags & CLK_SET_RATE_GATE) init.ops = &sam9x60_div_pll_ops; diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index 7d2524109776..fe86cca2776e 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -211,16 +211,14 @@ at91_clk_register_plldiv(struct regmap *regmap, const char *name, struct clk_hw * __init sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, u8 id, + const char *name, struct clk_hw *parent_hw, u8 id, const struct clk_pll_characteristics *characteristics, const struct clk_pll_layout *layout, u32 flags, u32 safe_div); struct clk_hw * __init sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, u8 id, + const char *name, struct clk_hw *parent_hw, u8 id, const struct clk_pll_characteristics *characteristics, const struct clk_pll_layout *layout, u32 flags); diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c index 897a8f2d6102..68abd0fd47db 100644 --- a/drivers/clk/at91/sam9x60.c +++ b/drivers/clk/at91/sam9x60.c @@ -238,7 +238,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np) sam9x60_pmc->chws[PMC_MAIN] = hw; hw = sam9x60_clk_register_frac_pll(regmap, &pmc_pll_lock, "pllack_fracck", - NULL, sam9x60_pmc->chws[PMC_MAIN], + sam9x60_pmc->chws[PMC_MAIN], 0, &plla_characteristics, &pll_frac_layout, /* @@ -251,7 +251,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np) goto err_free; hw = sam9x60_clk_register_div_pll(regmap, &pmc_pll_lock, "pllack_divck", - NULL, hw, 0, &plla_characteristics, + hw, 0, &plla_characteristics, &pll_div_layout, /* * This feeds CPU. It should not @@ -264,14 +264,14 @@ static void __init sam9x60_pmc_setup(struct device_node *np) sam9x60_pmc->chws[PMC_PLLACK] = hw; hw = sam9x60_clk_register_frac_pll(regmap, &pmc_pll_lock, "upllck_fracck", - NULL, main_osc_hw, 1, + main_osc_hw, 1, &upll_characteristics, &pll_frac_layout, CLK_SET_RATE_GATE); if (IS_ERR(hw)) goto err_free; hw = sam9x60_clk_register_div_pll(regmap, &pmc_pll_lock, "upllck_divck", - NULL, hw, 1, &upll_characteristics, + hw, 1, &upll_characteristics, &pll_div_layout, CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE | diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index baec84bd5d06..0d81a955e686 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1074,7 +1074,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np) hw = sam9x60_clk_register_frac_pll(regmap, &pmc_pll_lock, sama7g5_plls[i][j].n, - NULL, parent_hw, i, + parent_hw, i, sama7g5_plls[i][j].c, sama7g5_plls[i][j].l, sama7g5_plls[i][j].f); @@ -1083,7 +1083,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np) case PLL_TYPE_DIV: hw = sam9x60_clk_register_div_pll(regmap, &pmc_pll_lock, sama7g5_plls[i][j].n, - NULL, sama7g5_plls[i][0].hw, i, + sama7g5_plls[i][0].hw, i, sama7g5_plls[i][j].c, sama7g5_plls[i][j].l, sama7g5_plls[i][j].f,