From patchwork Thu Jul 27 05:31:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13328805 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 6834FC001DC 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=5rCw3xeRtrRtSk3q89MmkYsaWqpa9PK8yK7D0r6WZGQ=; b=NQMy0jdDImx+kj +4pDolKIwR58GjqCK0V7pHoH5YM2N+AglzKKxPXYSuFml/GCu/5oNP3jjWXm7gQjYKdNIGQ1N8Kjo n/3z8RZW3iBkWh8l7hwn8aXW7uqgBe5gt8mnCKmVsAPAN+eiNixXm4jwkFXWHn71h7aNG5Y+6Ao28 ehu28PzlTjpeZ9xhEHak5NuhQive4NQaR9t8gKQ9Nut8vLaX92glST+e0XRc7rdbkzY7F2kABNn3/ 1svAFSJsim0Tso6VguDb92YCMWDtDzFLYVlp+J392GpMU/ZmwaJuEGFNpfJ5ZhG3mJoiWgdLdXqGh o6WccZMTI6/tp8bUWVOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOthA-00CDnK-1J; Thu, 27 Jul 2023 05:37:52 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOtgD-00CDPK-13 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 05:37:01 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-1b8ad9eede0so4511075ad.1 for ; Wed, 26 Jul 2023 22:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436210; x=1691041010; 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=+Q+Yl7hN1VwiQcIkQgiV66Esb2RGUFiRs91OdVgtBh0=; b=M0glJThlvwbGMQ+zCXsOdBo8zfEv8aUEkaRD1lWoFtxH8KWlcevQsd8CVfI5jCSbV5 GviLj1eQYirIuNhvCwfOZYnKqOeGaDAGmQ81PpzBhpgCl3DFaXkBEbmGf4feY8CwCXbh sPrPP2xuvoBD4ePCM3Fdsz0idTiBaWIkTMf9ffxGN7PhhFC3fIG0ZaNpq37DJACJcPvZ MPDIofZp+XOLQELb9C6kXuwvLBe4xAz0PIaOHCipxoc6tIgR0Hi0laRXYOu1IDGDx8Bu zamHJme4DZQSOzBVNzw88sbqFlCLSPMF60KtvVt6e7of+G+gm7KBRLKOf5yQUjDJlyKR TyTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436210; x=1691041010; 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=+Q+Yl7hN1VwiQcIkQgiV66Esb2RGUFiRs91OdVgtBh0=; b=ISEaw39GNWCNekebQobClL+rd5heFOtsghqU2EzWlVMZMRhl6uZz2cm4lZCKdfzQU3 WPzIopPawp4gQrzkrQvJIA0ZAd2+tz96a9UgcZdZYVsCz2fSXC7o69H4kSKtDWSl6GGy KroYDc2TTnTgNHD+H9vXbUZ36zGRBhkb3xyS4REacfFf6rbMwzEmFzMHTVQ2QUSHN0hE YtlxiRZoe0wNEMo9PumZfp1m+TZvLF7h6DKOvGEDy7OXKftHeGDYc/6A3dGCVyXmXNcH Su654YcJnrNtvI2GLERYPTbBtceNsns2Wh03mA5uAUozgFIFtnuGDH8nx1M2QYoVd6t4 kz9g== X-Gm-Message-State: ABy/qLbhxZPAzTwQBlQ4psDNX2JbL0wOlgTTOe+kVJxusLzIi/COKxTx xxdbjWs9IdyvvgVtTyx+IvYAQw== X-Google-Smtp-Source: APBJJlHVSJGhP4xROul0kKK8gz7i1cwuobZUOhpNAjMjCbAOJfpC/qq2G3ht/RzeTU5qSvAZiVg1jw== X-Received: by 2002:a17:902:ea06:b0:1b8:4e00:96b with SMTP id s6-20020a170902ea0600b001b84e00096bmr5499076plg.9.1690436210347; Wed, 26 Jul 2023 22:36:50 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 22:36:50 -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 36/42] clk: at91: clk-programmable: remove parent_names support Date: Thu, 27 Jul 2023 08:31:50 +0300 Message-Id: <20230727053156.13587-37-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_223653_402975_5F6B9D7B X-CRM114-Status: GOOD ( 14.52 ) 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-programmable 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 | 2 +- drivers/clk/at91/clk-programmable.c | 10 +++------- drivers/clk/at91/dt-compat.c | 2 +- drivers/clk/at91/pmc.h | 2 +- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- drivers/clk/at91/sama7g5.c | 2 +- 14 files changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c index be88279c3443..9305cb6eaef2 100644 --- a/drivers/clk/at91/at91rm9200.c +++ b/drivers/clk/at91/at91rm9200.c @@ -178,7 +178,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 4, i, + parent_hws, 4, i, &at91rm9200_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c index bd5e0ce432d3..c118ff23548b 100644 --- a/drivers/clk/at91/at91sam9260.c +++ b/drivers/clk/at91/at91sam9260.c @@ -451,7 +451,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np, snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 4, i, + parent_hws, 4, i, &at91rm9200_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c index 2bda11df7f0d..a5bc6f5c8173 100644 --- a/drivers/clk/at91/at91sam9g45.c +++ b/drivers/clk/at91/at91sam9g45.c @@ -197,7 +197,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91sam9g45_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c index 0c22b82ef368..b4dfe2d1de8a 100644 --- a/drivers/clk/at91/at91sam9n12.c +++ b/drivers/clk/at91/at91sam9n12.c @@ -223,7 +223,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91sam9x5_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9rl.c b/drivers/clk/at91/at91sam9rl.c index 4ae8028600d5..48d79189fc98 100644 --- a/drivers/clk/at91/at91sam9rl.c +++ b/drivers/clk/at91/at91sam9rl.c @@ -150,7 +150,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91rm9200_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c index c2c5e9fe669c..f278bee3417c 100644 --- a/drivers/clk/at91/at91sam9x5.c +++ b/drivers/clk/at91/at91sam9x5.c @@ -247,7 +247,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91sam9x5_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/clk-programmable.c b/drivers/clk/at91/clk-programmable.c index 1195fb405503..a400aac5b2e2 100644 --- a/drivers/clk/at91/clk-programmable.c +++ b/drivers/clk/at91/clk-programmable.c @@ -213,8 +213,7 @@ static const struct clk_ops programmable_ops = { }; struct clk_hw * __init -at91_clk_register_programmable(struct regmap *regmap, - const char *name, const char **parent_names, +at91_clk_register_programmable(struct regmap *regmap, const char *name, struct clk_hw **parent_hws, u8 num_parents, u8 id, const struct clk_programmable_layout *layout, u32 *mux_table) @@ -224,7 +223,7 @@ at91_clk_register_programmable(struct regmap *regmap, struct clk_init_data init = {}; int ret; - if (id > PROG_ID_MAX || !(parent_names || parent_hws)) + if (id > PROG_ID_MAX || !parent_hws) return ERR_PTR(-EINVAL); prog = kzalloc(sizeof(*prog), GFP_KERNEL); @@ -233,10 +232,7 @@ at91_clk_register_programmable(struct regmap *regmap, init.name = name; init.ops = &programmable_ops; - if (parent_hws) - init.parent_hws = (const struct clk_hw **)parent_hws; - else - init.parent_names = parent_names; + init.parent_hws = (const struct clk_hw **)parent_hws; init.num_parents = num_parents; init.flags = CLK_SET_RATE_GATE | CLK_SET_PARENT_GATE; diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c index 85193e4656b9..11fdbca8ee83 100644 --- a/drivers/clk/at91/dt-compat.c +++ b/drivers/clk/at91/dt-compat.c @@ -860,7 +860,7 @@ of_at91_clk_prog_setup(struct device_node *np, name = progclknp->name; hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, num_parents, + parent_hws, num_parents, id, layout, mux_table); if (IS_ERR(hw)) continue; diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index eed88a480b11..7d2524109776 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -226,7 +226,7 @@ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock, struct clk_hw * __init at91_clk_register_programmable(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents, u8 id, const struct clk_programmable_layout *layout, u32 *mux_table); diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c index 148873fced1b..897a8f2d6102 100644 --- a/drivers/clk/at91/sam9x60.c +++ b/drivers/clk/at91/sam9x60.c @@ -318,7 +318,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 6, i, + parent_hws, 6, i, &sam9x60_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index 75d5b1a3733b..c64b79b44ba6 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -304,7 +304,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 6, i, + parent_hws, 6, i, &sama5d2_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c index a50e82460e70..021e012fe202 100644 --- a/drivers/clk/at91/sama5d3.c +++ b/drivers/clk/at91/sama5d3.c @@ -226,7 +226,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91sam9x5_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c index b6b41ceae13c..e196ec80570f 100644 --- a/drivers/clk/at91/sama5d4.c +++ b/drivers/clk/at91/sama5d4.c @@ -249,7 +249,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); hw = at91_clk_register_programmable(regmap, name, - NULL, parent_hws, 5, i, + parent_hws, 5, i, &at91sam9x5_programmable_layout, NULL); if (IS_ERR(hw)) diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c index 9cba1ad116a8..baec84bd5d06 100644 --- a/drivers/clk/at91/sama7g5.c +++ b/drivers/clk/at91/sama7g5.c @@ -1171,7 +1171,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np) snprintf(name, sizeof(name), "prog%d", i); - hw = at91_clk_register_programmable(regmap, name, NULL, parent_hws, + hw = at91_clk_register_programmable(regmap, name, parent_hws, 9, i, &programmable_layout, sama7g5_prog_mux_table);