Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp279885rdb; Fri, 6 Oct 2023 03:24:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVpWYlMDhweNM9LJ5CtL0WS3Ohx3G3OUbjH9WGhU5Dd/RC9c79KO1Ao9gvQrJSjnFMc6UM X-Received: by 2002:a05:6a21:a5a4:b0:152:4615:cb9e with SMTP id gd36-20020a056a21a5a400b001524615cb9emr7315950pzc.13.1696587844212; Fri, 06 Oct 2023 03:24:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696587844; cv=none; d=google.com; s=arc-20160816; b=B/HEZLewARAdPBr1JaYxftuZZroX4DYUWKN8Qg7dICaXlcYpa6H4jxwio+jeuSVSu5 LEsWi5lEDgSuSNP4hYin+1J2RHrLVgX+K0aqkGAaEAkpCMDzbOruyhLs9pBk+Fy14v72 Od3deHrOE1YAMam28rx1tKsgfpCDEyhyoliouLUy3PeN528nfnxuViz5o7pMlyvw/qHm d/1UdU9nQVqE+hiE03hsXwiUyQVgX+RNaSCd5FtN1x1fcTNWjSMw1ovXbGAT/usTw5F6 eQmduLotaWkRSp4wH08uA/+qmN5EmqQBkCusDdj1g6dtgIlaHevrVs4lm6NLLBoBICIu bVEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vRqCdQqaeBI4IgeDvF3zPLSPC9/2kM4SdpV0YOB3zoc=; fh=vVxPGyZPnJvItjU1Ip1JGyutyojr1Brs23DbTQoFDtY=; b=sHHiW4gXCtN5DOEJ8hAhsxUltYJTFrm9/NbhiNtUsL/897TurF4CO07qPz1ZhNWR7a zGd/z4qbSS+nMKsnRT+DG2Ud71j9erxfNzIc8cWdfUX9mFHncmL20Mv5a94Q/OaXHLjF vuMfB+zXONbhoNchByvDnVZJ/gvc4mliVftzvpUsPPLahy6+wkkAXwlwem75/AgDf0Ld 6yMYC0/CSPzSnCY43DPDotNSnE7ppm8N7FN/8aipNVVsIQ58s5+0ypLcQP30WP99HYpQ s+FtS3QtWU5jac1o6by3lFVnG2zgFuiPHb/bP31kcJCyptxCLRRAWyPKpvfFyvNtfU3E DPBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z16-20020a631910000000b00565e9c3a308si3291769pgl.788.2023.10.06.03.24.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 03:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 7A8D180511A5; Fri, 6 Oct 2023 03:24:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231425AbjJFKXw (ORCPT + 99 others); Fri, 6 Oct 2023 06:23:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231230AbjJFKXv (ORCPT ); Fri, 6 Oct 2023 06:23:51 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 400E4AD; Fri, 6 Oct 2023 03:23:50 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 5B04680E0; Fri, 6 Oct 2023 10:23:49 +0000 (UTC) Date: Fri, 6 Oct 2023 13:23:48 +0300 From: Tony Lindgren To: =?utf-8?B?UMOpdGVy?= Ujfalusi Cc: Andreas Kemnade , bcousson@baylibre.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, jarkko.nikula@bitmer.com, dmitry.torokhov@gmail.com, linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [PATCH 1/3] ASoC: ti: omap-mcbsp: Ignore errors for getting fck_src Message-ID: <20231006102348.GK34982@atomide.com> References: <20230705190324.355282-1-andreas@kemnade.info> <20230705190324.355282-2-andreas@kemnade.info> <7d58d52d-2087-45af-b29e-2515b63ead13@gmail.com> <20230920063353.GQ5285@atomide.com> <20230921121626.GT5285@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230921121626.GT5285@atomide.com> X-Spam-Status: No, score=2.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 06 Oct 2023 03:24:01 -0700 (PDT) X-Spam-Level: ** * Tony Lindgren [230921 20:34]: > * Péter Ujfalusi [230920 17:40]: > > It is not the parent's fck, it is the PRCM clock which is selected as > > the sourcee of the clock generator (CLKS) for BCLK/FSYNC. That is the > > functional clock as well for the McBSP instance. > > Oh OK > > > Out of reset it is using the PRCM source which is fine in all current users. > > I would do this fix or workaround in a different way: instead of > > ignoring the error, avoid it in the first place. Do nothing if the > > already selected clock is requested. > > That would remove the error and will fail in case the reparenting is not > > working -> boards will know this and might be able to do something about > > it in a reasonable way. Here's what I think the regression fix for omap4 clocks would be, the old main_clk is not the same as the module clock that we get by default. If this looks OK I'll do a similar fix also for omap5. Or is something else also needed? Regards, Tony 8< ----------------------------- diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi --- a/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi +++ b/arch/arm/boot/dts/ti/omap/omap4-l4-abe.dtsi @@ -109,6 +109,8 @@ mcbsp1: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49022000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP1_CLKCTRL 24>; + clock-names = "fck"; interrupts = ; interrupt-names = "common"; ti,buffer-size = <128>; @@ -142,6 +144,8 @@ mcbsp2: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49024000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>; + clock-names = "fck"; interrupts = ; interrupt-names = "common"; ti,buffer-size = <128>; @@ -175,6 +179,8 @@ mcbsp3: mcbsp@0 { reg = <0x0 0xff>, /* MPU private access */ <0x49026000 0xff>; /* L3 Interconnect */ reg-names = "mpu", "dma"; + clocks = <&abe_clkctrl OMAP4_MCBSP3_CLKCTRL 24>; + clock-names = "fck"; interrupts = ; interrupt-names = "common"; ti,buffer-size = <128>; diff --git a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi --- a/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi +++ b/arch/arm/boot/dts/ti/omap/omap4-l4.dtsi @@ -2043,6 +2043,8 @@ mcbsp4: mcbsp@0 { compatible = "ti,omap4-mcbsp"; reg = <0x0 0xff>; /* L4 Interconnect */ reg-names = "mpu"; + clocks = <&l4_per_clkctrl OMAP4_MCBSP4_CLKCTRL 24>; + clock-names = "fck"; interrupts = ; interrupt-names = "common"; ti,buffer-size = <128>; diff --git a/drivers/clk/ti/clk-44xx.c b/drivers/clk/ti/clk-44xx.c --- a/drivers/clk/ti/clk-44xx.c +++ b/drivers/clk/ti/clk-44xx.c @@ -749,9 +749,14 @@ static struct ti_dt_clk omap44xx_clks[] = { DT_CLK(NULL, "mcbsp1_sync_mux_ck", "abe-clkctrl:0028:26"), DT_CLK(NULL, "mcbsp2_sync_mux_ck", "abe-clkctrl:0030:26"), DT_CLK(NULL, "mcbsp3_sync_mux_ck", "abe-clkctrl:0038:26"), + DT_CLK("40122000.mcbsp", "prcm_fck", "abe-clkctrl:0028:26"), + DT_CLK("40124000.mcbsp", "prcm_fck", "abe-clkctrl:0030:26"), + DT_CLK("40126000.mcbsp", "prcm_fck", "abe-clkctrl:0038:26"), DT_CLK(NULL, "mcbsp4_sync_mux_ck", "l4-per-clkctrl:00c0:26"), + DT_CLK("48096000.mcbsp", "prcm_fck", "l4-per-clkctrl:00c0:26"), DT_CLK(NULL, "ocp2scp_usb_phy_phy_48m", "l3-init-clkctrl:00c0:8"), DT_CLK(NULL, "otg_60m_gfclk", "l3-init-clkctrl:0040:24"), + DT_CLK(NULL, "pad_fck", "pad_clks_ck"), DT_CLK(NULL, "per_mcbsp4_gfclk", "l4-per-clkctrl:00c0:24"), DT_CLK(NULL, "pmd_stm_clock_mux_ck", "emu-sys-clkctrl:0000:20"), DT_CLK(NULL, "pmd_trace_clk_mux_ck", "emu-sys-clkctrl:0000:22"), -- 2.42.0