Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp741898ybx; Thu, 7 Nov 2019 01:59:59 -0800 (PST) X-Google-Smtp-Source: APXvYqzad556zjh04i7QMbIDBC1HbWO5YCo1Ig4TFj3itntEqUb2aH72SiiuaUxnUxg+NYzFXqu0 X-Received: by 2002:a50:85cb:: with SMTP id q11mr2430194edh.141.1573120799582; Thu, 07 Nov 2019 01:59:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573120799; cv=none; d=google.com; s=arc-20160816; b=S20McHXaizmlb3q8TDkxqLN1LzmfBsMIsV8ZP0US0mZ2zN28VwS6XsMoQxHZ1mhZzL 5VtyRLjv1uG0/7uCx05wRGmQMu3XCW7W+7b/G/bRPFEixQWrzae7Xz3gA38Z6EpDZLVE 3rokxNPi4IM0KTvFGrgkQlgdgCBfyC87rLgXIeXQJfAlrQHk7TKcgzriBKGZqzhC3DLk xxWBr/cpbSN2IvJKSExoTTZ2gOvF+svL/xJao5xLpie19J9kF7TFMmFWx/k5ZMdFpJ0F u37tUsYWGhqpNf7cJgGOY5Htj6rZAaf0h6nDKGkHVp6Kit4x6fM3RnkM7iSv+IVWjVxC WZKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=MaNYKYG/T7ntVwf5N+KZnvWSWGpKn6C7e+XpkVN8aIk=; b=bG20iPtHLinaksOkDU8H9Pz0u1j8oDLY0Lr0/63T5GdGveIkAz3oxIAPBnSD6d+DxA KP3aghVotwF9YmpbyEavWf3YwNTPq1E7qa80zuUwihmjsczhdMVL5pFPL/TrqQbPP8pE 2MNVAhtf324nuxj7czyChJik4fVHNDQsu85U1XTusW0z+1PPXJFQtfBjUbx7bWAYt/yR dREp/Z3kSrcFTd5zNoJdnX/tEW7hnganY2TAyI0sMJdJY6GfY7Ww6hSeNmKrOwur6jkH EIPGdpAiW2fHnGwdOK2eihf/9iL4MhQuTvS6i2S+1W2UjIhfDx88O0paLfSuvDVS6BFU JDpA== 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 f13si1075228eda.288.2019.11.07.01.59.36; Thu, 07 Nov 2019 01:59:59 -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 S2388071AbfKGJ40 (ORCPT + 99 others); Thu, 7 Nov 2019 04:56:26 -0500 Received: from mx2.suse.de ([195.135.220.15]:40806 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387827AbfKGJ4V (ORCPT ); Thu, 7 Nov 2019 04:56:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A81ECB2E5; Thu, 7 Nov 2019 09:56:19 +0000 (UTC) From: Nicolas Saenz Julienne To: catalin.marinas@arm.com, linux-kernel@vger.kernel.org, Rob Herring , Mark Rutland , Eric Anholt , Stefan Wahren Cc: Nicolas Saenz Julienne , devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/2] ARM: dts: bcm2711: force CMA into first GB of memory Date: Thu, 7 Nov 2019 10:56:10 +0100 Message-Id: <20191107095611.18429-2-nsaenzjulienne@suse.de> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191107095611.18429-1-nsaenzjulienne@suse.de> References: <20191107095611.18429-1-nsaenzjulienne@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org arm64 places the CMA in ZONE_DMA32, which is not good enough for the Raspberry Pi 4 since it contains peripherals that can only address the first GB of memory. Explicitly place the CMA into that area. Signed-off-by: Nicolas Saenz Julienne --- Changes since v1: - Move into bcm2711.dtsi Changes since v1: - s/Raspberry Pi/bcm2711 arch/arm/boot/dts/bcm2711.dtsi | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index ac83dac2e6ba..667658497898 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -12,6 +12,26 @@ interrupt-parent = <&gicv2>; + reserved-memory { + #address-cells = <2>; + #size-cells = <1>; + ranges; + + /* + * arm64 reserves the CMA by default somewhere in ZONE_DMA32, + * that's not good enough for bcm2711 as some devices can + * only address the lower 1G of memory (ZONE_DMA). + */ + linux,cma { + compatible = "shared-dma-pool"; + size = <0x2000000>; /* 32MB */ + alloc-ranges = <0x0 0x00000000 0x40000000>; + reusable; + linux,cma-default; + }; + }; + + soc { /* * Defined ranges: -- 2.23.0