From patchwork Wed Jul 6 22:13:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 12908724 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94CA6C43334 for ; Wed, 6 Jul 2022 22:14:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230502AbiGFWOc (ORCPT ); Wed, 6 Jul 2022 18:14:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230481AbiGFWOc (ORCPT ); Wed, 6 Jul 2022 18:14:32 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B1D12AC61; Wed, 6 Jul 2022 15:14:31 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id v12so8326786edc.10; Wed, 06 Jul 2022 15:14:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JSxzmKxjlNqM9TSDpV5dH/r3annlSczSnTdVT/KLPhw=; b=bWUMnq4tpjt1TRHLVqok/mjo9jrbkzKfxraZRxWS9emH9/66Hfk5TZINBc4Ds5ou7J XvsYCfkf3Y7csLtj2rRdTkr+VLnbdJIgw/NUO2BNm0CUiBNPcIMdkFhLWQ63w+n2ZwlN oEjuMs52x2IYdwHioO4iRzDuoWsmkaia7U6SW2sHAkLYXv1EGQpOhKbUBISDJ7u62BVS 57sKF46q1caHsGUsqFoRzvp0/InzfIzcEp1ZuYrJrcdcO63l1V27d3wtC7f2KbqeW5uE b2tzksTVly8OrtC/BkAbjOzJzpnNKlk1M7FmXLEXoK30TBQliXQ6TtZHgV4UF8pTHgWh m4fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JSxzmKxjlNqM9TSDpV5dH/r3annlSczSnTdVT/KLPhw=; b=L276BO4QgXFhwWU9+LC3Yp/ApH882C2DOPUFO79b4IELJ2t/OmeSUsBd4JnCM8iafs QSsGDoZ+i99400e8tj81lMIO+tutyvBPjpztn06DwkH+eaI7+lJs0Csy94BfR6LKNz+I LU+P6VQEvmttVm9g/h3OYM6gxMIqz4rddzJg+2IgLDICEo96iZcZ72F0iJuRDJJbHwNx gxaAutD7UZMsCpx4wRuLAikJKqb9DT60cESyellxH0RUUPhJlk1A+sn9wS5erlZ7FL0n Bfk5DiAXFd65xQ3U7eBjjWPxp+zvAsdZZEW8ODLUXLdWS6QBgCS86TV6EAl7Ms01rwpw t/Hw== X-Gm-Message-State: AJIora/thA/lZUFfTYDCgGKyqEWw2U13rtTFE2ZR2fVdLUUjLC3zxbWf pCshncYhAmwTrBnWElbqZ9xDzpQmlZ4= X-Google-Smtp-Source: AGRyM1sIHMQf4YpUUtNHuu7zGZhMY5ZNbvBnFdKhyN+fUTMN9K/LJWrfSdpo8Oh8gJYIK7xMi4NafA== X-Received: by 2002:a05:6402:795:b0:43a:6cc5:8886 with SMTP id d21-20020a056402079500b0043a6cc58886mr22184646edy.174.1657145669408; Wed, 06 Jul 2022 15:14:29 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id h18-20020aa7c952000000b0043a6fde6e7bsm6509469edt.19.2022.07.06.15.14.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 15:14:28 -0700 (PDT) From: Christian Marangi To: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Christian Marangi , Dmitry Baryshkov , Rob Herring Subject: [PATCH v3 1/3] dt-bindings: clock: add pcm reset for ipq806x lcc Date: Thu, 7 Jul 2022 00:13:25 +0200 Message-Id: <20220706221327.14169-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Add pcm reset define for ipq806x lcc. Signed-off-by: Christian Marangi Reviewed-by: Dmitry Baryshkov Acked-by: Rob Herring --- v3: - Added review tag - Added ack tag v2: - Fix Sob tag include/dt-bindings/clock/qcom,lcc-ipq806x.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/dt-bindings/clock/qcom,lcc-ipq806x.h b/include/dt-bindings/clock/qcom,lcc-ipq806x.h index 25b92bbf0ab4..e0fb4acf4ba8 100644 --- a/include/dt-bindings/clock/qcom,lcc-ipq806x.h +++ b/include/dt-bindings/clock/qcom,lcc-ipq806x.h @@ -19,4 +19,6 @@ #define SPDIF_CLK 10 #define AHBIX_CLK 11 +#define LCC_PCM_RESET 0 + #endif From patchwork Wed Jul 6 22:13:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 12908725 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79ED6CCA47C for ; Wed, 6 Jul 2022 22:14:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233817AbiGFWOd (ORCPT ); Wed, 6 Jul 2022 18:14:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231529AbiGFWOd (ORCPT ); Wed, 6 Jul 2022 18:14:33 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BAA22AC61; Wed, 6 Jul 2022 15:14:32 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id ay16so29396645ejb.6; Wed, 06 Jul 2022 15:14:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TYMK3ln+pSNgbS7KOrXcaQql59e3lfO5o9Vh/Disa6M=; b=dkK2PS7nhz4EujhfD9DEEsNzKaIRjlO2x3xVl4LpoxH/NxfOj5O1FlFUab9wbVVPuN RtCsejv88cUcmBQW5VGGM1jP3Zs4cKLFQLub5wPwft8npAM6lLiC/NZs/PI+avgrlnKU 4k0M8elby461geQv6iH0QONQ86waMZ+gCcvIOOyYSQwFXvaP1B1QG69xvuQl5ZAABFCm gnoSwzgXaryr9e8J4IPV/dRPwdOMovJxy+pniEoYi7X94eG1mAzR7ZgDiaPla+6B+Voe Q2fXr8ArtmNB7vWIKsiMQFsmyW0aDtgc0sXLjeN44ohw/q/zRkAck0Xpl+NRE2KaV9AT yH+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TYMK3ln+pSNgbS7KOrXcaQql59e3lfO5o9Vh/Disa6M=; b=PusxpXMqE3LnOWElLqqdQ3oB3Wahd66enVomA9mGcyXNrWZKdL8olvm+J6aFEEPYav 2cbqU3grSw4J4iErE2b3oLSOib9duz1e63E08CsV0xNQ01gVwPGTNdVVmaooeULRdADI WRD1b/kZiFoXQ/O2P0EmTIEKatpdxLAoiDc0rivy2fsTTiPZS8IkJJ+9cKQG2ZTaRg2t Y/y0h8/LBMtu4ZyEzeRgZVYLNzoeKOIA0Yn/A6zjXA6HlRR9cWqfW9AonpX6rg4w99XW kIfeWmLNwk4tgS3X0bH4rGfdcJZ02NCa4tVE+Ej037wF/n87+SC4euSzpx4WDUurtJkZ /eAw== X-Gm-Message-State: AJIora96NOT0z8kvr+6g6s7g6c1vH5hd3RzXG3AGT0FtUjgV/WESlGst r16wbQcnGvzzqdcdUJx8n+A= X-Google-Smtp-Source: AGRyM1v2JamViWRyTXzG8NmqwF8WYnnH0qBvOl33Ie7zrjpg9RqbfRsxXKjQjILqY+1eXmgrVgTjFw== X-Received: by 2002:a17:907:8a14:b0:72a:facd:c058 with SMTP id sc20-20020a1709078a1400b0072afacdc058mr5095096ejc.666.1657145670954; Wed, 06 Jul 2022 15:14:30 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id h18-20020aa7c952000000b0043a6fde6e7bsm6509469edt.19.2022.07.06.15.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 15:14:30 -0700 (PDT) From: Christian Marangi To: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Christian Marangi , Dmitry Baryshkov Subject: [PATCH v3 2/3] clk: qcom: lcc-ipq806x: add reset definition Date: Thu, 7 Jul 2022 00:13:26 +0200 Message-Id: <20220706221327.14169-2-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220706221327.14169-1-ansuelsmth@gmail.com> References: <20220706221327.14169-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Add reset definition for lcc-ipq806x. Signed-off-by: Christian Marangi Reviewed-by: Dmitry Baryshkov --- v3: - Added review tag v2: - Fix Sob tag drivers/clk/qcom/lcc-ipq806x.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c index 1a2be4aeb31d..ba90bebba597 100644 --- a/drivers/clk/qcom/lcc-ipq806x.c +++ b/drivers/clk/qcom/lcc-ipq806x.c @@ -22,6 +22,7 @@ #include "clk-branch.h" #include "clk-regmap-divider.h" #include "clk-regmap-mux.h" +#include "reset.h" static struct clk_pll pll4 = { .l_reg = 0x4, @@ -405,6 +406,10 @@ static struct clk_regmap *lcc_ipq806x_clks[] = { [AHBIX_CLK] = &ahbix_clk.clkr, }; +static const struct qcom_reset_map lcc_ipq806x_resets[] = { + [LCC_PCM_RESET] = { 0x54, 13 }, +}; + static const struct regmap_config lcc_ipq806x_regmap_config = { .reg_bits = 32, .reg_stride = 4, @@ -417,6 +422,8 @@ static const struct qcom_cc_desc lcc_ipq806x_desc = { .config = &lcc_ipq806x_regmap_config, .clks = lcc_ipq806x_clks, .num_clks = ARRAY_SIZE(lcc_ipq806x_clks), + .resets = lcc_ipq806x_resets, + .num_resets = ARRAY_SIZE(lcc_ipq806x_resets), }; static const struct of_device_id lcc_ipq806x_match_table[] = { From patchwork Wed Jul 6 22:13:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Marangi X-Patchwork-Id: 12908726 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DA25C43334 for ; Wed, 6 Jul 2022 22:14:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234300AbiGFWOm (ORCPT ); Wed, 6 Jul 2022 18:14:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53606 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234059AbiGFWOf (ORCPT ); Wed, 6 Jul 2022 18:14:35 -0400 Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3E7B2AC61; Wed, 6 Jul 2022 15:14:33 -0700 (PDT) Received: by mail-ed1-x531.google.com with SMTP id y8so15198353eda.3; Wed, 06 Jul 2022 15:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1Ia2wIH1no59KtJ2reGsq0DQC1cw6bhWoil8Vrx3dno=; b=bMmS736J08Rp4iZr7BTlobNhnnhL1yPZz4ZFiHYtJY43PQrGUvUpSfBdji0Dvi60zg D07CJDm6NoBJuHyzYrhJFeaGxiKju6IWJUDUkJw++W1bTkKGY1iqNjBj5SFN8wpXBD8u NwCLaCMhgYYUg3Lj7C1Egn4MZCwsaPtDUC0L7D9SqR3Bvuukc07MZTVZGjSL5P8GYegk xQ8pARDhDyN7FLfhAOXU1EfQbunKeFwdGJgPuAyUIMwtaYk2bdJm7BIHCWBeN4Ol3ACS AbyLA6iSuK6FEh4KSLcMrYOTBAhp29lkvlcASs7hXOy4EBxXeVbsAZETEU0ncGMIdUHL LjpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1Ia2wIH1no59KtJ2reGsq0DQC1cw6bhWoil8Vrx3dno=; b=fBYjpT4Va5XKpaU+Mr4Nk1wbhwPANZAmDmqIAo8Jb5R/OosCO5j3G8s16fv9U9tirE mC9s5PcHFtiGC1KKKixQnZDRYFMwLlnz7cuIDMikGSGLS4Zukt+X+vXYqtgEFgQ3KdEJ KL4xxMBrGHKFlaT/lEsUdiDkbOre8O5lwukKrvOpKEsYyJhLKjq6z26nii9mkXTXmC9/ TBmWnu7H6mRZTjz0PApc8eOwgrEJYTGsAt52Ymli4pGzkxYQ7HBfPDCyxx3AqrVWM5+O w/HCoJJw/ACsiY2fbGEP8EWJxRBqCwyBPbWjKGvbyzTcfaBe+2JTXeu95HA5i0Ejm4+l 3eCg== X-Gm-Message-State: AJIora+nkMlfamYxaY7GnU0JyeM1dMXCFN+rCPznRSLw4fvHqTdyYUfT qOc6B+i/wlUnpcmdUzY+Ezs= X-Google-Smtp-Source: AGRyM1tZrTLYZ/EmPXwyt1uAfsnFX/8nX9BGIrJN20jZJsf+x8uPv6sX52ZVxdy15BKOJvBRNf5OgA== X-Received: by 2002:a05:6402:43c4:b0:43a:6309:6c9b with SMTP id p4-20020a05640243c400b0043a63096c9bmr23530879edc.91.1657145672358; Wed, 06 Jul 2022 15:14:32 -0700 (PDT) Received: from localhost.localdomain (93-42-70-190.ip85.fastwebnet.it. [93.42.70.190]) by smtp.googlemail.com with ESMTPSA id h18-20020aa7c952000000b0043a6fde6e7bsm6509469edt.19.2022.07.06.15.14.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Jul 2022 15:14:31 -0700 (PDT) From: Christian Marangi To: Bjorn Andersson , Andy Gross , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Christian Marangi Subject: [PATCH v3 3/3] clk: qcom: lcc-ipq806x: convert to parent data Date: Thu, 7 Jul 2022 00:13:27 +0200 Message-Id: <20220706221327.14169-3-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220706221327.14169-1-ansuelsmth@gmail.com> References: <20220706221327.14169-1-ansuelsmth@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Convert lcc-ipq806x driver to parent_data API. Signed-off-by: Christian Marangi Reported-by: kernel test robot --- v3: - Inline pxo pll4 parent - Change .name from pxo to pxo_board drivers/clk/qcom/lcc-ipq806x.c | 77 ++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/drivers/clk/qcom/lcc-ipq806x.c b/drivers/clk/qcom/lcc-ipq806x.c index ba90bebba597..66aaf0d0ef79 100644 --- a/drivers/clk/qcom/lcc-ipq806x.c +++ b/drivers/clk/qcom/lcc-ipq806x.c @@ -34,7 +34,9 @@ static struct clk_pll pll4 = { .status_bit = 16, .clkr.hw.init = &(struct clk_init_data){ .name = "pll4", - .parent_names = (const char *[]){ "pxo" }, + .parent_data = (const struct clk_parent_data*[]){ + { .fw_name = "pxo", .name = "pxo_board" }, + } .num_parents = 1, .ops = &clk_pll_ops, }, @@ -64,9 +66,9 @@ static const struct parent_map lcc_pxo_pll4_map[] = { { P_PLL4, 2 } }; -static const char * const lcc_pxo_pll4[] = { - "pxo", - "pll4_vote", +static const struct clk_parent_data lcc_pxo_pll4[] = { + { .fw_name = "pxo", .name = "pxo" }, + { .fw_name = "pll4_vote", .name = "pll4_vote" }, }; static struct freq_tbl clk_tbl_aif_mi2s[] = { @@ -131,18 +133,14 @@ static struct clk_rcg mi2s_osr_src = { .enable_mask = BIT(9), .hw.init = &(struct clk_init_data){ .name = "mi2s_osr_src", - .parent_names = lcc_pxo_pll4, - .num_parents = 2, + .parent_data = lcc_pxo_pll4, + .num_parents = ARRAY_SIZE(lcc_pxo_pll4), .ops = &clk_rcg_ops, .flags = CLK_SET_RATE_GATE, }, }, }; -static const char * const lcc_mi2s_parents[] = { - "mi2s_osr_src", -}; - static struct clk_branch mi2s_osr_clk = { .halt_reg = 0x50, .halt_bit = 1, @@ -152,7 +150,9 @@ static struct clk_branch mi2s_osr_clk = { .enable_mask = BIT(17), .hw.init = &(struct clk_init_data){ .name = "mi2s_osr_clk", - .parent_names = lcc_mi2s_parents, + .parent_hws = (const struct clk_hw*[]){ + &mi2s_osr_src.clkr.hw, + }, .num_parents = 1, .ops = &clk_branch_ops, .flags = CLK_SET_RATE_PARENT, @@ -167,7 +167,9 @@ static struct clk_regmap_div mi2s_div_clk = { .clkr = { .hw.init = &(struct clk_init_data){ .name = "mi2s_div_clk", - .parent_names = lcc_mi2s_parents, + .parent_hws = (const struct clk_hw*[]){ + &mi2s_osr_src.clkr.hw, + }, .num_parents = 1, .ops = &clk_regmap_div_ops, }, @@ -183,7 +185,9 @@ static struct clk_branch mi2s_bit_div_clk = { .enable_mask = BIT(15), .hw.init = &(struct clk_init_data){ .name = "mi2s_bit_div_clk", - .parent_names = (const char *[]){ "mi2s_div_clk" }, + .parent_hws = (const struct clk_hw*[]){ + &mi2s_div_clk.clkr.hw, + }, .num_parents = 1, .ops = &clk_branch_ops, .flags = CLK_SET_RATE_PARENT, @@ -191,6 +195,10 @@ static struct clk_branch mi2s_bit_div_clk = { }, }; +static const struct clk_parent_data lcc_mi2s_bit_div_codec_clk[] = { + { .hw = &mi2s_bit_div_clk.clkr.hw, }, + { .fw_name = "mi2s_codec_clk", .name = "mi2s_codec_clk" }, +}; static struct clk_regmap_mux mi2s_bit_clk = { .reg = 0x48, @@ -199,11 +207,8 @@ static struct clk_regmap_mux mi2s_bit_clk = { .clkr = { .hw.init = &(struct clk_init_data){ .name = "mi2s_bit_clk", - .parent_names = (const char *[]){ - "mi2s_bit_div_clk", - "mi2s_codec_clk", - }, - .num_parents = 2, + .parent_data = lcc_mi2s_bit_div_codec_clk, + .num_parents = ARRAY_SIZE(lcc_mi2s_bit_div_codec_clk), .ops = &clk_regmap_mux_closest_ops, .flags = CLK_SET_RATE_PARENT, }, @@ -245,8 +250,8 @@ static struct clk_rcg pcm_src = { .enable_mask = BIT(9), .hw.init = &(struct clk_init_data){ .name = "pcm_src", - .parent_names = lcc_pxo_pll4, - .num_parents = 2, + .parent_data = lcc_pxo_pll4, + .num_parents = ARRAY_SIZE(lcc_pxo_pll4), .ops = &clk_rcg_ops, .flags = CLK_SET_RATE_GATE, }, @@ -262,7 +267,9 @@ static struct clk_branch pcm_clk_out = { .enable_mask = BIT(11), .hw.init = &(struct clk_init_data){ .name = "pcm_clk_out", - .parent_names = (const char *[]){ "pcm_src" }, + .parent_hws = (const struct clk_hw*[]){ + &pcm_src.clkr.hw, + }, .num_parents = 1, .ops = &clk_branch_ops, .flags = CLK_SET_RATE_PARENT, @@ -270,6 +277,11 @@ static struct clk_branch pcm_clk_out = { }, }; +static const struct clk_parent_data lcc_pcm_clk_out_codec_clk[] = { + { .hw = &pcm_clk_out.clkr.hw, }, + { .fw_name = "pcm_codec_clk", .name = "pcm_codec_clk" }, +}; + static struct clk_regmap_mux pcm_clk = { .reg = 0x54, .shift = 10, @@ -277,11 +289,8 @@ static struct clk_regmap_mux pcm_clk = { .clkr = { .hw.init = &(struct clk_init_data){ .name = "pcm_clk", - .parent_names = (const char *[]){ - "pcm_clk_out", - "pcm_codec_clk", - }, - .num_parents = 2, + .parent_data = lcc_pcm_clk_out_codec_clk, + .num_parents = ARRAY_SIZE(lcc_pcm_clk_out_codec_clk), .ops = &clk_regmap_mux_closest_ops, .flags = CLK_SET_RATE_PARENT, }, @@ -325,18 +334,14 @@ static struct clk_rcg spdif_src = { .enable_mask = BIT(9), .hw.init = &(struct clk_init_data){ .name = "spdif_src", - .parent_names = lcc_pxo_pll4, - .num_parents = 2, + .parent_data = lcc_pxo_pll4, + .num_parents = ARRAY_SIZE(lcc_pxo_pll4), .ops = &clk_rcg_ops, .flags = CLK_SET_RATE_GATE, }, }, }; -static const char * const lcc_spdif_parents[] = { - "spdif_src", -}; - static struct clk_branch spdif_clk = { .halt_reg = 0xd4, .halt_bit = 1, @@ -346,7 +351,9 @@ static struct clk_branch spdif_clk = { .enable_mask = BIT(12), .hw.init = &(struct clk_init_data){ .name = "spdif_clk", - .parent_names = lcc_spdif_parents, + .parent_hws = (const struct clk_hw*[]){ + &spdif_src.clkr.hw, + }, .num_parents = 1, .ops = &clk_branch_ops, .flags = CLK_SET_RATE_PARENT, @@ -384,8 +391,8 @@ static struct clk_rcg ahbix_clk = { .enable_mask = BIT(11), .hw.init = &(struct clk_init_data){ .name = "ahbix", - .parent_names = lcc_pxo_pll4, - .num_parents = 2, + .parent_data = lcc_pxo_pll4, + .num_parents = ARRAY_SIZE(lcc_pxo_pll4), .ops = &clk_rcg_lcc_ops, }, },