Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1186053rdb; Wed, 6 Dec 2023 10:49:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2fdmZegdg9Y5QRpcryzP6xFISVil2RiqgP+vWfs5qBdUxDRH1CRS61SRrd3c7NcCd/cIF X-Received: by 2002:a05:6358:3122:b0:170:6b76:f5e with SMTP id c34-20020a056358312200b001706b760f5emr863571rwe.28.1701888582769; Wed, 06 Dec 2023 10:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701888582; cv=none; d=google.com; s=arc-20160816; b=p+oo3Ho9tzLrtuP2xZAqjRNuOE/NFSAmuFTMe+gMD9cvbCM4kGP6p/Ru8VufN5nPMZ MfrYHVB/N0JohF9MHm+ypVisVS5aVWBfGCHTmwsx8e1ThgGE76aOipJMSLt1xnSKZzPl dV5sAmjBhvsHsWJQCY943I09U7TaiCRZRucaVmun8AYV8EohoUaWBocR3WStQQEmMzYQ iNHLbIRy8WQYoq0Z9ciA5qIb+5OPErmvUOK1Ej2Aee2DpqtRxyHeWYFfe3CT98T0YZgY VXxdO4JGE69P1CZmP0zFIx2jDjsW0ehMvuMFxTuE3Tg0e9FwpBBjNFNu0Eut7mVZXA9W NpYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jAybnoXUPmmnjimwppJwbCtNCv9V5v2xiMszdqym8XU=; fh=QKEEn1uRh7uvyl5zjPCMjCBRhunaV644JiV3M6dNZIg=; b=xRnz9+waYA37su3ANTIwYT3bRHzupM0op7uQJamzng7IsgVhMwgyMMIOgE1SK+NS74 D2B6RDL5Yts9ciDNdzXOCFhAXeCbe0WSL+KQS6ic+ZYLJTFg1wFYFWxFf4JcTXm6EyVD iYkJyckNcC0p9dAzFkeCe0m3VW/7vzome2l4//4Nr2TXkMYsTFxcHv/mTTgBXjatOkNZ JC7YnX6zIAjev9O03t0Dptfwb8RdwxYSbQnMxXwZGAM1scoct1Y0gHyvqVakvG5QEEhw gaWLFOZekZOsET1KmrdCt8VjglAN1XRt5XvpJ8T7VF5a3bt5f+oYx3U+c4IYcjCSbp/X 0YGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fmcDYdyp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id o17-20020a656151000000b005c219360d9csi329562pgv.50.2023.12.06.10.49.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 10:49:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=fmcDYdyp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5EFFB8343978; Wed, 6 Dec 2023 10:49:39 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378848AbjLFStX (ORCPT + 99 others); Wed, 6 Dec 2023 13:49:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378977AbjLFStU (ORCPT ); Wed, 6 Dec 2023 13:49:20 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 916EA1985 for ; Wed, 6 Dec 2023 10:48:42 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-5a0dc313058so8296a12.0 for ; Wed, 06 Dec 2023 10:48:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1701888522; x=1702493322; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jAybnoXUPmmnjimwppJwbCtNCv9V5v2xiMszdqym8XU=; b=fmcDYdypDnTvjH8tRPNHPt4wlwNf7mqz6Ii0wfKdPUWiOTWWmg/J6xzjx4c3lJjQuJ N7NOm+u24CybB7Ez16UEM8csfUq6sOkTZC09weNPxv73GR6Uyz3LjD65+iEkaubYK8n1 nz6hujL7c54ia58NjoDjXs+v+gvbaKaILnoNY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701888522; x=1702493322; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jAybnoXUPmmnjimwppJwbCtNCv9V5v2xiMszdqym8XU=; b=fPaxql9On6dbekB1dEMESa/SD7ezQ0ee+inPL+NuziSNF5vrTrq+e6JOfsZLzbB5m3 ge1E2QBh65BcQwJpIKYQN1ovC3nHX+sUrCBaSZILlS4oT6Jt5GVaothWrlQFjARjCiBq RpXoqnbg08fqA3NQlJTpl+tVEw+GWtz2KbjP+QRgK8cO8IPKDZLOKHtYBI5IuEMLvek/ h4Xz+iPrnjU6K7BhLz1CcabVhcbZ6t2LXCQNlMNZYcki0OtRN3WDT0p73ia6uopb9/Sa uvFpWNbXIQYGa0UGRFUeuR6tNF+iu02FmN7v4JyhkP9BoVFtFqUSXZCd3FWTuCnq8aVs H72g== X-Gm-Message-State: AOJu0YwU89yDaYoT5O8gshXdwBWpuhD4FUSntlR1LrR1VwCA4esaLTE0 e3E1zhNXFXx652lFnDCorLJMLHNKP6KtR0kxMWiO7w== X-Received: by 2002:a17:90b:1e05:b0:286:6cbf:e240 with SMTP id pg5-20020a17090b1e0500b002866cbfe240mr2673295pjb.4.1701888521864; Wed, 06 Dec 2023 10:48:41 -0800 (PST) MIME-Version: 1.0 References: <20231205184741.3092376-1-mmayer@broadcom.com> <20231205184741.3092376-4-mmayer@broadcom.com> <12f3c515-71cf-46a5-ad92-15bf6c4c2f2c@broadcom.com> In-Reply-To: From: Markus Mayer Date: Wed, 6 Dec 2023 10:48:30 -0800 Message-ID: Subject: Re: [PATCH 3/4] memory: brcmstb_dpfe: support DPFE API v4 To: Krzysztof Kozlowski Cc: Florian Fainelli , Rob Herring , Conor Dooley , Linux ARM Kernel List , Device Tree Mailing List , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.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 (howler.vger.email [0.0.0.0]); Wed, 06 Dec 2023 10:49:39 -0800 (PST) On Wed, 6 Dec 2023 at 09:32, Krzysztof Kozlowski wrote: > > On 06/12/2023 17:18, Florian Fainelli wrote: > > > > > > On 12/6/2023 3:10 AM, Krzysztof Kozlowski wrote: > >> On 05/12/2023 19:47, Markus Mayer wrote: > >>> Add support for version 4 of the DPFE API. This new version is largely > >>> identical to version 3. The main difference is that all commands now > >>> take the MHS version number as the first argument. Any other arguments > >>> have been pushed down by one (i.e. what used to be arg0 in v3 is arg1 in > >>> v4). > >>> > >>> Signed-off-by: Markus Mayer > >> > >> ... > >> > >>> + > >>> static const char *get_error_text(unsigned int i) > >>> { > >>> static const char * const error_text[] = { > >>> @@ -929,8 +954,12 @@ static const struct of_device_id brcmstb_dpfe_of_match[] = { > >>> { .compatible = "brcm,dpfe-cpu-v1", .data = &dpfe_api_old_v2 }, > >>> { .compatible = "brcm,dpfe-cpu-v2", .data = &dpfe_api_new_v2 }, > >>> { .compatible = "brcm,dpfe-cpu-v3", .data = &dpfe_api_v3 }, > >>> + { .compatible = "brcm,dpfe-cpu-v4", .data = &dpfe_api_v4 }, > >>> > >> > >> No, use SoC specific compatible. > > > > This is not that simple because for a given SoC, the API implemented by > > the firmware can change, in fact it has changed over the lifetime of a > > given SoC as firmware updates get rolled out. Arguably the dialect > > spoken by the firmware should not have changed and we told the firmware > > team about that but it basically went nowhere and here we are. > > > > The Device Tree gets populated by the boot loader which figures out > > which API is spoken and places one of those compatible strings > > accordingly for the kernel to avoid having to do any sort of run-time > > detection which is slow and completely unnecessary when we can simply > > tell it ahead of time what to use. > > Thanks for providing justification, quite reasonable. A pity that none > of the commit msgs answered this way. The real pity is how this API was designed, making all of this necessary in the first place. We can definitely spell out more clearly in the commit messages what is going on and why all of this is needed. I'll pull all the pieces together from the various responses. As long as there's a way we can reasonably implement what we need, we'll be happy. > Best regards, > Krzysztof