Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1144289pxv; Fri, 9 Jul 2021 19:24:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+Pqha0AWAOW642x2y9amKgCssLqGLGU5FRs+yQra4yjd2LLoAFaizzf7X2fOBWGGXsik3 X-Received: by 2002:a17:906:6d97:: with SMTP id h23mr40338816ejt.467.1625883891049; Fri, 09 Jul 2021 19:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625883891; cv=none; d=google.com; s=arc-20160816; b=qrdNNJRqX1L/ab/42gO1HLaDsqH2/cwc9EP1lRWvXQG1F9K8i1PbTzCchhOp0a3qlV zhdBCm+MQp832S5/Tomi38BjUugxVfGh5kHsHtb9Q+hKLaq7N32JB3AWDJWI+DDhnmjH 4stdhmPp9LEZNbLbTVBEh6h1lNCFykz4WGnTRe9kVKF8yC4EEDFx1nzM7eh0USjPG8Gu 1qRazGp+Qyh8QmCh2GKMA51JxAoS2POGjVh2Rmg4IMWdg1mu0RsvIfxdRYU2zIcz2/wH eMf6JeiEougeUN/m44iJRFRw+BRAZt9uj20SJK5wiIGmBzOKbuxbH6cYKWbz+O24bose 9n1g== 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=O8ZCznx7MfMmh42O2ZcbDrVw4EbVPOsiiwqIH4Wg2dE=; b=i0YhRM5R6LdbpWdYHUZAn1J2ek3kLETn2l/g2jj3g/ppZ4plOGLnCJvg6txp1+0IU6 xq/MopbMY+lpsz12AULqNit0QQPHnXmQcx6mOHB4rC10um1OB1zTw9C74rtpYBQFwKWc aejbR8NYq7cANEJi+JS3tPbko9/lCqfi2HIRPYXd5RqVSeZWY75ewfVfR6/RaAPEl3FR wkbkL3ZECZGTwkEj1LFcfyqD0g1RADeDcFnnmUZqwTpgBR2xNlhaPQDlu6cKkOd13A/g VUtbcMX5TyDuphRgrO+f9mi1xLzfxTftvw+IZWS3Nr/ChA7B3FX0HBnjX+QT5OcM673W 3PKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VyA4ziUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si8539832ejf.364.2021.07.09.19.24.27; Fri, 09 Jul 2021 19:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VyA4ziUO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232682AbhGJCWz (ORCPT + 99 others); Fri, 9 Jul 2021 22:22:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:37728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232201AbhGJCVs (ORCPT ); Fri, 9 Jul 2021 22:21:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C2FF76140A; Sat, 10 Jul 2021 02:18:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625883540; bh=qGZ/XPXWZNsgiZS33sYC3mAXAM5fqIhgEEX1RPAfsW4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VyA4ziUOlwovwUOFPKnzg5NudnMoAHn1iiScTzB4ar96auF6Jv0DPcf5LtrsdJ61z c/hphWGMpNFDe+BE+Hen5aH98woX1j3hDQ5dn12H8M0V1TXzx59ydIuN2kHg14FY4U o8cs6c1abQ5U3U6BeHpT/ULVB3fNvpCVFflBsPPv1/nn9/TU+ZrgX4EPZBG5+GGYz2 Dlg6Z0O5zoiuEIsTpn17itc3/G4m5lMw7TvnEZ3taIjU26dtI5wsCN3mmomjwiBvex wXiwtwP6HXdTyuyc7BorWkMMuHy4iUu63XjvcQZo0MI/EYhHvf9HD7pZJZMl0NuZ7C vj1xLcJqMbnXQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Tony Lindgren , Carl Philipp Klemm , Ivan Jelincic , Merlijn Wajer , Pavel Machek , Sebastian Reichel , "Sicelo A . Mhlongo" , Lee Jones , Sasha Levin Subject: [PATCH AUTOSEL 5.13 052/114] mfd: cpcap: Fix cpcap dmamask not set warnings Date: Fri, 9 Jul 2021 22:16:46 -0400 Message-Id: <20210710021748.3167666-52-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210710021748.3167666-1-sashal@kernel.org> References: <20210710021748.3167666-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 0b7cbe811ca524295ea43d9a4d73d3427e419c54 ] We have started to get a bunch of pointless dmamask not set warnings that makes the output of dmesg -l err,warn hard to read with many extra warnings: cpcap-regulator cpcap-regulator.0: DMA mask not set cpcap_adc cpcap_adc.0: DMA mask not set cpcap_battery cpcap_battery.0: DMA mask not set cpcap-charger cpcap-charger.0: DMA mask not set cpcap-pwrbutton cpcap-pwrbutton.0: DMA mask not set cpcap-led cpcap-led.0: DMA mask not set cpcap-led cpcap-led.1: DMA mask not set cpcap-led cpcap-led.2: DMA mask not set cpcap-led cpcap-led.3: DMA mask not set cpcap-led cpcap-led.4: DMA mask not set cpcap-rtc cpcap-rtc.0: DMA mask not set cpcap-usb-phy cpcap-usb-phy.0: DMA mask not set This seems to have started with commit 4d8bde883bfb ("OF: Don't set default coherent DMA mask"). We have the parent SPI controller use DMA, while CPCAP driver and it's children do not. For audio, the DMA is handled over I2S bus with the McBSP driver. Cc: Carl Philipp Klemm Cc: Ivan Jelincic Cc: Merlijn Wajer Cc: Pavel Machek Cc: Sebastian Reichel Cc: Sicelo A. Mhlongo Signed-off-by: Tony Lindgren Signed-off-by: Lee Jones Signed-off-by: Sasha Levin --- drivers/mfd/motorola-cpcap.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/mfd/motorola-cpcap.c b/drivers/mfd/motorola-cpcap.c index 30d82bfe5b02..6fb206da2729 100644 --- a/drivers/mfd/motorola-cpcap.c +++ b/drivers/mfd/motorola-cpcap.c @@ -327,6 +327,10 @@ static int cpcap_probe(struct spi_device *spi) if (ret) return ret; + /* Parent SPI controller uses DMA, CPCAP and child devices do not */ + spi->dev.coherent_dma_mask = 0; + spi->dev.dma_mask = &spi->dev.coherent_dma_mask; + return devm_mfd_add_devices(&spi->dev, 0, cpcap_mfd_devices, ARRAY_SIZE(cpcap_mfd_devices), NULL, 0, NULL); } -- 2.30.2