Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp442607rdh; Sat, 23 Sep 2023 18:38:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdf1gtIMnCU7vMFR+2GDxVelWlBlE5ZLwZdzzRSTXwIf1OJLgsoDhMqA7y1b5GKRu2af7E X-Received: by 2002:a05:6808:10d0:b0:3ac:b0ff:ab44 with SMTP id s16-20020a05680810d000b003acb0ffab44mr5234464ois.14.1695519499172; Sat, 23 Sep 2023 18:38:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695519499; cv=none; d=google.com; s=arc-20160816; b=S0yL7jeW1RGthJx51nKefJNchQ+YvSY0dywPKyiBy+hz77fP/aBQl2yTTxProLUlr2 RoAACCYr+8fCJFexMK0JoWLZN9qmo8urSa3ldTkrdPRFzHtWLSCL10KyiQjT0tzH6nQI 1FavAsLPbJvKy1jRie8ENnUidLkcP/mNb6w4HEA70drQllH7HpP9+krFcQBBC/CUvOQQ kAtBRcjcjbj7qdIUg+eeOyeQwCBkFaMeb92YTe3seuAeXxJMBY1LsuKRrSym6EHjj2mV vPgwpzLAaOMP43VBpZrNpUISd84y0z2m1scIzl+Uo2zJ8Dp2PZHu2eHtXKusicNM7/Ds aZdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=SBL5sIpyqjQUGEFs8sBcyi3Rf1Xipk3OgAaxSlPnFCc=; fh=x1hGPnZeYvyedQGDVaFY4F5NZX5OfdEJxyYqoMYIkPY=; b=OaglmAAvJK/ZGxRQ/JlEZTbo5Rq+koJTwqubth+uy5zcbuTc04EaAWp8JFfICIS9/u sCLkPrKf7RZZdvzt2Z5M1Rm5NO36fT2WDztHnYF7p6m5L6MQTPkJHJIAEye+Y/9aCMRB ntJzq7MuwGj2EwRueI//kM72hrQdGely6rkUcU1JWQoq/MAsUNek5s0AmPR4/3Ik82pb 1roRH8eFOxj6fLyh1e0QrCjG8l6oklorOoEgV2fb6eWPfdasTgvpF7xewWJcAVinXb4O gCAs5A+jPk0a3QIGC5rRPuJ35XdcrYQ253xFByJ8t0QYErNxkFENbswSVEoNtMm3FJk/ 5Y+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OSNX5JHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id e21-20020a656895000000b0056da0ae25a0si6725307pgt.441.2023.09.23.18.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Sep 2023 18:38:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=OSNX5JHn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CEB41840FE11; Sat, 23 Sep 2023 07:32:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231761AbjIWOcX (ORCPT + 99 others); Sat, 23 Sep 2023 10:32:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231770AbjIWOcU (ORCPT ); Sat, 23 Sep 2023 10:32:20 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037C5192; Sat, 23 Sep 2023 07:32:11 -0700 (PDT) Received: from umang.lan (unknown [IPv6:2001:818:e7d2:8300:2412:6733:7e63:fb46]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B85E811A9; Sat, 23 Sep 2023 16:30:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1695479428; bh=M9/U+rgwmYjuJLbT8lvGfo8PXTj+i0WtoCKKe+50Opo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OSNX5JHnKPiUqqd/foqsemkodLQq1WWlJG8HpCZO/G2ScGsj1ai0mJTXp1HFVkbMX sfB3la8BTkGPjBfxNurZmz4CsjmPkNY7JmKISjtt7ibRhtduWzumPRgxBTcwL4wV5B 4ZTZrpxptCLY8yOVRbNI8hS34fJtGFFFWq7Ns9/0= From: Umang Jain To: linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stefan Wahren , Greg Kroah-Hartman , Florian Fainelli , Adrien Thierry , Dan Carpenter , Dave Stevenson , Kieran Bingham , Laurent Pinchart , Umang Jain Subject: [PATCH v12 2/6] staging: vc04_services: bcm2835-audio: Explicitly set DMA mask Date: Sat, 23 Sep 2023 20:01:56 +0530 Message-Id: <20230923143200.268063-3-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230923143200.268063-1-umang.jain@ideasonboard.com> References: <20230923143200.268063-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sat, 23 Sep 2023 07:32:31 -0700 (PDT) In the following patches, vchiq_arm will be migrated to create and use its own bus and all the vchiq drivers (bcm2835-camera, bcm2835-audio) will be registered to it. Since the platform driver/device model internally sets the DMA mask for its registered devices, we would have to do it ourself when we remove the platform driver/device registration for vchiq devices. This patch explicitly sets the DMA mask to bcm2835-audio so as not to introduce a regression when we move away from platform device/driver model. Signed-off-by: Umang Jain --- drivers/staging/vc04_services/bcm2835-audio/bcm2835.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c index 00bc898b0189..f3ad2543d1c0 100644 --- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c +++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.c @@ -3,6 +3,7 @@ #include +#include #include #include #include @@ -273,6 +274,12 @@ static int snd_bcm2835_alsa_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int err; + err = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)); + if (err) { + dev_err(dev, "dma_set_mask_and_coherent failed: %d\n", err); + return err; + } + if (num_channels <= 0 || num_channels > MAX_SUBSTREAMS) { num_channels = MAX_SUBSTREAMS; dev_warn(dev, "Illegal num_channels value, will use %u\n", -- 2.40.1