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 960A3C25B0C for ; Wed, 10 Aug 2022 15:51:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231961AbiHJPvk (ORCPT ); Wed, 10 Aug 2022 11:51:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiHJPvi (ORCPT ); Wed, 10 Aug 2022 11:51:38 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E56149B60 for ; Wed, 10 Aug 2022 08:51:37 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id j7so18263478wrh.3 for ; Wed, 10 Aug 2022 08:51:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc; bh=de1bfIeCzht/PqANgMdEHr89VgLf+QFh5U3BT1EWLbA=; b=BTpT3e1IHvP3qZibGNSre2fvR3R4RZDlEChu2oxdCo8+w163kWUdzxwWt+S6XxwKl0 fh5l/JAO4Zr3ojSmGQwE/RGhvehU4kerq0S8VN3szDU4JpTxhc5AxIy4OnUthI0WTb3C sOzSS5BDklAOGjIeHLdmqQokLG2gd4b7PB8Yv4Zs6yFPnJg0LzierVnzZZoTUNZXtr3F sdyswUaVZV9wUZjN/zjcuOeJ8fPO6TxXf5FvNib1kn2sUDKMBn3JEMBMY3GHs50arRXX rqImfwqZV+MaGStHCPAeBXcfVVqhK/3RzLlRWKN2iHDtUkugHz2Em2I62nhTArbGDo6d z0Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc; bh=de1bfIeCzht/PqANgMdEHr89VgLf+QFh5U3BT1EWLbA=; b=Mq3G/6qGIVZ2SIu/DWNJpvTAaNc45nAuQaSME1QnmWHInZAYq7McPOBAIoqFZ8j98l m8R55h4RPMXRz/FmQo2r6Hp6L0SIP4aQ+btq4S5vDAfEfqBG9w/i/IGNFROcOaOH3OXg IUH93jBnRA05G8CX0QTdNtUjFM1MTyC7b87U0HVHToNwNsP9JXrSrT1xoY0GubD27U7M 22ybVXyVCG4wtGpPIQm80UlsKpFQqw1EHhQLNqwkzITlRBiquRGY+oUwctPC2jHs6KbR MjDgRIBLrI0RHEMixJHeYq+oVXNswLkNimbFkfadUcuyBXyww9zwqarI+KNGL2cMxZQe kesA== X-Gm-Message-State: ACgBeo0lDLRPiv1eGfy7o6m/Nqp652Cv+8L9T7lGMAedaemZzZvH7s74 7d78CFh88lIQLOlgf9U+fnNwZY2ODfoOFg== X-Google-Smtp-Source: AA6agR7Q5Mp3w9f9/hxYT2JWYltgiLUYBmJ093avPRRW1qIQyFWlA5lbd3ieExjR2ZNFGI9kCBxmeQ== X-Received: by 2002:a5d:6248:0:b0:222:cd3b:94c8 with SMTP id m8-20020a5d6248000000b00222cd3b94c8mr9557443wrv.97.1660146695304; Wed, 10 Aug 2022 08:51:35 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:bbf0:b69d:fecb:8006? ([2a01:e0a:982:cbb0:bbf0:b69d:fecb:8006]) by smtp.gmail.com with ESMTPSA id g9-20020a05600c4ec900b003a325bd8517sm4164965wmq.5.2022.08.10.08.51.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Aug 2022 08:51:34 -0700 (PDT) Message-ID: Date: Wed, 10 Aug 2022 17:51:33 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] spi: meson-spicc: save pow2 datarate between messages Content-Language: en-US To: Mark Brown Cc: linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Da Xue References: <20220809152019.461741-1-narmstrong@baylibre.com> <39c2f53b-8f53-ceb1-ae0c-81e5e53d01aa@baylibre.com> <518f22f4-1582-924c-9eaa-28ebbe53a632@baylibre.com> <9dabe979-f6b5-329d-f017-a8f0c00adeca@baylibre.com> From: Neil Armstrong Organization: Baylibre In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/08/2022 16:49, Mark Brown wrote: > On Wed, Aug 10, 2022 at 04:40:04PM +0200, Neil Armstrong wrote: > >> I don't think it's worth adding so much code for this since we already > > I don't recall the code for clock providers being that hard? They're > generally pretty small, some of the ASoC CODEC drivers did something > similar. Seems over-engineering to me, but I can explore this path if it's the best route to follow. > >> had an open-coded function which perfectly worked before. > > Except in the cases it didn't... It did but wasn't generic enough to take the new clock path introduced in the new SoCs. > >> I'm perfectly OK to remove the CCF driver for the legacy clock path >> and return back to the old open coded calculation since it perfectly >> worked and stop using the legacy clock path for new SoCs since it would >> never be selected anyway... > > It does seem better to go the clock provider route TBH. I'm afraid this won't fix the problem since CCF won't set the clock again if the rate is already ok in it's cache, we'd still need to save the divider value and restore it after the reset as I did on this exact patch. > >> ... but GX SoCs are broken so it would need an intermediate fix until >> I push the refactoring to cleanup all this. > > I'm trying to figure out if this is actually fixing the problem or just > papering over one case where things happened to go badly. It does, when clk_set_rate() is called, the datarate field would be the same as after the previous call. Neil