Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp387834lqr; Wed, 5 Jun 2024 08:52:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXqYOp0bxD3TqsWo9of8/2e0t6DDHrthYucsrms9t+vwFutJnxV9LqA+WDE46NC8I+IJRTQVfbahY+0muop+NHaubrqPxF4Kpv4bvV2Cw== X-Google-Smtp-Source: AGHT+IHPWhaHLpT4TuwJjLHpAn5eZaT6OvIlrAuklkOoHPnAzKRQCuVjDeD2fwPWaH5/CVOLaNsG X-Received: by 2002:a05:6214:449f:b0:6af:67b2:ff17 with SMTP id 6a1803df08f44-6b030aadc0dmr31510316d6.59.1717602761986; Wed, 05 Jun 2024 08:52:41 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 6a1803df08f44-6ae4b42b8dbsi7229456d6.439.2024.06.05.08.52.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 08:52:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=bmy0w9F6; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-202867-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202867-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.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 A5F2D1C22DCE for ; Wed, 5 Jun 2024 15:52:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4182614D2AE; Wed, 5 Jun 2024 15:52:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="bmy0w9F6" Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on2040.outbound.protection.outlook.com [40.107.14.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C51727701; Wed, 5 Jun 2024 15:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.14.40 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602751; cv=fail; b=XZlDJMgt8UWBhvwhXPaonL+FuxvWLs65xkYssnJOMVdpZWk2HWqQAeW9nqbY1mFRrNO0rO9L9HBLdnXSsfzEo3M9o7LDZUN0OSc+JW14Jw0X9BCPnX/sfQSi95u+qKBE/qGCEgfXufqErpnm5paO9lhHh8D7Q9jaiyVAAthH9LQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717602751; c=relaxed/simple; bh=/mVDsn6Wxi5hS/E5st9s37WmIUAD4b39XkaK+9xlkZk=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=IYtBRkZ40vv+lYNkRDRlWx9XDxyIImMCpdf/wDwe62r+UEKAGy3T8pdRcQBcznfBhffPSvazGBFtRRYpUVahpMA80VVVPkY/qDpfljxYBwzshcrDlOjxbU2voQlNsutiuDYD4eEqKosnQDGZMX2g3XEcICt6zx8i8nzRDs9dXpA= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=bmy0w9F6; arc=fail smtp.client-ip=40.107.14.40 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZCfsotHeApdCn9EpkFQgsxvpEJvnIjnRq5n4jHnKTkEYO/fknasdYc/9XuTprc0kb9BYZq6ujI+PbpJ4xOM4mCnceiHd7qpSzH6cicNTXFN4+Mu73vb45cSlJuXQeRSRilKqg/d9MO215K6CYBd5o7S7A3Iq4mbBAWkoUDZdiRMMJS0nvZXftsZ8BvP6raw7G/tXX1eCgGvhqXjn7sRx08EcpR2nrV+CSdV4RZJKXTFP8mFqZ0tDrYEZq3tsng5vF+JeeO9fYwiZCxXwZXmr1wt1Yvqu6qnTzvkT0Ya8VyYQtacaiy+jjWOOuIxZK+tYS2dL2isR4QHsTPJv9kNqIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=PyT+R5ReYEiGut2WzsvRuW/zVZPBteFgO15hUewHxHc=; b=HRrdHfegmXLY269yRpb3olu9Uh+nib8OOYgOqRku2sOUBL6sfqC4SwLB0LHU2CZR9yvAEUAUjwm05Mmtvc7oSDGsmvlLEgmgL0LdRYTFG0wosgOE16Fh/5dGpRLkgXRqp5R4quoVJMCgFCYNpDR/LaDmzcf1qsy1rezv5bhzksPVL00g1BRHnfs6eCi+fWewMLGl0u/oN7uIHY13Ap7A6+QoL95ss5LXJtBWH5IzjHrW2oK+bJ27/JuhqEsZFDwSa+Sw+ZhbaFrEAiRukhxtwtUNqoz+VkZeEBnyYT/0gVCVexsI4VDiNR7pKpY3q+Agq9mB4B0e+rjmdrjgMMYY0Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PyT+R5ReYEiGut2WzsvRuW/zVZPBteFgO15hUewHxHc=; b=bmy0w9F6UqAgo8KekuBxx1KIRKCnGm271rqNsGZMIBDOeLb8t4Jd+y9SnLyF2XKWC9DyuP4Q92xI+sTTVm+Ve7hrWGUTclT1CMbBX9ryGjFUUSAlVbZKNNajdunbOzYdJPZAAoVPloU+DxS5ZDGTmuYZoY47/S2D5rjgn2Hn9qo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by VI1PR04MB6864.eurprd04.prod.outlook.com (2603:10a6:803:138::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.25; Wed, 5 Jun 2024 15:52:19 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7633.021; Wed, 5 Jun 2024 15:52:19 +0000 Date: Wed, 5 Jun 2024 11:52:04 -0400 From: Frank Li To: Dave Stevenson Cc: 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 , 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 Subject: Re: [PATCH 02/18] dmaengine: bcm2835: Support common dma-channel-mask Message-ID: References: <20240524182702.1317935-1-dave.stevenson@raspberrypi.com> <20240524182702.1317935-3-dave.stevenson@raspberrypi.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240524182702.1317935-3-dave.stevenson@raspberrypi.com> X-ClientProxiedBy: SJ0PR03CA0263.namprd03.prod.outlook.com (2603:10b6:a03:3a0::28) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB6864:EE_ X-MS-Office365-Filtering-Correlation-Id: c2902b79-fa33-40a5-4e9c-08dc85777afa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|7416005|376005|52116005|366007|38350700005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?fOoByJG7643ZI9kc4y/QZzBDwqeFKf5vEEHPiC73ihBcp8kO2lE7G0Hr3aH+?= =?us-ascii?Q?I0dHBiTJ7aHvYqWB6/utg46Gle/jJYobjjmAkkl/R7iaieSBnUvMH9jVWzFy?= =?us-ascii?Q?gaHkh13O1VKjCvR5J+cPUL0t1YVUzA+i8NIeR1nEiRopjEmEJv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WprWP11YWL/NSLRFy1edIQp/lNa4+Oiz8L0awvLoU+O6a+?= =?us-ascii?Q?Wk8U9awG+T6o5SVy1uhbPY/xxRzj09NVFLHfra0+AdfJDMXbyqPrFU2d4O03?= =?us-ascii?Q?HrubN4mxHu38zkbH+QY07jlsumkpYTQ3SCLRKdTENTMX2yx2EgBDIgQESN/c?= =?us-ascii?Q?HqmLhwcl6Z2ND7Qq15Xgnl6FsNWTamAqJLAIhSvNBYug9LpTPnNoZCEtKZQp?= =?us-ascii?Q?3ahWsUlDo28nrab6VB0vm9gCk5BsBiPQlOP8OA601mhrHSNEX0FmO3g7JNvE?= =?us-ascii?Q?DnFWm/gSVwJyqK/kO1Frty8CQA1KoMorp5dwJvf8/XHqcR57kVebGGtG9zPQ?= =?us-ascii?Q?BjNmCC4=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(7416005)(376005)(52116005)(366007)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?+YU0pQ50kNnij8nsRPXN2bFzvwx0FbxHjrPyGKYcS78VbTY+xFXqXY+R8SQO?= =?us-ascii?Q?q059yP2k+H5WKfUQajJXFivtaSdUSO9iTq0UXUDlW6NV6OAm8i0G6b+ogLbr?= =?us-ascii?Q?Mz857I+KuT877uHPRi8GDaq971iPPdQZma1wpvOs87Hoxb3fq/KROhpsconw?= =?us-ascii?Q?2BQnxCjqWP7IzOkRC9IclgZUBSkTSlGhVtV+dPIlL93q3I6PWLZzIg6HUJny?= =?us-ascii?Q?Ok1y9JhpXwrpsTX6AUBvyH9aO8L0ODMy56bzb3UhazKY5zAp5b2T4pe8k36S?= =?us-ascii?Q?0G0t3pVER3r25mqDyF37TrDOWW8WyoHiren02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ascii?Q?8Tf31MaSg0126YZ4m4qzSknNyZYff9oPwMNpGa5w7LbVhjdTD7Wq6jMhelQz?= =?us-ascii?Q?53vfPXIje5MSFCiI9J+ctx4nCdKnKAgdM/PgmvWi+ZdQGNgc4ulHJnO7soWc?= =?us-ascii?Q?4sBs9k/pm7LlW91bdIOozgnTf3pl5GV/aph5uqmNCjiXsahC0JKU9HdqM/K4?= =?us-ascii?Q?T0lcPl/b5xdB9TPbMJyY1BaOk9BjdrF+L8ObskF7WEwGAV8CJDCM0oGzQDrp?= =?us-ascii?Q?5sQORz7wJSZh2fatp1gATYlCAw/k++s+MVi44UmhCZ3WW/m+C2RqXtYzQCkc?= =?us-ascii?Q?joeggEvU6Fg9i4mKjMR5b455SVYQwmR5Vyyz4dhmgIqHySkcRhr0sxrL1Uzw?= =?us-ascii?Q?TE06JLtrBPUxul0ug2kxDgDHlJZq+iIY56xUBMk7?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2902b79-fa33-40a5-4e9c-08dc85777afa X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jun 2024 15:52:19.2376 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MsJ2BiUZe0E0fCsUNcVU1LPGf5Jt+MGrlo915nZhTW1kRBTXt74QBgQDSAiPBBmD4fPIYpZ/fv5qXEQqzgcyaQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB6864 On Fri, May 24, 2024 at 07:26:46PM +0100, Dave Stevenson wrote: > 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. Use generic 'dma-channel-mask' property. Print a warning in case the old brcm,dma-channel-mask is used. Did you update binding doc? > > 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 >