From patchwork Thu Jul 27 05:31:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu X-Patchwork-Id: 13328811 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 05C22C001E0 for ; Thu, 27 Jul 2023 05:38:25 +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=RV6PhZvfphEdTY+KfIe6ai4qsd/GPm6vHa0yGDh7BPI=; b=jYyJCLKsPGiWEg YIsbd7UedOiSPMBXybSuhP1GZka09hDEilV/aB3AApM2suyuPGGjyi5jC8XRn69wJ+/Ai0JOuRuma hion2nG/xHRe2kuRN4BzoSJEhgVy06udly8yNlrHensc1KnuEAE6/A/QSADOmylDiyNm9Y1QUf3jX sUolgcHyhAvmveruJiVb16w/BQEVBcjUnQ53dQShO45Cha5rdHZlMEj7nRpHcpqBaLa6/5jChBetQ upmtjfoVKzj3KWZG5xJBILRBPoSrtqr2f+lC/+uML+g6a5JJigf7ebvWXK3MacHSNt2CAISox+cYt cC/K5yzufT4k81t6OOQg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qOthD-00CDoe-0A; Thu, 27 Jul 2023 05:37:55 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qOtgm-00CDgT-03 for linux-arm-kernel@lists.infradead.org; Thu, 27 Jul 2023 05:37:39 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bb775625e2so3339825ad.1 for ; Wed, 26 Jul 2023 22:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tuxon.dev; s=google; t=1690436247; x=1691041047; 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=R0MCABlKnn4W9o3M4XSOlKm6XX3ypG2eLBBMZazV5aU=; b=nSsgtq6GND/KRpXTCP6YcWA+uA/ZLZDk70vsMiY9jZtEYLHnW8HOnsHyzGgp9BWYrN yG1oLeeKD38YXZfm+r/9OtAajFL8T64g1OdK2SMlGqNymUDHHrmS3dzJdawJpxAE6HD9 m87dfNdpWlHAa1Lqkl2XtjyslgOQpOdMMfhJwhLyldvDqaaHeAipDf/UW8mImDFT2MoG QG86Usv2Dlu4HA+jYw9znLlCCRyH3R0k2AQq9r0bYH+laHUbvmEeq5jHuTAIY/XRZkEX Nni5Qo5N9kay+wvtJlQuHVDNH1bSUA3aFm7vK/cVRuXz+BtpjaISH/Q3AVwmlnMG5yo3 cdcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690436247; x=1691041047; 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=R0MCABlKnn4W9o3M4XSOlKm6XX3ypG2eLBBMZazV5aU=; b=eSoleWhFxegZ1DHT2v2wH/q8W84K0/X/q8vLSsGGZUDR5epLJ59EiE2chhhYRlNYc5 7ktuRac5dNb2hAC/JrWo4wLRpFiXs6mJfdMG1P1OQpMvlcgiZqwAqqsItIFVqvLeOH9e nrAzRu7mVMNlKPPSm9pglA73sedf9nD161VPiD2nABFR/XB4NpvuIdgHLmQ/dO9Ul2lG fgkeD+2pmpXzm/tGlKRIObreTVSqeGR/RsKfSvRMgw4klgDes1WP9wdznZlrOfTSlSAk L0S2xdZtWvIOAI2c88TtH5AEI23hj+fQENqoCbQpN6sgM/Y9IW810rJ1aQVXCE+NWsMD T1sg== X-Gm-Message-State: ABy/qLZkxOevb8l+iTqIpF5f2l/QaXKNTAOY01J2wFUKAnrPQsoFGpbf Zifl9U7qoh9JFfCk2iNAHyQqQQ== X-Google-Smtp-Source: APBJJlHlq1g/jxGnxtE5kc0Zu6/vUpuzTqsqYM1q0IAdRpnngQGqQf7SqFxL1bbqjNqkdtAbei9jUg== X-Received: by 2002:a17:902:d50b:b0:1bb:c896:1da3 with SMTP id b11-20020a170902d50b00b001bbc8961da3mr2356971plg.24.1690436247121; Wed, 26 Jul 2023 22:37:27 -0700 (PDT) Received: from localhost.localdomain ([82.78.167.79]) by smtp.gmail.com with ESMTPSA id 21-20020a170902c11500b001bb889530adsm319059pli.217.2023.07.26.22.37.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 22:37:26 -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 41/42] clk: at91: clk-usb: remove parent_names support Date: Thu, 27 Jul 2023 08:31:55 +0300 Message-Id: <20230727053156.13587-42-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_223728_081954_7988B952 X-CRM114-Status: GOOD ( 16.02 ) 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-usb 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/at91sam9x5.c | 2 +- drivers/clk/at91/clk-usb.c | 35 ++++++++++++---------------------- drivers/clk/at91/dt-compat.c | 6 +++--- drivers/clk/at91/pmc.h | 8 ++++---- drivers/clk/at91/sam9x60.c | 2 +- drivers/clk/at91/sama5d2.c | 2 +- drivers/clk/at91/sama5d3.c | 2 +- drivers/clk/at91/sama5d4.c | 2 +- 12 files changed, 28 insertions(+), 39 deletions(-) diff --git a/drivers/clk/at91/at91rm9200.c b/drivers/clk/at91/at91rm9200.c index 4b8a9c27cc9e..05060b72acab 100644 --- a/drivers/clk/at91/at91rm9200.c +++ b/drivers/clk/at91/at91rm9200.c @@ -163,7 +163,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np) at91rm9200_pmc->chws[PMC_MCK] = hw; - usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", NULL, + usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", at91rm9200_pmc->chws[PMC_PLLBCK], usb_div); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9260.c b/drivers/clk/at91/at91sam9260.c index 71002ada33dd..2b0ffcee9e40 100644 --- a/drivers/clk/at91/at91sam9260.c +++ b/drivers/clk/at91/at91sam9260.c @@ -436,7 +436,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np, at91sam9260_pmc->chws[PMC_MCK] = hw; - usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", NULL, + usbck_hw = at91rm9200_clk_register_usb(regmap, "usbck", at91sam9260_pmc->chws[PMC_PLLBCK], usb_div); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9g45.c b/drivers/clk/at91/at91sam9g45.c index bf5951097fca..1e5262b678f5 100644 --- a/drivers/clk/at91/at91sam9g45.c +++ b/drivers/clk/at91/at91sam9g45.c @@ -182,7 +182,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np) parent_hws[0] = at91sam9g45_pmc->chws[PMC_PLLACK]; parent_hws[1] = at91sam9g45_pmc->chws[PMC_UTMI]; - usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2); + usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9n12.c b/drivers/clk/at91/at91sam9n12.c index fa7daab2793b..9b4e28b9f21b 100644 --- a/drivers/clk/at91/at91sam9n12.c +++ b/drivers/clk/at91/at91sam9n12.c @@ -207,7 +207,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np) at91sam9n12_pmc->chws[PMC_MCK] = hw; - usbck_hw = at91sam9n12_clk_register_usb(regmap, "usbck", NULL, + usbck_hw = at91sam9n12_clk_register_usb(regmap, "usbck", at91sam9n12_pmc->chws[PMC_PLLBCK]); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/at91sam9x5.c b/drivers/clk/at91/at91sam9x5.c index 994010f1cf03..1968dd69fbf7 100644 --- a/drivers/clk/at91/at91sam9x5.c +++ b/drivers/clk/at91/at91sam9x5.c @@ -228,7 +228,7 @@ static void __init at91sam9x5_pmc_setup(struct device_node *np, parent_hws[0] = at91sam9x5_pmc->chws[PMC_PLLACK]; parent_hws[1] = at91sam9x5_pmc->chws[PMC_UTMI]; - usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2); + usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/clk-usb.c b/drivers/clk/at91/clk-usb.c index 21f50914c63e..37ea588cb534 100644 --- a/drivers/clk/at91/clk-usb.c +++ b/drivers/clk/at91/clk-usb.c @@ -221,7 +221,7 @@ static const struct clk_ops at91sam9n12_usb_ops = { static struct clk_hw * __init _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents, u32 usbs_mask) { struct at91sam9x5_clk_usb *usb; @@ -235,10 +235,7 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, init.name = name; init.ops = &at91sam9x5_usb_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 | CLK_SET_RATE_PARENT; @@ -260,26 +257,25 @@ _at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, struct clk_hw * __init at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents) { - return _at91sam9x5_clk_register_usb(regmap, name, parent_names, - parent_hws, num_parents, SAM9X5_USBS_MASK); + return _at91sam9x5_clk_register_usb(regmap, name, parent_hws, + num_parents, SAM9X5_USBS_MASK); } struct clk_hw * __init sam9x60_clk_register_usb(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents) { - return _at91sam9x5_clk_register_usb(regmap, name, parent_names, - parent_hws, num_parents, - SAM9X60_USBS_MASK); + return _at91sam9x5_clk_register_usb(regmap, name, parent_hws, + num_parents, SAM9X60_USBS_MASK); } struct clk_hw * __init at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw) + struct clk_hw *parent_hw) { struct at91sam9x5_clk_usb *usb; struct clk_hw *hw; @@ -292,10 +288,7 @@ at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name, init.name = name; init.ops = &at91sam9n12_usb_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 = CLK_SET_RATE_GATE | CLK_SET_RATE_PARENT; @@ -399,8 +392,7 @@ static const struct clk_ops at91rm9200_usb_ops = { struct clk_hw * __init at91rm9200_clk_register_usb(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, - const u32 *divisors) + struct clk_hw *parent_hw, const u32 *divisors) { struct at91rm9200_clk_usb *usb; struct clk_hw *hw; @@ -413,10 +405,7 @@ at91rm9200_clk_register_usb(struct regmap *regmap, const char *name, init.name = name; init.ops = &at91rm9200_usb_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 = CLK_SET_RATE_PARENT; diff --git a/drivers/clk/at91/dt-compat.c b/drivers/clk/at91/dt-compat.c index dc8eb6036643..285ede5d6702 100644 --- a/drivers/clk/at91/dt-compat.c +++ b/drivers/clk/at91/dt-compat.c @@ -1065,7 +1065,7 @@ static void __init of_at91sam9x5_clk_usb_setup(struct device_node *np) if (IS_ERR(regmap)) return; - hw = at91sam9x5_clk_register_usb(regmap, name, NULL, parent_hws, + hw = at91sam9x5_clk_register_usb(regmap, name, parent_hws, num_parents); if (IS_ERR(hw)) return; @@ -1099,7 +1099,7 @@ static void __init of_at91sam9n12_clk_usb_setup(struct device_node *np) if (IS_ERR(regmap)) return; - hw = at91sam9n12_clk_register_usb(regmap, name, NULL, parent_hw); + hw = at91sam9n12_clk_register_usb(regmap, name, parent_hw); if (IS_ERR(hw)) return; @@ -1136,7 +1136,7 @@ static void __init of_at91rm9200_clk_usb_setup(struct device_node *np) of_node_put(parent_np); if (IS_ERR(regmap)) return; - hw = at91rm9200_clk_register_usb(regmap, name, NULL, parent_hw, divisors); + hw = at91rm9200_clk_register_usb(regmap, name, parent_hw, divisors); if (IS_ERR(hw)) return; diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h index bdb2dfb8fa86..5e65f5b59536 100644 --- a/drivers/clk/at91/pmc.h +++ b/drivers/clk/at91/pmc.h @@ -247,18 +247,18 @@ at91_clk_register_system(struct regmap *regmap, const char *name, struct clk_hw * __init at91sam9x5_clk_register_usb(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents); struct clk_hw * __init at91sam9n12_clk_register_usb(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw); + struct clk_hw *parent_hw); struct clk_hw * __init sam9x60_clk_register_usb(struct regmap *regmap, const char *name, - const char **parent_names, struct clk_hw **parent_hws, + struct clk_hw **parent_hws, u8 num_parents); struct clk_hw * __init at91rm9200_clk_register_usb(struct regmap *regmap, const char *name, - const char *parent_name, struct clk_hw *parent_hw, + struct clk_hw *parent_hw, const u32 *divisors); struct clk_hw * __init diff --git a/drivers/clk/at91/sam9x60.c b/drivers/clk/at91/sam9x60.c index f344cbbc9c25..b3dfdcbc950f 100644 --- a/drivers/clk/at91/sam9x60.c +++ b/drivers/clk/at91/sam9x60.c @@ -302,7 +302,7 @@ static void __init sam9x60_pmc_setup(struct device_node *np) parent_hws[0] = sam9x60_pmc->chws[PMC_PLLACK]; parent_hws[1] = sam9x60_pmc->chws[PMC_UTMI]; parent_hws[2] = main_osc_hw; - usbck_hw = sam9x60_clk_register_usb(regmap, "usbck", NULL, parent_hws, 3); + usbck_hw = sam9x60_clk_register_usb(regmap, "usbck", parent_hws, 3); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/sama5d2.c b/drivers/clk/at91/sama5d2.c index 0fce17af769e..fa14c6f7d37a 100644 --- a/drivers/clk/at91/sama5d2.c +++ b/drivers/clk/at91/sama5d2.c @@ -288,7 +288,7 @@ static void __init sama5d2_pmc_setup(struct device_node *np) parent_hws[0] = sama5d2_pmc->chws[PMC_PLLACK]; parent_hws[1] = sama5d2_pmc->chws[PMC_UTMI]; - usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2); + usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c index c00380ed0000..0713a6b21c8a 100644 --- a/drivers/clk/at91/sama5d3.c +++ b/drivers/clk/at91/sama5d3.c @@ -207,7 +207,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np) parent_hws[0] = sama5d3_pmc->chws[PMC_PLLACK]; parent_hws[1] = sama5d3_pmc->chws[PMC_UTMI]; - usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2); + usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2); if (IS_ERR(usbck_hw)) goto err_free; diff --git a/drivers/clk/at91/sama5d4.c b/drivers/clk/at91/sama5d4.c index 0d2a834a5903..d0bd025876ac 100644 --- a/drivers/clk/at91/sama5d4.c +++ b/drivers/clk/at91/sama5d4.c @@ -228,7 +228,7 @@ static void __init sama5d4_pmc_setup(struct device_node *np) parent_hws[0] = sama5d4_pmc->chws[PMC_PLLACK]; parent_hws[1] = sama5d4_pmc->chws[PMC_UTMI]; - usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", NULL, parent_hws, 2); + usbck_hw = at91sam9x5_clk_register_usb(regmap, "usbck", parent_hws, 2); if (IS_ERR(usbck_hw)) goto err_free;