From patchwork Thu Jul 27 05:31:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 13328802 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 E802CEB64DD for ; Thu, 27 Jul 2023 05:37:13 +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=+2QbgalvFxouGiRqT6NjiCnrZxluLJtFPix4JVci1T8=; b=wJ+2knA4SmaVjx QRf2i0PimOEumyn6IeVMG1anSm2m067mqBRX+CEsKte5qYMcpVx0KMC1Gv1cUP23e5qvVZM3OT0vt OkXIzQtAhDChOULzbxmRsTnAZJjen2IDq8XvT7f4ECiZh3tYrvLVTDZQrOPc1xw5Uub1bBk826Jgs uRWYldETLiB3Op2klg2ggXhCfM56ebv5XKZDewoluPpA1NKmlBJzT7Qu79wqU/ksEcatJCEkN/UWv BlxEPctfwVZF/hHi+7+TU8hNz2LT2TLl6lh1sAhY/gDJUO3LsvvBvAZz85j8qGfUu5KtMEuyz4RJF snfnD3I3SAdTuBhHCQlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOtg8-00CDNR-0b; Thu, 27 Jul 2023 05:36:48 +0000 Received: from mail-oo1-xc2a.google.com ([2607:f8b0:4864:20::c2a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOtfr-00CD9L-2f for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 05:36:34 +0000 Received: by mail-oo1-xc2a.google.com with SMTP id 006d021491bc7-569fdf846edso435841eaf.2 for ; Wed, 26 Jul 2023 22:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436189; x=1691040989; 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=aHiZnC//dKhKHVPO0qNmCO5eqfKdG5DqSJMZ1aUfAvU=; b=XTzAZjbSrpWj9+zWSZTLphmvyX0gW2ZlfsxwTUDO8CbQmuQytLUbOi6j/FcxQFoZfZ XyA1sEfCbCquleeQFsOB0qBYMTvkeAddSMeczxr3pfyBkXyNEAUNRq42Tm/D38S0pPgQ OWWkqozWo7HPgwTOuOTPadQHEXKmb+0s5Dvs8bq7A71n1nDdUuoMAzVMfC2EQ2HWLAtR ShlLjVEhAoIjaXHCxBo57JaGB2GWIDkDZZcBFe+jPSPi2Y95lgq2p08LlZrIU1BqwUOS sCpLP3fA7ufQCjAWVR30Lzibvq4VClY/3vtTKaVDXQUbdiv6E8u05m/lohnmzLqlFFvr CcZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436189; x=1691040989; 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=aHiZnC//dKhKHVPO0qNmCO5eqfKdG5DqSJMZ1aUfAvU=; b=HM42rqhK7XYTIR/Rxt/G7mjwcsZ/OzyPIr2hePgWYu7ff3zyEljuS+Q1rYSd1Xz81S P0dH2C1TUe729bZCVP8E4vU0+fWgtLSY8jDumXNdprPJslI4hgPO7golWMvSLFC0hhuQ ffPmiiTtKmpzcToxp6ZUDzwHLsEY1LwXEgP2VgU5AhFG0p0gZgFJrVyzYOzZg5ldLHUz rH9fQFMHMvnWPZqd9l9vbjM6ddxCiAlgffcPvOR+5kGcKmXjjfIswqHcsbR3w/56qrRe QFiWF5bSWvWrpk/lYNS42E94tGAseX7vS9HD+F73suWx2JdvCIS6hf/fd/5ddozIcAOt hyDg== X-Gm-Message-State: ABy/qLZbR454XVARQ1XEJiAxMXVxrsC7bJq3pvKsHBzNZivPQPfd6H4t dsW/dLLCTD6O5ff+uI4m0JdSnw== X-Google-Smtp-Source: APBJJlGuQ00Fuq1b7Mx/AmGyo5y38uf06QC6VXRVfFWX5zi5TqxvXLHpcZKB5MuFsluVWmuXDtvvjQ== X-Received: by 2002:a05:6808:428e:b0:3a4:8ac7:3407 with SMTP id dq14-20020a056808428e00b003a48ac73407mr1803669oib.42.1690436188765; Wed, 26 Jul 2023 22:36:28 -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.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 22:36:28 -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 33/42] clk: at91: clk-peripheral: remove parent_names support Date: Thu, 27 Jul 2023 08:31:47 +0300 Message-Id: <20230727053156.13587-34-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_223631_890837_B644343C X-CRM114-Status: GOOD ( 17.95 ) 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-peripheral driver. Signed-off-by: Claudiu Beznea --- drivers/clk/at91/at91rm9200.c | 2 +- drivers/clk/at91/at91sam9260.c | 2 +- drivers/clk/at91/at91sam9g45.c | 2 +- drivers/clk/at91/at91sam9n12.c | 2 +- drivers/clk/at91/at91sam9rl.c | 2 +- drivers/clk/at91/at91sam9x5.c | 4 ++-- drivers/clk/at91/clk-peripheral.c | 20 ++++++-------------- drivers/clk/at91/dt-compat.c | 3 +-- drivers/clk/at91/pmc.h | 6 ++---- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 4 ++-- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 4 ++-- drivers/clk/at91/sama7g5.c | 1 - 14 files changed, 22 insertions(+), 34 deletions(-) diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c index 9e32189ac374..7cb90d71d0ce 100644 --- a/drivers/clk/at91/at91rm9200.c +++ b/drivers/clk/at91/at91rm9200.c @@ -207,7 +207,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np) for (i = 0; i < ARRAY_SIZE(at91rm9200_periphck); i++) { hw = at91_clk_register_peripheral(regmap, at91rm9200_periphck[i].n, - NULL, at91rm9200_pmc->chws[PMC_MCK], + at91rm9200_pmc->chws[PMC_MCK], at91rm9200_periphck[i].id); if (IS_ERR(hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c index 538bbecdbdeb..9839bd4586cd 100644 --- a/drivers/clk/at91/at91sam9260.c +++ b/drivers/clk/at91/at91sam9260.c @@ -486,7 +486,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np, for (i = 0; i < data->num_pck; i++) { hw = at91_clk_register_peripheral(regmap, data->pck[i].n, - NULL, at91sam9260_pmc->chws[PMC_MCK], + at91sam9260_pmc->chws[PMC_MCK], data->pck[i].id); if (IS_ERR(hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c index fbd4d68dae56..e7f2173ff6c1 100644 --- a/drivers/clk/at91/at91sam9g45.c +++ b/drivers/clk/at91/at91sam9g45.c @@ -225,7 +225,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np) for (i = 0; i < ARRAY_SIZE(at91sam9g45_periphck); i++) { hw = at91_clk_register_peripheral(regmap, at91sam9g45_periphck[i].n, - NULL, at91sam9g45_pmc->chws[PMC_MCK], + at91sam9g45_pmc->chws[PMC_MCK], at91sam9g45_periphck[i].id); if (IS_ERR(hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c index e9b266d1de91..2d26c202b257 100644 --- a/drivers/clk/at91/at91sam9n12.c +++ b/drivers/clk/at91/at91sam9n12.c @@ -254,7 +254,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &at91sam9n12_pcr_layout, at91sam9n12_periphck[i].n, - NULL, at91sam9n12_pmc->chws[PMC_MCK], + at91sam9n12_pmc->chws[PMC_MCK], at91sam9n12_periphck[i].id, &range, INT_MIN, 0); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c index 1e027fa938b6..c7fc4bcf4e5b 100644 --- a/drivers/clk/at91/at91sam9rl.c +++ b/drivers/clk/at91/at91sam9rl.c @@ -175,7 +175,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np) for (i = 0; i < ARRAY_SIZE(at91sam9rl_periphck); i++) { hw = at91_clk_register_peripheral(regmap, at91sam9rl_periphck[i].n, - NULL, at91sam9rl_pmc->chws[PMC_MCK], + at91sam9rl_pmc->chws[PMC_MCK], at91sam9rl_periphck[i].id); if (IS_ERR(hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c index 27c41fc7b097..8da2732a73fa 100644 --- a/drivers/clk/at91/at91sam9x5.c +++ b/drivers/clk/at91/at91sam9x5.c @@ -287,7 +287,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &at91sam9x5_pcr_layout, at91sam9x5_periphck[i].n, - NULL, at91sam9x5_pmc->chws[PMC_MCK], + at91sam9x5_pmc->chws[PMC_MCK], at91sam9x5_periphck[i].id, &range, INT_MIN, 0); if (IS_ERR(hw)) @@ -300,7 +300,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &at91sam9x5_pcr_layout, extra_pcks[i].n, - NULL, at91sam9x5_pmc->chws[PMC_MCK], + at91sam9x5_pmc->chws[PMC_MCK], extra_pcks[i].id, &range, INT_MIN, 0); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c index c173a44c800a..73c90fa535e0 100644 --- a/drivers/clk/at91/clk-peripheral.c +++ b/drivers/clk/at91/clk-peripheral.c @@ -97,15 +97,14 @@ static const struct clk_ops peripheral_ops = { struct clk_hw * __init at91_clk_register_peripheral(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, - u32 id) + struct clk_hw *parent_hw, u32 id) { struct clk_peripheral *periph; struct clk_init_data init = {}; struct clk_hw *hw; int ret; - if (!name || !(parent_name || parent_hw) || id > PERIPHERAL_ID_MAX) + if (!name || !parent_hw || id > PERIPHERAL_ID_MAX) return ERR_PTR(-EINVAL); periph = kzalloc(sizeof(*periph), GFP_KERNEL); @@ -114,10 +113,7 @@ at91_clk_register_peripheral(struct regmap *regmap, const char *name, init.name = name; init.ops = &peripheral_ops; - 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; init.flags = 0; @@ -447,8 +443,7 @@ static const struct clk_ops sam9x5_peripheral_chg_ops = { struct clk_hw * __init at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock, const struct clk_pcr_layout *layout, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, + const char *name, struct clk_hw *parent_hw, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags) { @@ -457,7 +452,7 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock, struct clk_hw *hw; int ret; - if (!name || !(parent_name || parent_hw)) + if (!name || !parent_hw) return ERR_PTR(-EINVAL); periph = kzalloc(sizeof(*periph), GFP_KERNEL); @@ -465,10 +460,7 @@ at91_clk_register_sam9x5_peripheral(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; init.flags = flags; if (chg_pid < 0) { diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c index 590d0f115647..8f67a7a94c54 100644 --- a/drivers/clk/at91/dt-compat.c +++ b/drivers/clk/at91/dt-compat.c @@ -561,7 +561,7 @@ of_at91_clk_periph_setup(struct device_node *np, u8 type) if (type == PERIPHERAL_AT91RM9200) { hw = at91_clk_register_peripheral(regmap, name, - NULL, parent_hw, id); + parent_hw, id); } else { struct clk_range range = CLK_RANGE(0, 0); unsigned long flags = 0; @@ -582,7 +582,6 @@ of_at91_clk_periph_setup(struct device_node *np, u8 type) &pmc_pcr_lock, &dt_pcr_layout, name, - NULL, parent_hw, id, &range, INT_MIN, diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index c26dcbc8c475..54088c6d4de4 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -192,13 +192,11 @@ at91_clk_sama7g5_register_master(struct regmap *regmap, struct clk_hw * __init at91_clk_register_peripheral(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, - u32 id); + struct clk_hw *parent_hw, u32 id); struct clk_hw * __init at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock, const struct clk_pcr_layout *layout, - const char *name, const char *parent_name, - struct clk_hw *parent_hw, + const char *name, struct clk_hw *parent_hw, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags); diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c index ce54684e4684..148873fced1b 100644 --- a/drivers/clk/at91/sam9x60.c +++ b/drivers/clk/at91/sam9x60.c @@ -348,7 +348,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sam9x60_pcr_layout, sam9x60_periphck[i].n, - NULL, sam9x60_pmc->chws[PMC_MCK], + sam9x60_pmc->chws[PMC_MCK], sam9x60_periphck[i].id, &range, INT_MIN, sam9x60_periphck[i].flags); diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index a25184ea7aef..809926c63078 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -337,7 +337,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama5d2_pcr_layout, sama5d2_periphck[i].n, - NULL, sama5d2_pmc->chws[PMC_MCK], + sama5d2_pmc->chws[PMC_MCK], sama5d2_periphck[i].id, &range, INT_MIN, sama5d2_periphck[i].flags); @@ -351,7 +351,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama5d2_pcr_layout, sama5d2_periph32ck[i].n, - NULL, sama5d2_pmc->chws[PMC_MCK2], + sama5d2_pmc->chws[PMC_MCK2], sama5d2_periph32ck[i].id, &sama5d2_periph32ck[i].r, INT_MIN, 0); diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c index 5c0ef9416370..4453f47798b7 100644 --- a/drivers/clk/at91/sama5d3.c +++ b/drivers/clk/at91/sama5d3.c @@ -259,7 +259,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama5d3_pcr_layout, sama5d3_periphck[i].n, - NULL, sama5d3_pmc->chws[PMC_MCK], + sama5d3_pmc->chws[PMC_MCK], sama5d3_periphck[i].id, &sama5d3_periphck[i].r, INT_MIN, diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c index 88841d7d5477..9f6ad0699702 100644 --- a/drivers/clk/at91/sama5d4.c +++ b/drivers/clk/at91/sama5d4.c @@ -282,7 +282,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama5d4_pcr_layout, sama5d4_periphck[i].n, - NULL, sama5d4_pmc->chws[PMC_MCK], + sama5d4_pmc->chws[PMC_MCK], sama5d4_periphck[i].id, &range, INT_MIN, sama5d4_periphck[i].flags); @@ -296,7 +296,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama5d4_pcr_layout, sama5d4_periph32ck[i].n, - NULL, sama5d4_pmc->chws[PMC_MCK2], + sama5d4_pmc->chws[PMC_MCK2], sama5d4_periph32ck[i].id, &range, INT_MIN, 0); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index d18b2b7885e0..9cba1ad116a8 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1195,7 +1195,6 @@ static void __init sama7g5_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sama7g5_pcr_layout, sama7g5_periphck[i].n, - NULL, sama7g5_mckx[sama7g5_periphck[i].p].hw, sama7g5_periphck[i].id, &sama7g5_periphck[i].r,