Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1673917pxj; Fri, 21 May 2021 22:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwyLBDodUY4RfDd1U5DWHy6b1z89KxbcFtnFZcI1Z6GTJr9YZkOQ/1b9QVZJ62WZXkcrXBc X-Received: by 2002:a17:907:160a:: with SMTP id hb10mr13197734ejc.157.1621660376656; Fri, 21 May 2021 22:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621660376; cv=none; d=google.com; s=arc-20160816; b=0hTsefJqNYBrwSVSGakPvWmIc/ihLwObss/evgzcHmH6oCzbdkSshoLXzAJJGnKBgK NkAFNMqD6slJgbJJM28RWyfTvjr48xYEUC5illdhAP5yw9wQzHFyOZL37a54DCauhku5 WjB4SjqJO2MIVYVVQdAVyYQHhTvjt99qDjUfRvg8cMKkHwz8JgftKu1l8SSJYGmFU0cq 0LdhRyqQdIMvlO9UHPHP8eoNoe2/4AEeo/BYTV7TflQVezYv07GqiNxt/ng+GN+rh4ZS lxij2M4uJtXXbygHIITatTPnHX62JgFMg9Q7jvLu3iFlWpHTatroHBFPEyMmZlSxa0wT Hy3A== 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 :message-id:date:subject:cc:to:from; bh=l/HgrDovtM6N8bHD8skhIK7t0grcJDZrL0AVQ6lDlE4=; b=0/DYKljIboAc6+JV0jmHtUTfOmP42zFgS8OHjreU90iHbfpU1oznnNC6td+JkjBauP iP8PPtbA/ZH/7k1kpbg4Wl0YhnwUL5fc+8wbe8mbJ+wxJ0GkiQ2RpyCH0t3PxmIO52fF EWcbFpx4y8mnv9MGYudjevFmFeZyuyZHxIqRQ4OQUAauYmMEth7buuVH9nqmTfyShQOp 0aCJc0ZQIrTaFxRr6L0YI7yXyHcPhqO+GuREMLIJpEM8PjQdGfCcC5/PglxjM3+TFYtW Xe5S9FiWXjieRwrbgaBY4shSYbu3C+TfdbzaN+LSSZz9+nU3xoKyefMzesgp9Hm3jjwJ /XOQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id le27si7693003ejc.647.2021.05.21.22.12.06; Fri, 21 May 2021 22:12:56 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231297AbhEVFLe (ORCPT + 99 others); Sat, 22 May 2021 01:11:34 -0400 Received: from muru.com ([72.249.23.125]:58804 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229914AbhEVFLe (ORCPT ); Sat, 22 May 2021 01:11:34 -0400 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id B65E780C0; Sat, 22 May 2021 05:10:13 +0000 (UTC) From: Tony Lindgren To: Lee Jones Cc: linux-kernel@vger.kernel.org, Carl Philipp Klemm , Ivan Jelincic , Merlijn Wajer , Pavel Machek , Sebastian Reichel , "Sicelo A . Mhlongo" Subject: [PATCH] mfd: cpcap: Fix cpcap dmamask not set warnings Date: Sat, 22 May 2021 08:10:01 +0300 Message-Id: <20210522051001.53060-1-tony@atomide.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 --- 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.31.1