Received: by 10.223.185.116 with SMTP id b49csp189187wrg; Thu, 8 Mar 2018 15:26:35 -0800 (PST) X-Google-Smtp-Source: AG47ELuIkxLTjueeIXbG5nZqcOp0c9ECYagtQd9HGvAljDqd9juzM9APkZ3pqme1pEZNmJ3lAVLe X-Received: by 2002:a17:902:aa5:: with SMTP id 34-v6mr25838623plp.429.1520551595036; Thu, 08 Mar 2018 15:26:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520551595; cv=none; d=google.com; s=arc-20160816; b=JRwKnWYHO/kY0xqyuGx4rWx5dNdcGuRpkGQvwmx1wpY8PlQR7h1KjtQu/G+6ku2/+G 4mtG6fb9F6AJsEcKNgE6o2VWyLbBUtZgCuu6478h0cAs/u0gKpYDoaOuqI602Msoz2hD kNAxn5vasv5CeH7SghFkiI2OUr7yXqR05Z0lZNVw16XbEb32z+cMbziQb6iWMn9XPEKV v79zhuVQCGH1Z9rwg8c2GfMLKs/17nsurgnz1Uq1k8d4ENdU1dLJ2/aeIeAOvNoSgLZb bTL9hb0104C1EqOImo/ndLFe94xAMmdn+FtdA8rKFJMhlWMZ5j9nf8d01mApJZmTZZp/ Y/ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dmarc-filter :arc-authentication-results; bh=Kt4GU+ahxM+migapMjB33FlylJEb2rnc3JJnyusbzPQ=; b=URdhpGno4O82eVuRD+MydtZ5MctgrskVdElxsoHRNhNZiisTH3LX6L02hgIubAEQ2I GwWkeZjtB/S1ZzjMZIj3CZ57yfdAwt0sHZCLNiiuqXgRIM5OjJ+NoS4Lxp4RD4rfq0y7 KkkyGQtyGedBanEWJhmSGMGSdebfwNahmcONryi/0+Y3j3PIgAToORRegh+X4h2Md7nQ pPbcPSDnxtKyxT+kRVfctfd5P8pmgv6bnPcSMPOP4h/sYcfegwykkLd4aR8Xzb7C4FlJ VSJ1HQ7BYbTb4gcQXyQpe42H1vPZbNyJU/j2zgFKb+Wj75D2KjmseJfCP+K8YHf+3+I8 byDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5-v6si15937509plk.185.2018.03.08.15.26.20; Thu, 08 Mar 2018 15:26:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751113AbeCHXYP (ORCPT + 99 others); Thu, 8 Mar 2018 18:24:15 -0500 Received: from mail.kernel.org ([198.145.29.99]:49088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750824AbeCHXYO (ORCPT ); Thu, 8 Mar 2018 18:24:14 -0500 Received: from mail-qt0-f172.google.com (mail-qt0-f172.google.com [209.85.216.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EFEC2178C; Thu, 8 Mar 2018 23:24:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8EFEC2178C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qt0-f172.google.com with SMTP id g60so8756154qtd.11; Thu, 08 Mar 2018 15:24:13 -0800 (PST) X-Gm-Message-State: AElRT7EGava/GNoFxgAH/aHCZE7pC7aYPLdeqwYmPfIJEREXldxqqQ+o ptrepCw80JouuNMCsqrYdx0IyvBYRf3Bz8Swmg== X-Received: by 10.200.28.84 with SMTP id j20mr41691755qtk.188.1520551452698; Thu, 08 Mar 2018 15:24:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.178.131 with HTTP; Thu, 8 Mar 2018 15:23:51 -0800 (PST) In-Reply-To: <87lgf2fhn2.fsf@anholt.net> References: <20180307185716.17449-1-eric@anholt.net> <20180307185716.17449-3-eric@anholt.net> <87lgf2fhn2.fsf@anholt.net> From: Rob Herring Date: Thu, 8 Mar 2018 17:23:51 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/6] dt-bindings: soc: Add a binding for the Broadcom VCHIQ services. To: Eric Anholt Cc: Florian Fainelli , Mark Rutland , devicetree@vger.kernel.org, Greg Kroah-Hartman , Phil Elwell , "moderated list:BROADCOM BCM2835 ARM ARCHITECTURE" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "linux-kernel@vger.kernel.org" , Stefan Wahren , bcm-kernel-feedback-list@broadcom.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 8, 2018 at 2:15 PM, Eric Anholt wrote: > Rob Herring writes: > >> On Wed, Mar 7, 2018 at 12:57 PM, Eric Anholt wrote: >>> The VCHIQ communication channel can be provided by BCM283x and Capri >>> SoCs, to communicate with the VPU-side OS services. >>> >>> Signed-off-by: Eric Anholt >>> --- >>> >>> v2: dropped firmware property, added cache-line-size. >>> >>> .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 28 ++++++++++++++++++++++ >>> 1 file changed, 28 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt >>> >>> diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt >>> new file mode 100644 >>> index 000000000000..cdef4abc5e47 >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-vchiq.txt >>> @@ -0,0 +1,28 @@ >>> +Broadcom VCHIQ firmware services >>> + >>> +Required properties: >>> + >>> +- compatible: Should be "brcm,bcm2835-vchiq" >>> +- reg: Physical base address and length of the doorbell register pair >>> +- interrupts: The interrupt number >>> + See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt >>> + >>> +Optional properties: >>> + >>> +- cache-line-size: >>> + Size of L2 cache lines. The VPU firmware detects >>> + this property and overrides it with the actual L2 >>> + cache line size it's using when loading the >>> + device-tree. Determines the required alignment of >>> + offsets/sizes of VCHIQ pagelists. If missing, the >>> + firmware assumes an older kernel using 32-byte >>> + alignment. >> >> How is this a VCHIQ property? This is a standard property for cache >> nodes, but this is not a cache node. > > Because the existing firmware code is choosing a value based on the > property's presence in this node. This is the DT ABI for the firmware > that's been shipping for a long time (at least since the 4.9 era). It's not an ABI if it is not upstream and documented. >> Is it really a problem to just use a fixed maximum alignment? That >> seems to be good enough for all the rest of the kernel. > > If we can't have this DT property, then it looks like we need the > upstream kernel to just use 32, since that's what the firmware will > assume in its absence. Maybe the firmware maintainers can give us a new > arg to the mailbox call for setup where we could pass in the value to > use (or flag for them to pass their preferred value back to us) so we > can avoid DT. I read thru the discussion on the previous version and skimmed thru the code, but still don't really have a grasp on things. If the actual cache line size is 64 bytes, but you use 32 things would be pretty broken I'd think. BTW, I'm pretty sure this line is not doing what you want: static unsigned int g_cache_line_size = sizeof(CACHE_LINE_SIZE); Rob