Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5506116rdb; Wed, 13 Dec 2023 10:29:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IH4L/OODW/BMJouQhqwgGl2+h1TkDYx3KetIt+L+qiyVUzmsrnhERWxSl90oVom1tBUeoeW X-Received: by 2002:a92:c568:0:b0:35d:59a2:2b7 with SMTP id b8-20020a92c568000000b0035d59a202b7mr13231552ilj.87.1702492163920; Wed, 13 Dec 2023 10:29:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702492163; cv=none; d=google.com; s=arc-20160816; b=y8Rq2Thkoyk1av+sIC0eO6vvd4meTvK7XtWyaogRNANYHiVPbOmZrTSWFc+HKKBBeQ UDMa9afY1y4ybQnt38BJjN02SFqUCs2EV1y5yQw4Rw47hFQ1jhc3PHVuflcB4ZPKBdwH hCx/q9XUEDLPR0ABaKb9DS4ecUTbsxcqPXBKrzwIIjgdHLqZeAZwSq2CKHdrmrWiTIj/ VJCfH8Bmi+1RqiD/4vvhS23Vj7gcWxwJuiNSl96dAjzFV9ZiXWzOxnmn0y8Mv1fQ2MwS F29xQbOzLq4J3br7FpKkWQIkutNiNB1oHyA7FmyQyXwbh/Fx1Yc43h8lAARDUmUpXain LHvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=XnSFqgTswkTplcsu691QqkkZHVMY0mU0foWngmH5LQQ=; fh=0WBS476Z5+MMmWIrJcvNrKkf3eX/8QQxW9dtjoiBmFY=; b=tpxhgslodLI2mokuv0M99Hh7gQYMp7KVYe3xFG3h9fAN+kuCOEMdtMtYJk41n6ywVR aEumMLMVdiGIkViukYTDkyzSRyUUeIrGRShMdQdpu0zNN9q4Cq3LQh9p91T+KFoW5vH7 JiCwMFZUZY40Y5V9UBSot5DS044F7rPHwdYFpMZnVOil/rXygjorAAoXAvXGB1TFx70f S+NKBSuNj4NQTctkGX+KRBmzcN/xGZLdzhqtANKw0D3l+gmP5btOauYQV4gSNpYW/+NM pO3S689YmyNxc9M1mjfY3tnxdKZEWmO0I6E30qaD4fqOqxffx6sfkv1jGxKfIl4W7BYO 2qpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P6m+w4nQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s15-20020a63214f000000b005c66af62bacsi9892777pgm.174.2023.12.13.10.29.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 10:29:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=P6m+w4nQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 47ADE802A6FB; Wed, 13 Dec 2023 10:29:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442352AbjLMS2o (ORCPT + 99 others); Wed, 13 Dec 2023 13:28:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229480AbjLMS2m (ORCPT ); Wed, 13 Dec 2023 13:28:42 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9478DF2; Wed, 13 Dec 2023 10:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702492127; x=1734028127; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=/Iixiy3lpwH6hkXLSCKzUJWx2sVNb5UeaxLaBRkE5tE=; b=P6m+w4nQyzFZSp8qWws6KpmkEcFJgmL1KRD1akY1zsKWL7+UevuGdvKl 8qHU+zVZy349ZGgo8nhyyO2XvWl2ruLTCUsBEaTXSHQ9PDwBoB1tP91QH NM/Ktbgg3P88RSksI0ifr+hEgX0c13S/mKkrSfczZZ85IBdJgJ32fti0n lcqv14eNphljCTnptT11Jw4DZRMY7fMR4GC9TdIVhQakyt53/v6zUnWYl ZWX5Hsog9tSBJJkc/7zb61BK6Zf7W4s3cxzc7njqUiDU4CGLdGsgVPm0C ZD9GOLIENnqc7SuQze1l4aIdLqykm4JLgyeJmuDhWS7WczoyDKShbfsxx w==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="13705869" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="13705869" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:28:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="839985114" X-IronPort-AV: E=Sophos;i="6.04,273,1695711600"; d="scan'208";a="839985114" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 10:28:45 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1rDTyM-00000005blx-0oTq; Wed, 13 Dec 2023 20:28:42 +0200 Date: Wed, 13 Dec 2023 20:28:41 +0200 From: Andy Shevchenko To: Nikita Shubin Cc: Vinod Koul , Alexander Sverdlin , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: Re: [PATCH v6 10/40] dma: cirrus: Convert to DT for Cirrus EP93xx Message-ID: References: <20231212-ep93xx-v6-0-c307b8ac9aa8@maquefel.me> <20231212-ep93xx-v6-10-c307b8ac9aa8@maquefel.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231212-ep93xx-v6-10-c307b8ac9aa8@maquefel.me> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Wed, 13 Dec 2023 10:29:21 -0800 (PST) On Tue, Dec 12, 2023 at 11:20:27AM +0300, Nikita Shubin wrote: > Convert Cirrus EP93xx DMA to device tree usage: > > - add OF ID match table with data > - add of_probe for device tree > - add xlate for m2m/m2p > - drop subsys_initcall code > - drop platform probe > - drop platform structs usage > > >From now only it supports only device tree probing. "From now on it only..." (and single "only" is enough). ... > + edmac->clk = devm_clk_get(dev, dma_clk_name); > if (IS_ERR(edmac->clk)) { > + dev_warn(dev, "failed to get clock\n"); > continue; > } This is incorrect, it doesn't handle deferred probe in two aspects: - spamming the logs; - not really trying to reprobe. ... > +static bool ep93xx_m2p_dma_filter(struct dma_chan *chan, void *filter_param) > +{ > + struct ep93xx_dma_chan *echan = to_ep93xx_dma_chan(chan); > + struct ep93xx_dma_chan_cfg *cfg = filter_param; > + > + if (cfg->dir == ep93xx_dma_chan_direction(chan)) { > + echan->dma_cfg = *cfg; > + return true; > + } > + > + return false; Perhaps if (cfg->dir != ep93xx_dma_chan_direction(chan)) return false; echan->dma_cfg = *cfg; return true; > +} ... > + if (!is_slave_direction(direction)) > + return NULL; > + > + One blank line is enough. ... > + switch (port) { > + case EP93XX_DMA_SSP: > + case EP93XX_DMA_IDE: > + break; > + default: > + return NULL; > + } > + if (!is_slave_direction(direction)) > + return NULL; This can be performed before switch, no? ... > +#include > +#include > +#include > #include > #include > #include Perhaps make it a bit more ordered by squeezing to the (most) ordered parts? -- With Best Regards, Andy Shevchenko