From patchwork Fri Oct 30 12:11:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 11869419 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9491C4363A for ; Fri, 30 Oct 2020 12:12:52 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 36D98206E9 for ; Fri, 30 Oct 2020 12:12:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xMEetfYn"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="JaoNnGhj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 36D98206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=o2AAl9FG7hPVAv7CGn/fRq3JQWv5L8z6fd4oQ73ESBM=; b=xMEetfYnX9iHYaZuZE0CZ45Imx G6GoRPEoDesphGpt3kwl6O4myhWFf/Zf2lLU44j3Z8uuJn8IRDV9jCUmf8tH0sGbcIkIGwqFKfcb+ lfWc9gHyJzunuConzrDulzEgwu30cPKGnKQ0Q1all/9tmw04OQksE0zUcJMX7WFTMe1+/BipzEvjN UNfdGX1PI4fDvgbJdiWnfVXWl0S8Qy/ywwPkVYgbtdkYXYNrSRdWbvW5GOpmVMRjzvebW9yjRMCYd 3MEZbS1vazy4CXjMaLzcyyay1DHNj/60p8P6jTcgfHih/OhDk3Oz/noJARpmDiKHo60QoLMtrIBbR tIM+04AA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYTFh-000145-MI; Fri, 30 Oct 2020 12:11:29 +0000 Received: from esa1.microchip.iphmx.com ([68.232.147.91]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kYTFd-00013R-Ve for linux-arm-kernel@lists.infradead.org; Fri, 30 Oct 2020 12:11:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1604059885; x=1635595885; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cuDhUCtdldLHfggrlEohm+QuxC5tqtZ6ddFavHBOtlw=; b=JaoNnGhjJqVr44olh43RFExnKYgtS6EneKPSisDmPlmoDilw950TVpfZ i95qGpzVno8e15J7OLH+WTLcDxTJn6py3Azk/ykLqpHulnF5VPD7z7ed0 LwnjeFHSszusTWUebh2o3xQoSaMA99ZWp21utjE5Af0gNGMvXBj+3ivYA HXr6NzCwCkiPpJjzk4QQISoOaZaWYDLsm5SvhbhadQqVgMDNODK/uXjk3 Ty+9zAxDHqKhMLUedTM2X165Vb1tnXSLiPETKSTjNnUIcWrNQDyr851ky slD3n2lsox2EkI3wIH9RSV+YujxBo3cY3oAJhlrKWS7alYrh5h7ZSKO8P A==; IronPort-SDR: uowKYC6/GYLYCBbpzJD24CQMWAiD8D1Zx8Vjt10jhK5/xctj0+wyaT5vQ96bxztik/r3U5kqmt moBVaxgSKnNtNnIgu2dT5QFrsuJNGgP92f/yHiwjINxOEKa9eTy5llr15XUfOoYRpdULLwu9La TJcJjwUdyUBIyDbpQzrUxk7/d1n7Mzn912liLNvTl2fVp3HB7nNkNWnHH4WnMRIRhKBSHe+b4x RFtstUURzIzu44mh21NH5i8vx8u466Z8DTp8TtzQgqZlpqcVIvyvDQPXvJaeVmV/NtrMXGlWKC 2Pg= X-IronPort-AV: E=Sophos;i="5.77,433,1596524400"; d="scan'208";a="101575811" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 30 Oct 2020 05:11:22 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Fri, 30 Oct 2020 05:11:22 -0700 Received: from atudor-ThinkPad-T470p.amer.actel.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Fri, 30 Oct 2020 05:11:20 -0700 From: Tudor Ambarus To: Subject: [PATCH] spi: atmel: Downgrade to dev_dbg when dma_request_chan() fails Date: Fri, 30 Oct 2020 14:11:16 +0200 Message-ID: <20201030121116.869105-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201030_081126_250204_4CFFB0E2 X-CRM114-Status: GOOD ( 11.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alexandre.belloni@bootlin.com, Tudor Ambarus , linux-spi@vger.kernel.org, ludovic.desroches@microchip.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The IP's DMA capabilities are described in the SoC dtsi, to spare users duplicating the DMA bindings in their board device tree. Users that don't want to use DMA, have to overwrite the DMA bindings in their board device tree. An example is: commit ddcdaeb88242 ("ARM: dts: at91: sama5d2: Add DMA bindings for the SPI and UART flx4 functions") When the DMA bindings are overwritten, one could see on the console: atmel_spi fc018400.spi: error -ENODEV: No TX DMA channel, DMA is disabled atmel_spi fc018400.spi: Atmel SPI Controller using PIO only Choosing to not use DMA is not a reason to print an error message. More, the user is already informed when PIO is used: "Atmel SPI Controller using PIO only". Downgrade to dev_dbg when dma_request_chan() fails. Signed-off-by: Tudor Ambarus --- drivers/spi/spi-atmel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c index 0e5e64a80848..948396b382d7 100644 --- a/drivers/spi/spi-atmel.c +++ b/drivers/spi/spi-atmel.c @@ -512,8 +512,8 @@ static int atmel_spi_configure_dma(struct spi_master *master, master->dma_tx = dma_request_chan(dev, "tx"); if (IS_ERR(master->dma_tx)) { - err = dev_err_probe(dev, PTR_ERR(master->dma_tx), - "No TX DMA channel, DMA is disabled\n"); + err = PTR_ERR(master->dma_tx); + dev_dbg(dev, "No TX DMA channel, DMA is disabled\n"); goto error_clear; } @@ -524,7 +524,7 @@ static int atmel_spi_configure_dma(struct spi_master *master, * No reason to check EPROBE_DEFER here since we have already * requested tx channel. */ - dev_err(dev, "No RX DMA channel, DMA is disabled\n"); + dev_dbg(dev, "No RX DMA channel, DMA is disabled\n"); goto error; }