Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp735910lqb; Fri, 24 May 2024 11:28:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUuORU6Fb0Uj5YdH50PSaXUDVm5SclSXmYbBDKdMLAPWu9xuz/za4Eb9e9Mhpo54zqqvdiXT2D7fOs8BCDEWOfQrhjStItcIDp9355geA== X-Google-Smtp-Source: AGHT+IFMYp48phRRw0Fu9vqjmwajGOfUAme7foh8E4eLDBiA52dlQHBW+jKtpgTdtANq9J52Oz53 X-Received: by 2002:ac8:57d2:0:b0:43e:3878:6624 with SMTP id d75a77b69052e-43fb0e7dc91mr37649901cf.16.1716575329060; Fri, 24 May 2024 11:28:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716575329; cv=pass; d=google.com; s=arc-20160816; b=h/mLMGmM7ke+JpDYna4bfqgar8m+9nqOkyVmLtq7/5dwDanEyOqskRZOZxrzRAUy+J gas7bOCbqJiwDvHhVbWZ+69Su+aEvqkF6jWemCLDbaiCCWfJf6tBZ9QtRSkmTP2Jn/B8 7O4v0uq7sCpkuMYa6WKz/UFz/Ve2tsIaf34Bni0xzpge+R1L69El5iOtux4O/a8I8e05 uBur2lTVN+CvTFr4cPY46NJS/riD97XBBbHzE4VS0CUh/7BF0/vs42bNkw2XaOT7M9mp 7YSEzycNlr0Cil636CMw+Wg5cEqMveCXAze7tWfIRGVRe82zw4XGh7bWD0z22IwJwEAE xWmg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=MmjLsXIH2Amncxc11ehW4fWxMk13TiDZ+O44YXe6Wgk=; fh=LYcerqaIYOfst9Uwzuhu66LAfwKQn5rdRl5IXqjpT2E=; b=oUdL36t/q8vhQsouyQG330anA4VYelRrBctHYW5egjgPy+GVai1qPOAULavWjGp3wO Avc0S8mN1z9VGAm3NbHnlgfB+/OBNBi8MFZXwuU/XlHZtNo3K88RVvLddNw8JCEEL0gT 9DapFCXg8xSa4F+6/11u4p3En17miYKgxB6pVpVJuloCoOiaJvLnCGnojhT7oWHPEjsI 5HnxBtLaqeyzrrtRPQrUo5oEkCl+NKX6b2TCkqsVsy2wPpubhSSPPz7c6sTrYMksEph7 YzpulaZ+jrVtF0hQD38vSovcaD5GxANfF6aZDDXYp2HJcP12nffHLzIMo2C33X9b+oNN 8MIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=tyumMzdp; arc=pass (i=1 spf=pass spfdomain=raspberrypi.com dkim=pass dkdomain=raspberrypi.com dmarc=pass fromdomain=raspberrypi.com); spf=pass (google.com: domain of linux-kernel+bounces-188996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17efdebsi23447541cf.219.2024.05.24.11.28.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 11:28:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@raspberrypi.com header.s=google header.b=tyumMzdp; arc=pass (i=1 spf=pass spfdomain=raspberrypi.com dkim=pass dkdomain=raspberrypi.com dmarc=pass fromdomain=raspberrypi.com); spf=pass (google.com: domain of linux-kernel+bounces-188996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=raspberrypi.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B3C571C215D1 for ; Fri, 24 May 2024 18:28:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F62957CAA; Fri, 24 May 2024 18:28:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="tyumMzdp" Received: from mail-wm1-f100.google.com (mail-wm1-f100.google.com [209.85.128.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128963F8ED for ; Fri, 24 May 2024 18:27:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716575277; cv=none; b=HIMghIPxvGq6/MvlKOk3bpJGB8q1XRyKb8IEy0rmm1pl1l0smkgI8AdViJ/ae1EcldocGuMgQsS7Mfj057vZBFVeVbSOra1cPb2sx9ec5phBfjfv05GL38ERL7lz0yaWLlCRZHABwV25dTNGxeTohui8ZuWK1VAGI/Ci41GgCz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716575277; c=relaxed/simple; bh=t6EOXzX5NBCieefJXhaqEj/EuhQeMzBIdGFGnmyqFc4=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lVAzbYbvwP0vRtW7kn+7Q0du6Nssr/5L8N2OrYZRKDpm8z8Do/f4KxSSQdY902ekMnQZldmv/T3vrLy/UI19hT8S2zHK7wHOJk8d10D0umOJtQU5TOmqSlccIyXVGVJeqe/eYoSSiMGQ/cBqRjuW4IsmdsovTtfYakikMyyibi0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raspberrypi.com; spf=pass smtp.mailfrom=raspberrypi.com; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b=tyumMzdp; arc=none smtp.client-ip=209.85.128.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=raspberrypi.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=raspberrypi.com Received: by mail-wm1-f100.google.com with SMTP id 5b1f17b1804b1-42017f8de7aso68196265e9.1 for ; Fri, 24 May 2024 11:27:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1716575272; x=1717180072; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MmjLsXIH2Amncxc11ehW4fWxMk13TiDZ+O44YXe6Wgk=; b=tyumMzdp8FGH9YqbvdldjlPB0bjTiwCyYniuRFs67n7zZL41LXqMUi3apYcvJ/FTA5 M3kAX0WE4j8SDbpzjxwWCCKxbw1u57Nguq/v2FMPSS4uI6dtAxizOCGZ0eBMI+giPfLs QvApk0fZcExSdaNCsei0Em4f1G/bHa02obSiWQYxPJYf2OTrcqNngtG7fqN92qpSMWd4 qD7ebj+Y4Dpe1rZl9wjNyKqKRINFSoYAGtTAXt2pntSVMA26ch4aqH5QiFZPeqmkseQA K4fAR/cssGDV9rbvR/Vs87o/WpMpGCPjJua5UqgwybJZQDrXX7FDKs9zXG64mCd7eDD3 osvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716575272; x=1717180072; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MmjLsXIH2Amncxc11ehW4fWxMk13TiDZ+O44YXe6Wgk=; b=NmR2lqQWbpRXzTecug+3YtOJVqqke/XWo49jBX4BME9O8yYOHRILLIo9npYZWDQQ5D jY2teyuqgvI4TaqU4Wsd+db5aARex6tMsmmEsXScgfBknqcTsveoyokDHcDLh/suiiUW DIcCdKAzo399SzZ+w372Io5OG6QIPCxXvPjHBEJ9fFdvVEJltKUfc6N9sQmwIyToRNCd ggHfL/nxpNvd+mce7cuz3mpXtLHVhH941zt0PCuOrw3W19pllx0hY2e9HWX82YLQRAiZ QKqIW/8H2A8cEXTy9u4X4rZMSqZV9Qlrelo4wJ33lBUAJAnQs0+MfXLug15wGSZUdn8m qIQw== X-Forwarded-Encrypted: i=1; AJvYcCUs3smTb11oe8PIK1SV5SKnhBQkIDt1iuUv12I8pBQaq+wh+roH7oiVvbxpT7qtrPZcVc12MxgxNW+5AXOmTlgNzs1DelpUqoy41Mzj X-Gm-Message-State: AOJu0Yy2APSSCXYsJD8yamXo2dONJ+Sht+5EBn2AK88KxPQZgwQqgo0s J4/+GgWoX4LFQ6fj7SC0OIXcjik4j3HsN3NQ3G2NUV2xAF/dPonEDNDbLftWyTroJRC2a5SRwOy 49iCESqN3215VoH7+pE/ipf8G0ElsNeYX X-Received: by 2002:a05:600c:3114:b0:420:2cbe:7ee8 with SMTP id 5b1f17b1804b1-421089f1394mr28435685e9.6.1716575272442; Fri, 24 May 2024 11:27:52 -0700 (PDT) Received: from raspberrypi.com ([188.39.149.98]) by smtp-relay.gmail.com with ESMTPS id ffacd0b85a97d-3557a1cd354sm56646f8f.101.2024.05.24.11.27.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 11:27:52 -0700 (PDT) X-Relaying-Domain: raspberrypi.com From: Dave Stevenson To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Broadcom internal kernel review list , Ray Jui , Scott Branden , Vinod Koul , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Ulf Hansson , Mark Brown , Christoph Hellwig , Marek Szyprowski , Robin Murphy , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Vladimir Murzin , Phil Elwell , Stefan Wahren , Serge Semin Cc: devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mmc@vger.kernel.org, linux-spi@vger.kernel.org, iommu@lists.linux.dev, linux-sound@vger.kernel.org, Stefan Wahren , Dave Stevenson Subject: [PATCH 02/18] dmaengine: bcm2835: Support common dma-channel-mask Date: Fri, 24 May 2024 19:26:46 +0100 Message-Id: <20240524182702.1317935-3-dave.stevenson@raspberrypi.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Stefan Wahren Nowadays there is a generic property for dma-channel-mask in the DMA controller binding. So prefer this one instead of the old vendor specific one. Print a warning in case the old one is used. Btw use the result of of_property_read_u32() as return code in error case. Signed-off-by: Stefan Wahren Signed-off-by: Dave Stevenson --- drivers/dma/bcm2835-dma.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c index 9d74fe97452e..528c4593b45a 100644 --- a/drivers/dma/bcm2835-dma.c +++ b/drivers/dma/bcm2835-dma.c @@ -941,12 +941,19 @@ static int bcm2835_dma_probe(struct platform_device *pdev) } /* Request DMA channel mask from device tree */ - if (of_property_read_u32(pdev->dev.of_node, - "brcm,dma-channel-mask", - &chans_available)) { - dev_err(&pdev->dev, "Failed to get channel mask\n"); - rc = -EINVAL; - goto err_no_dma; + rc = of_property_read_u32(pdev->dev.of_node, "dma-channel-mask", + &chans_available); + + if (rc) { + /* Try deprecated property */ + if (of_property_read_u32(pdev->dev.of_node, + "brcm,dma-channel-mask", + &chans_available)) { + dev_err(&pdev->dev, "Failed to get channel mask\n"); + goto err_no_dma; + } + + dev_warn(&pdev->dev, "brcm,dma-channel-mask deprecated - please update DT\n"); } /* get irqs for each channel that we support */ -- 2.34.1