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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12EC9C4332F for ; Mon, 14 Mar 2022 12:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235346AbiCNMf6 (ORCPT ); Mon, 14 Mar 2022 08:35:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241031AbiCNMef (ORCPT ); Mon, 14 Mar 2022 08:34:35 -0400 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 077691D0C0; Mon, 14 Mar 2022 05:32:42 -0700 (PDT) Received: from mail-wr1-f47.google.com ([209.85.221.47]) by mrelayeu.kundenserver.de (mreue010 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MsZBb-1oHj3y0IhP-00txXw; Mon, 14 Mar 2022 13:32:41 +0100 Received: by mail-wr1-f47.google.com with SMTP id r10so23716488wrp.3; Mon, 14 Mar 2022 05:32:41 -0700 (PDT) X-Gm-Message-State: AOAM532iDPmTogaBAEXkFjYhD7HLQRjB7xg4y6unFo/KQgLZAx/yC4yI njwgWDcCQ92vKa3kFg2CMG+ypjwooRjFFPhLL8U= X-Google-Smtp-Source: ABdhPJxkFLmHM1om+Pm/EdZjlu/oHNDpfpDjWiz13UF+c79mJMkNbH3uFQXob/61v67y1ilq+j5Sa2dGjBYC2XD0inI= X-Received: by 2002:adf:d081:0:b0:1ef:9378:b7cc with SMTP id y1-20020adfd081000000b001ef9378b7ccmr17319150wrh.407.1647261160730; Mon, 14 Mar 2022 05:32:40 -0700 (PDT) MIME-Version: 1.0 References: <20220311093800.18778-1-singh.kuldeep87k@gmail.com> <20220311093800.18778-4-singh.kuldeep87k@gmail.com> <4aae560d-d266-d0d0-136f-32891b15bc01@mleia.com> <4f39f086-1932-1729-8761-d5c533356812@mleia.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 14 Mar 2022 13:32:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] ARM: dts: lpc32xx: Update spi clock properties To: Robin Murphy Cc: Vladimir Zapolskiy , Arnd Bergmann , Kuldeep Singh , Olof Johansson , SoC Team , Rob Herring , DTML , Linux ARM , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:BRidD3s+k4ddX6FhmA6r0KsG1DRPklEV0cUP5rL1bxizBW85MUG hAQEoY+ttglGkEf02F/7+FPXVxsS87loPbm3FiMgFVnrEgYLBn2gvMYg+HNuVL+ln6KZgyq P4bsBDfdfuun6O9a8qtG8+BESlBwJwD9sCsEshjjLWISbzswFed5NLB63lZy6iftvuQ6709 XUp8VTe4L9n59J7gaaFtw== X-UI-Out-Filterresults: notjunk:1;V03:K0:0WlnscOXg3k=:4A1f8uYndxT0vn2XHeEaBa 9M4qC1XjUpWZbu6aNwzKSWSKeGVGHwwGPR2E06lNNMmb7FdxgC2opO+LsARCmR/u1uDuHXToP IeM3yImU2CPisHkk+X2ie+GxuH/hyo+uXZrPVf0p+tI3g/GLsZP9NlMMB6S1i4O3hQqqUNxVi e3D7O6sWwvuK/iwvjWlZCWas0y2Zd++oEY7SKwf/9NtmFeuup+XtW/0JYIaubNRTr1X6vRG7B D5m7NK8BPB3LLSzYHsDCLyXQh8AP9DBGY7vXgoNOTi3knaRCZVQVJbsb4u4vu4nBdP0gEJJ+W ZwVFhygNRY3cXKiub2FPRdLoIS7Ba9Ljg64O6xj+oTU1ElKzHkYXybRfZo4pIHVbpI7aWfDOd xwAZbndtOl5IVnDaAGpFYESn1JYU8Jfomw1iVCTSKcez57SOY0SgG1qtZX2RptVxYbSZiEc+o O+Pi6o6NKTLr66NDIGSrrCd9GMG05rP/B+Hp3DKJ8RzzzVVRSl/b3LRz+QBUinhAMZJEK/Soy pIueCUi0GzY0D9OKn8OxQncoyA5v4+ECf9ZcnejZCvQeUvH6SrkspLwd8UdrmvYpgp6ArQ8SY 2kgiYIhLIAjDfPje3gO1nipB7QKLvb3Qbey/z+4hfNLztm1h9J7Qv1222P5GlPZvkuKDvypm7 0ywFODZLlsNvuqmPZQ04wqIcITtITCY/JJEp5CYEuAceCmorP48/e4Q8L+usHGoZVXv8= Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 14, 2022 at 1:20 PM Robin Murphy wrote: > On 2022-03-14 11:50, Vladimir Zapolskiy wrote: > > On 3/14/22 1:43 PM, Robin Murphy wrote: > > > > Thank you, it explains, why "apb_pclk" is required for all PrimeCell > > controllers on the SoC. Nevertheless, in commit 93898eb775e5 it was > > misidentified with the sspclk clock, the latter one is the only clock > > explicitly utilized by the driver in 2015 and till today. Fixes in dts > > files should be preceded by a fix in the driver. > > There's nothing to fix in the driver, though. In fact it can only be > working today because the Linux driver isn't very strict and simply > assumes that the first clock entry is SSPCLK *without* considering its > name (other consumers of the binding might be stricter; I don't know), > and because presumably the HCLK happens to be enabled already anyway. > Changing the driver behaviour would only stand to cause functional > regressions. We can change the driver to look for an sspclk by name first, and then fall back to the first clk if none is found. This would be backwards compatible and allow new dts files to have an arbitrary order, though we still need to be careful about changing the existing dts files after that, to avoid breaking older kernels. Arnd 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 14DC2C433F5 for ; Mon, 14 Mar 2022 12:34: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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UXkpkTb150N03hdkTNAHJi3DLDr2Z7Rnjwpx/EVTrLI=; b=z4pUIhaflzPs0/ donfLfz9p/ilo9twNvIipd0w7G142znkooEVEFBmtHQpsF1Smgr3m598RB/gfFPfRBoIF2rwu8z36 NYr4jv2B9krJX6/SjjOKR+I/A5wySVAuhqaiki3CzHBTt48fpvazP5O+XCv4uos8ZYSYJEgU06GXz OYea4NIruGKq+yR8jii9UwgBFu81cu2p94MgGbWcIQgfyhfZg3Eh0vwzYEXxxK3L96v7iDI7apkOZ 8ZlO/00kq4WUvWmnXPksZHVwhSSnfqoBs+m3vQCjyEYTX8E9MN5wdP68wFogMOqTHAvPASOnOXVZ/ lB30nAhrj7ZChwHr2jOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTjsW-005Pla-Vi; Mon, 14 Mar 2022 12:32:49 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nTjsS-005PkW-EG for linux-arm-kernel@lists.infradead.org; Mon, 14 Mar 2022 12:32:46 +0000 Received: from mail-wr1-f47.google.com ([209.85.221.47]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N1wdj-1o9RK40GJF-012K4n for ; Mon, 14 Mar 2022 13:32:41 +0100 Received: by mail-wr1-f47.google.com with SMTP id h15so23672430wrc.6 for ; Mon, 14 Mar 2022 05:32:40 -0700 (PDT) X-Gm-Message-State: AOAM532V/ZZhAifaCTQ/n9/o5XoGiE2i+CE8SuZJTtdgi8kk5Oy1ZflZ 6lPzBB+RasgBvnMe/jyyPAzZEQujOkdy6PD2G7s= X-Google-Smtp-Source: ABdhPJxkFLmHM1om+Pm/EdZjlu/oHNDpfpDjWiz13UF+c79mJMkNbH3uFQXob/61v67y1ilq+j5Sa2dGjBYC2XD0inI= X-Received: by 2002:adf:d081:0:b0:1ef:9378:b7cc with SMTP id y1-20020adfd081000000b001ef9378b7ccmr17319150wrh.407.1647261160730; Mon, 14 Mar 2022 05:32:40 -0700 (PDT) MIME-Version: 1.0 References: <20220311093800.18778-1-singh.kuldeep87k@gmail.com> <20220311093800.18778-4-singh.kuldeep87k@gmail.com> <4aae560d-d266-d0d0-136f-32891b15bc01@mleia.com> <4f39f086-1932-1729-8761-d5c533356812@mleia.com> In-Reply-To: From: Arnd Bergmann Date: Mon, 14 Mar 2022 13:32:24 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/3] ARM: dts: lpc32xx: Update spi clock properties To: Robin Murphy Cc: Vladimir Zapolskiy , Arnd Bergmann , Kuldeep Singh , Olof Johansson , SoC Team , Rob Herring , DTML , Linux ARM , Linux Kernel Mailing List X-Provags-ID: V03:K1:+yLTeols7OWZAtNNql7Ffo9IvNMJqa2nT2v/ifPsWE6B2uz5g3u bXG9y567BXkFtZ4aoBfesL27kbUa/I9iCcs2arT4n8xqcbqaFcNNWd9q9vW3BzFZokCC/P5 vpaNV52ngHn79uVnpb8VYw1eso10dtwCvZvgirfGVrLxbak150onqnamLQob33i8AKFf/QY sP7hXBFACTh+htxFBRnKw== X-UI-Out-Filterresults: notjunk:1;V03:K0:V/yfD+De7qg=:wvQeI1gfuIlJJL8honrerx P+wj1NJDCm9/qCUdr3fLSBC6k+Wc6XN99JjVrjIralDYBpnjMaes8k8p9HjZdS97OrXucdUUg zDiMT4WtOu6VVjzqk27zGiOfbasVzEy2HEjs+tkvkFWA7P2rbT14N7471f+ropr7YCYrgSA8B zfSrmOBKOYlnJCTksbgsFOeq/X7SV7pSdxr7dfq3iot0sIRX276zHfZ5dzlhfHI/LBTOzBKj4 TtpEVPyYwyHsVPEgpxO7q4rgFL8VK/SNs4z1U4gcgxH7HlX05PWipjSbqUCLN41WQMsQt3Pgt QxW+BmHt/ol7YbtrzHEbqtNGXKJpOkFUh9tyw9nDG7W9fVifoZq81FUQlDDQaqhclzDLbzQCA W738T2YFrh9Vo72BiYTg4umQ0tgfr5nUbTcZMwirXNDPcGEK0aW9F4pe89go+XphAC/XKSGVb F/wMMsUxNRwk9v2e342DzccgKTtj81vqcC1V/0Uw5bxJdP01bs51EH12Lu8Ys4+cDYbizANh+ oDRardeHrfHjusjqWIPppf2datmJQAV1C74tkVEWCMwfwQaZuZty9xGNcVVmyqBjdtQnGW3eC 3alubiHcjgLdIEEn78Hbb+ljb8xYkanMMn0thCZxmepzFP5r95bZd7xJXfEiwm+BDoidLV8OA lQeV231b1kidYP1mdKCig6aSkPcLcwLihmeNtHUU03eLUrBrV5vBa/U0UVLdWzqA7kiA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220314_053244_791025_757EDC3B X-CRM114-Status: GOOD ( 22.68 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 14, 2022 at 1:20 PM Robin Murphy wrote: > On 2022-03-14 11:50, Vladimir Zapolskiy wrote: > > On 3/14/22 1:43 PM, Robin Murphy wrote: > > > > Thank you, it explains, why "apb_pclk" is required for all PrimeCell > > controllers on the SoC. Nevertheless, in commit 93898eb775e5 it was > > misidentified with the sspclk clock, the latter one is the only clock > > explicitly utilized by the driver in 2015 and till today. Fixes in dts > > files should be preceded by a fix in the driver. > > There's nothing to fix in the driver, though. In fact it can only be > working today because the Linux driver isn't very strict and simply > assumes that the first clock entry is SSPCLK *without* considering its > name (other consumers of the binding might be stricter; I don't know), > and because presumably the HCLK happens to be enabled already anyway. > Changing the driver behaviour would only stand to cause functional > regressions. We can change the driver to look for an sspclk by name first, and then fall back to the first clk if none is found. This would be backwards compatible and allow new dts files to have an arbitrary order, though we still need to be careful about changing the existing dts files after that, to avoid breaking older kernels. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel