Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp10844325rwb; Fri, 25 Nov 2022 08:20:27 -0800 (PST) X-Google-Smtp-Source: AA0mqf5UT8uD7dxygeM/eJ7/Qg5FxW0m7hNsri/aBGfZPm5R8cQdwAfjXaPHdrUZBn1SjP16S1F2 X-Received: by 2002:a17:90b:2544:b0:20a:f341:4ed9 with SMTP id nw4-20020a17090b254400b0020af3414ed9mr46657000pjb.11.1669393226872; Fri, 25 Nov 2022 08:20:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669393226; cv=none; d=google.com; s=arc-20160816; b=BofYOTk2GVv+fWTvt9/wi1LAcLbkNuDRQqFNxCt2zJaboUq2QHaM6bnTY8SRgQFfg2 sV6MvGUPmJByTIcdT1OT9VZva7rn8FutGWIGGJRrvyTMHb4c4U5cLKfq7w7DOg9f73EM C04Nh6avlr2dud0gD683vZ1sTjN0KyRaasJz/CKzV7d4X72sy9gauXC7zrPtgim8Eo12 Q0vrKzf+bBhisB7f88wtKTAcPCr6eMxfQrp1zuMKjNZkYtngYCLH26oCXca1WnCCk75m rkaUFlH9FBsuGMS67PK+ZfkyAy6V/qrbnxA1+RGnprPMVTUlq5umFcgze3W+VW1IVnLC lDOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=N75qs6mFE+82rJ2tMLVbCwIvCda7QU+ZxRGf1iXfJdE=; b=kyqEcSw7X7Wbm3GHZW2JMFvRFWwk4ER82GCM+XZr21EQInF/S8gRmnCVTANsxTf6Dm Wg8LbQK0czsXAU5ZNktAfI0r/rQDMR22FP1vd4GlS89HTA13pbuG7WKiXeH7AoM0L/3V UpSqBWyqajfUediKPEGzIbHBIoTtTz4lypLGlKfVUCnWqXM3BTw2vCMbrHnMB3VXcBeB Rmds4f1GXeKDynmKz/KVtrLLhsWo8+7v2Q/4KHm1a1IaXnnh3+5lHQ2W7p5Ykcs2o3vQ D4FBH5TVsRHsR0UAXyqF6jpt9MMU1uVp1xhx75Jj17TTTkBEcbbXS+k8OGB0twEzX0tG ucyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vy7Yttm0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id iw9-20020a170903044900b00186a2274386si3615980plb.469.2022.11.25.08.20.15; Fri, 25 Nov 2022 08:20:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vy7Yttm0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229804AbiKYPzq (ORCPT + 85 others); Fri, 25 Nov 2022 10:55:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229834AbiKYPz2 (ORCPT ); Fri, 25 Nov 2022 10:55:28 -0500 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BA1A40456 for ; Fri, 25 Nov 2022 07:55:15 -0800 (PST) Received: by mail-lj1-x230.google.com with SMTP id z4so5635065ljq.6 for ; Fri, 25 Nov 2022 07:55:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=N75qs6mFE+82rJ2tMLVbCwIvCda7QU+ZxRGf1iXfJdE=; b=vy7Yttm0R2M2h+VkrKBw2oXKSpzAnkKl1SJuZhacqQO+f4BEi4LeNpl+MGuBisVBAC ai/3rRBKIzJBuEhWFHHM6hJiJcug3rN0vvbQTNam/ZOcP8cIZoh1D8CaXhm/dzbJUM1n Z6Z+8hgJv2ZSKuqmk518M5Pv/G2kgjN0q8iRxPFM+LtmtlxvGtE6geKLI2HRWR6Um7O+ aobhGGDuZM7gE/6bZNR1V1MJqWM9hvvjTdvEFzZBnWvOlPnL/Z64aKh5KnWxSCqK8EZr mWG+XWyZXXleWjRIJqR8RN2ZhSu1tfB7JsNVlbVq/Ajg/D2tWEm6NVSIXmPwsqVN/Dmx 5pcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=N75qs6mFE+82rJ2tMLVbCwIvCda7QU+ZxRGf1iXfJdE=; b=XJWTtLH1A5aFzT63duu3X1DCXHNOARH2x/f5dYEw3ppykyO52Jwr3naRS9/AY1vlUc zIjKbJGvEn7vAxQRLqt8wqvuisNSILsh58O97rxl+qRBUzA6EboR+QYuBA14BN89Zg6P zVEOuzq+pJoQm7UZnyI2mg/GVJiRcrQZlQ4trjS6cVJEWhIv770+YNxRbiJx0eEWEviq GNA7Tpl0JpvldSCYwwBUyZJqwDNP8jA75Bhegg/juPqi/cWAoLfKK4xDcGHIZNuKXJMl Rqii6SbeWLgwFuPu8D3t6QbJrqjxgHcrL2eGqQ3tQxuK7rXX1WWQdPfXu0N9apxTxRlV 3KoA== X-Gm-Message-State: ANoB5pk6tYfDIR9k1eQk3LB4pcIhdN1HdMXsNTQ/q4KxtNsnrzl85u+V OlU/wn3VwDPdMHxGLa1nTvxAtg== X-Received: by 2002:a2e:93d7:0:b0:279:7294:5e42 with SMTP id p23-20020a2e93d7000000b0027972945e42mr5917318ljh.81.1669391713514; Fri, 25 Nov 2022 07:55:13 -0800 (PST) Received: from [192.168.0.20] (088156142067.dynamic-2-waw-k-3-2-0.vectranet.pl. [88.156.142.67]) by smtp.gmail.com with ESMTPSA id z25-20020a195e59000000b004aa14caf6e9sm577178lfi.58.2022.11.25.07.55.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 25 Nov 2022 07:55:13 -0800 (PST) Message-ID: Date: Fri, 25 Nov 2022 16:55:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v4 6/7] dt-bindings: cache: r9a07g043f-l2-cache: Add DT binding documentation for L2 cache controller Content-Language: en-US To: Conor Dooley Cc: "Lad, Prabhakar" , Paul Walmsley , Palmer Dabbelt , Albert Ou , Geert Uytterhoeven , Magnus Damm , Heiko Stuebner , Rob Herring , Krzysztof Kozlowski , Guo Ren , Jisheng Zhang , Atish Patra , Anup Patel , Andrew Jones , Nathan Chancellor , Philipp Tomsich , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-renesas-soc@vger.kernel.org, Biju Das , Lad Prabhakar References: <20221124172207.153718-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20221124172207.153718-7-prabhakar.mahadev-lad.rj@bp.renesas.com> <70d1bfde-f57f-1741-08d3-23e362793595@linaro.org> <9b0f8312-2caa-b9f3-edf3-1b720532f559@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 25/11/2022 13:25, Conor Dooley wrote: > On Fri, Nov 25, 2022 at 01:12:18PM +0100, Krzysztof Kozlowski wrote: >> On 25/11/2022 11:34, Lad, Prabhakar wrote: >>>>> +/* Device, Non-bufferable */ >>>>> +#define AX45MP_PMACFG_MTYP_DEV_NON_BUF (0 << 2) >>>>> +/* Device, bufferable */ >>>>> +#define AX45MP_PMACFG_MTYP_DEV_BUF (1 << 2) >>>>> +/* Memory, Non-cacheable, Non-bufferable */ >>>>> +#define AX45MP_PMACFG_MTYP_MEM_NON_CACHE_NON_BUF (2 << 2) >>>>> +/* Memory, Non-cacheable, Bufferable */ >>>>> +#define AX45MP_PMACFG_MTYP_MEM_NON_CACHE_BUF (3 << 2) >>>> >>>> What are all these? They don't look like flags, because 3 = 1 | 2... >>>> they don't look like constants, because we do not use shifts in >>>> constants. Are these some register values? I also do not see the header >>>> being used in the code, so why having a bindings header if it is not >>>> used (DTS is not usage...)? >>>> >>> These are register bit values for the MTYP[5:2] field. The DTS example >>> in the binding doc (above) uses these macros. I haven't included the >>> DTS/I patches with this patchset yet do think I should? >> >> Then why storing it as bindings? Bindings headers describe the interface >> implemented by drivers and used by DTS, but this is not implemented by >> drivers. > > IIUC, some of these properties are non-discoverable attributes of the > cache controller. I see two things that could be done here that are > "better" than #defining bits: I did not comment about properties. I comment about constants. Why register values/offsets/addresses are in this particular case suitable for binding headers? > - add an RZ/Five specific compatible and use match data to set the > attributes which is only possible if the pma-regions are set on a > per SoC basis > - make pma-regions into a child node, in which andestech,non-cacheable > andestech,non-bufferable etc are properties of the child node > > Prabhakar, does that make sense or am I off with my understanding of the > attributes? Best regards, Krzysztof