From mboxrd@z Thu Jan 1 00:00:00 1970 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 68B1EC83F17 for ; Thu, 10 Jul 2025 22:24:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding: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=BDgJGeGTON/5Zty0O12SBHrBuuvJMknqBQXUwINZvEs=; b=uZyuYD2fJjwwbBFH7X6F7jIUcU y17EZds9tAToTzzi79l64b47urKYr7YOhcQuSQ8UWd9seQJZVspFc0FbK+LOjTpF37xNJ76Phh/UY ScuM81Z6rGUoxRGtpbzN05SttZ2QJverNPV6j/NJykMFMP+BGu2TlNUsm/u2V127kmQsskBSJ2Pt2 sfV3bhIF4LP7aLu7bq9pRxz3XPeUJzGKAcYLmZx13ZHtWJ0mRvO/1E36Lrlb5VzpqBGbm6S+rvJ7W XXec3U8LFD4afBF1dmhFPyqtSxKzz9HyEgmYJnzenEamdg59psA9N9bjjC51uFSfCR0iYoAyOJKfF RIidzS8g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uZzgM-0000000D9SK-1HE3; Thu, 10 Jul 2025 22:23:58 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uZxYp-0000000Ct4q-3JA5 for linux-arm-kernel@bombadil.infradead.org; Thu, 10 Jul 2025 20:08:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Type:Content-Transfer-Encoding :MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description; bh=BDgJGeGTON/5Zty0O12SBHrBuuvJMknqBQXUwINZvEs=; b=Tkv+yKc1/GdueR/VQ06pMMnYbl S72+FJZxc6McInLCdMXAiNj1ZBgqumFFnr+yUOnX78fvJiMkEOn9iEqJ4HUtrkmwBoCfKDvxfVQX2 LNJ7dfcf1ilO+vC9hIJYvHtjByGknAcnQbERECDmdNVfcqCirGY/JeHq+bL4hEPl83a4pvxHxvmuG Mjniaa5F+QQ1XlR6eawYnnurM5F0DWF5UfnJu0+UOSHVx3j/uVy8+CU4hJrWhfHVsQRbmSXNTqbRg 0LO4ky5DKfWBA4xWtzYbBEjt/YbIPEBitE/hbNI++9KHpP3X9xpJz6gyAnq72hl7/PdzVEcVow3zP 2C4y5ADA==; Received: from esa.microchip.iphmx.com ([68.232.154.123]) by desiato.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uZxYl-000000098q6-2myY for linux-arm-kernel@lists.infradead.org; Thu, 10 Jul 2025 20:08:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1752178079; x=1783714079; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=B32xddJoeeIpwlgISm5VVZTX+V+01ZDyEYAj5zmF75c=; b=pqsUcdIhiPCs4L/QLSbn53rmK9aAVaz1IOY7lxEpPj7KLVOCcNEWTDm4 aGjg0mAjwpIq1KIdE6SymyRHY2xs9YMDIP5I20mvP6s5Z0ts09M52nW5w hWqkHYBA8JQpu1GtnX65f+g92xw4HJoZSyPwd0d5kOm8oUeculDYl5uSX nQKRapES4k64wnPJ5qiAvrQ81dcvmDcTDCUuO8woVzqXG0ROvSWTNSglP +KvdYOwIwJ0Ac3IDw3ce0ebRT0S+ZjTA/txa5NaQIcY54BklINekMjtwU zMjCK9uBz94mu1VVwlm78vs4sGh/7DHQ2uwyD3TvhoN0XJPSljrzqhDt6 w==; X-CSE-ConnectionGUID: VcY24SkbRKSMnNSaLxS1vA== X-CSE-MsgGUID: RDyBJja1Qm2UNq4ITe+UrQ== X-IronPort-AV: E=Sophos;i="6.16,301,1744095600"; d="scan'208";a="44448160" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa2.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 10 Jul 2025 13:07:52 -0700 Received: from chn-vm-ex04.mchp-main.com (10.10.85.152) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.44; Thu, 10 Jul 2025 13:07:30 -0700 Received: from ryan-Precision-3630-Tower.microchip.com (10.10.85.11) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server id 15.1.2507.44 via Frontend Transport; Thu, 10 Jul 2025 13:07:30 -0700 From: To: , , , , CC: , , , , Subject: [PATCH v3 05/32] clk: at91: clk-peripheral: switch to clk_parent_data Date: Thu, 10 Jul 2025 13:06:58 -0700 Message-ID: <657143d460ed5f2f726413385895c0c80ddddef9.1752176711.git.Ryan.Wanner@microchip.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250710_210801_021260_AE85F369 X-CRM114-Status: GOOD ( 14.39 ) 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 From: Claudiu Beznea Use struct clk_parent_data instead of parent_hw for peripheral clocks. Signed-off-by: Claudiu Beznea [ryan.wanner@microchip.com: Add SAMA7D65 and SAM9X7 SoCs to the use the structs.] Signed-off-by: Ryan Wanner --- drivers/clk/at91/clk-peripheral.c | 16 ++++++++-------- drivers/clk/at91/pmc.h | 4 ++-- drivers/clk/at91/sam9x7.c | 2 +- drivers/clk/at91/sama7d65.c | 2 +- drivers/clk/at91/sama7g5.c | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c index c173a44c800a..ed97b3c0a66b 100644 --- a/drivers/clk/at91/clk-peripheral.c +++ b/drivers/clk/at91/clk-peripheral.c @@ -97,7 +97,7 @@ 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, + const char *parent_name, struct clk_parent_data *parent_data, u32 id) { struct clk_peripheral *periph; @@ -105,7 +105,7 @@ at91_clk_register_peripheral(struct regmap *regmap, const char *name, struct clk_hw *hw; int ret; - if (!name || !(parent_name || parent_hw) || id > PERIPHERAL_ID_MAX) + if (!name || !(parent_name || parent_data) || id > PERIPHERAL_ID_MAX) return ERR_PTR(-EINVAL); periph = kzalloc(sizeof(*periph), GFP_KERNEL); @@ -114,8 +114,8 @@ 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; + if (parent_data) + init.parent_data = (const struct clk_parent_data *)parent_data; else init.parent_names = &parent_name; init.num_parents = 1; @@ -448,7 +448,7 @@ 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, + struct clk_parent_data *parent_data, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags) { @@ -457,7 +457,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_name || parent_data)) return ERR_PTR(-EINVAL); periph = kzalloc(sizeof(*periph), GFP_KERNEL); @@ -465,8 +465,8 @@ 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; + if (parent_data) + init.parent_data = (const struct clk_parent_data *)parent_data; else init.parent_names = &parent_name; init.num_parents = 1; diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index b43f6652417f..b6f2aca1e1fd 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -226,13 +226,13 @@ 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, + const char *parent_name, struct clk_parent_data *parent_data, 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, + struct clk_parent_data *parent_data, u32 id, const struct clk_range *range, int chg_pid, unsigned long flags); diff --git a/drivers/clk/at91/sam9x7.c b/drivers/clk/at91/sam9x7.c index edd5fd3a1fa5..d7dc5f381ebe 100644 --- a/drivers/clk/at91/sam9x7.c +++ b/drivers/clk/at91/sam9x7.c @@ -922,7 +922,7 @@ static void __init sam9x7_pmc_setup(struct device_node *np) hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, &sam9x7_pcr_layout, sam9x7_periphck[i].n, - NULL, sam9x7_pmc->chws[PMC_MCK], + NULL, &AT91_CLK_PD_HW(sam9x7_pmc->chws[PMC_MCK]), sam9x7_periphck[i].id, &range, INT_MIN, sam9x7_periphck[i].f); diff --git a/drivers/clk/at91/sama7d65.c b/drivers/clk/at91/sama7d65.c index 17725c175d3b..372e530f4107 100644 --- a/drivers/clk/at91/sama7d65.c +++ b/drivers/clk/at91/sama7d65.c @@ -1306,7 +1306,7 @@ static void __init sama7d65_pmc_setup(struct device_node *np) &sama7d65_pcr_layout, sama7d65_periphck[i].n, NULL, - sama7d65_mckx[sama7d65_periphck[i].p].hw, + &AT91_CLK_PD_HW(sama7d65_mckx[sama7d65_periphck[i].p].hw), sama7d65_periphck[i].id, &sama7d65_periphck[i].r, sama7d65_periphck[i].chgp ? 0 : diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index 733e4fc6a515..f28fe419ae5e 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1181,7 +1181,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np) &sama7g5_pcr_layout, sama7g5_periphck[i].n, NULL, - sama7g5_mckx[sama7g5_periphck[i].p].hw, + &AT91_CLK_PD_HW(sama7g5_mckx[sama7g5_periphck[i].p].hw), sama7g5_periphck[i].id, &sama7g5_periphck[i].r, sama7g5_periphck[i].chgp ? 0 : -- 2.43.0