From patchwork Fri Sep 14 13:22:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Elwell X-Patchwork-Id: 969869 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=devicetree-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=raspberrypi.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=raspberrypi.org header.i=@raspberrypi.org header.b="jPnp7RPM"; dkim=pass (2048-bit key; secure) header.d=raspberrypi.org header.i=@raspberrypi.org header.b="Jc2UMDkM"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 42BbnV1pcpz9s9N for ; Fri, 14 Sep 2018 23:23:42 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727839AbeINSiK (ORCPT ); Fri, 14 Sep 2018 14:38:10 -0400 Received: from mx07-00252a01.pphosted.com ([62.209.51.214]:17798 "EHLO mx07-00252a01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727611AbeINSiJ (ORCPT ); Fri, 14 Sep 2018 14:38:09 -0400 Received: from pps.filterd (m0102628.ppops.net [127.0.0.1]) by mx07-00252a01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8EDHCv0000645 for ; Fri, 14 Sep 2018 14:23:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; h=from : to : subject : date : message-id; s=pp; bh=DpVrPVeD7SERCkZd3towRPMc9yAYWow79CHOp4BfDZ0=; b=jPnp7RPMBnmTQqXDc05Rhdymfi+kpoO/WkKIidq51nDXUPBUTrA3SC1vuW5HmtmSq4mb EFmygZBNyUltku2oGFgTs9fb2i0dQ5MK21BrFGO7jNegJRMhGdDgd702Gesf+86zQXSE OyOJyTz5Bb4SEWUCb/MeGZsRntqygh4qP7h38g1iXHL5sNYBYr7oxCiL1TDcTWG261qQ bq5ZC+hDap5B+dj2rRJBGfGz9drSBx0TghBqcY+EaHjc03SFrWn59SsvJo9JKWzlrQ76 xcn6QTaXYxNvzx3O2mlmB1fwV1lHlCqjGwft6vLHKoOe8a8nsYJIrWA1NCQeK0bSVBIp RQ== Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by mx07-00252a01.pphosted.com with ESMTP id 2mc3u0k3qt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=OK) for ; Fri, 14 Sep 2018 14:23:38 +0100 Received: by mail-wr1-f70.google.com with SMTP id i11-v6so9885595wrr.10 for ; Fri, 14 Sep 2018 06:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.org; s=google; h=from:to:subject:date:message-id; bh=DpVrPVeD7SERCkZd3towRPMc9yAYWow79CHOp4BfDZ0=; b=Jc2UMDkMIeBPAI5B26ZPwP9DiXDl64Kd9VI0NROCN3KMB/W+F7uSebVfv3M+fOU7wF HlhJKL5VICFlyXgh+UV670Co2b2lxThVW7RzM44jTbkgdM8pRSDW7OZAETHVOrfHE0Aw Glbu77MuyZBcg8DprTZEE+LDZ7Xl/rM/Mvz2O5LEnp94+6qR0JaEDtvhxebiT/mjHL5U NpQtBQBP+xxl1yU6XBnNrAovFxCwtFSe1I7LohMdTh9Uc6XV9Amga3LSkpniNp/NKe24 03H0rf+FqRvm1TRaoeb8yDsBgV7BJqJp0bILV5mzlPeF1Jkp3qyco0usLNlhG9FhlP7Q KjPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=DpVrPVeD7SERCkZd3towRPMc9yAYWow79CHOp4BfDZ0=; b=Ihq23Df0yek2G3wzxsQI9WIxnSsQyau8odYHLqa7KZra/kDv5TVvJkXyvO85vxhQK+ Lq0Fp2QyfXBML4yo785vgtxfmyiWLR879wGLV8x1EaXBoqpE6KHndax0jRnk+LdCBX9b tmx0CxJ6gNp8auvhL1O5j0YJhE2PPmrvT3pSFPnnUBG+vju2s+Rv/RcOCTF3O8OfpnEe TtY+TIGX1+G03YhScGfJMFe8a77sCmVN9RxgusNem1LmKhwbK48Gd8RnDtxoooHsFRlK Q0SL6Y2IxJBOUj55rTH4Oo64AhMvnVbn9nFOIhGQ/lh2Dr/WzU7QeqnBErFuxPuR8OMF VYRA== X-Gm-Message-State: APzg51BhnOQ+J7LWkpP9wR94jeetpNQXIkktuUAn2/X/QrPJPlFLNt5D 1OEYRtD7Dx4uAeDZcjCrYpVilDSJA8EECQBkyie02NDwSzZPQULqPIg3PAFXndTRfvhufOiHewz viL+Nmlx3WJ6y2QMl6GDhTA== X-Received: by 2002:a5d:69d1:: with SMTP id s17-v6mr9967815wrw.77.1536931417327; Fri, 14 Sep 2018 06:23:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYp3gUhFU0kA6Jf9zj7sTqc6WO5VZbPWRdfIiEccm+TFUd3VMLYZfSgiuG09hKBhHznSW5DhQ== X-Received: by 2002:a5d:69d1:: with SMTP id s17-v6mr9967788wrw.77.1536931416961; Fri, 14 Sep 2018 06:23:36 -0700 (PDT) Received: from buildbot.pitowers.org ([2a00:2381:fdf7:14:910f:6f88:c896:5552]) by smtp.gmail.com with ESMTPSA id i125-v6sm2505703wmd.23.2018.09.14.06.23.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 14 Sep 2018 06:23:35 -0700 (PDT) From: Phil Elwell To: Rob Herring , Stefan Wahren , Greg Kroah-Hartman , Phil Elwell , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, devel@driverdev.osuosl.org Subject: [PATCH v2 0/4] Improve VCHIQ cache line size handling Date: Fri, 14 Sep 2018 14:22:51 +0100 Message-Id: <1536931375-48769-1-git-send-email-phil@raspberrypi.org> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-09-14_06:, , signatures=0 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Both sides of the VCHIQ communications mechanism need to agree on the cache line size. Using an incorrect value can lead to data corruption, but having the two sides using different values is usually worse. In the absence of an obvious convenient run-time method to determine the correct value in the ARCH=arm world, the downstream Raspberry Pi trees used a Device Tree property, written by the firmware, to configure the kernel driver. This method was vetoed during the upstreaming process, so a fixed value of 32 was used instead, and some corruptions ensued. This is take 2 at arriving at the correct value. Add a new compatible string - "brcm,bcm2836-vchiq" - to indicate an SoC with a 64-byte cache line. Document the new string in the binding, and use it on the appropriate platforms. The final patch is a (seemingly cosmetic) correction of the Device Tree "reg" declaration for the device node, but it doubles as an indication to the Raspberry Pi firmware that the kernel driver is running a recent kernel driver that chooses the correct value. As such it would help if the DT patches are not merged before the driver patch. v2: Replaced ARM-specific logic used to determine cache line size with a new compatible string for BCM2836 and BCM2837. Phil Elwell (4): staging/vc04_services: Use correct cache line size dt-bindings: soc: Document "brcm,bcm2836-vchiq" ARM: dts: bcm283x: Correct vchiq compatible string ARM: dts: bcm283x: Correct mailbox register sizes .../bindings/soc/bcm/brcm,bcm2835-vchiq.txt | 3 +- arch/arm/boot/dts/bcm2835-rpi.dtsi | 4 +-- arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 2 +- arch/arm/boot/dts/bcm2836-rpi.dtsi | 6 ++++ arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 2 +- arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +- arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 2 +- .../interface/vchiq_arm/vchiq_2835_arm.c | 4 ++- .../vc04_services/interface/vchiq_arm/vchiq_arm.c | 36 ++++++++++++++++------ .../vc04_services/interface/vchiq_arm/vchiq_arm.h | 5 +++ 10 files changed, 48 insertions(+), 18 deletions(-) create mode 100644 arch/arm/boot/dts/bcm2836-rpi.dtsi Acked-by: Stefan Wahren