Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp810155pxb; Fri, 22 Apr 2022 11:38:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxei4BC6ubFZ3UxDxIxR7VGNegdTCpbNhGdq3wd4qR8ugIuqbOH8SHQgu84/4VynUVsosn X-Received: by 2002:a17:90b:110a:b0:1d2:bde4:e277 with SMTP id gi10-20020a17090b110a00b001d2bde4e277mr6764251pjb.188.1650652683941; Fri, 22 Apr 2022 11:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650652683; cv=none; d=google.com; s=arc-20160816; b=dAj8t48RgC/TESeazweWVOyM8Pvvkn887izccndCRadMGX145VtlV0xewWe7HqxXOI D5UxT+ycqnOMDGYPhmBMgz8ogQvZL3az8xkZeNNh+M2SG6kLFqB0oLnigKTjZCKD9/DS dJXHCndguy3xDGUNk6bUgV332aRTxJqEn1lYFIOO5URYwfOlrhPwGE0Ak29X8IUahrAf zWSW2N7J31px0f9TWZJVrZ94yBS22hFdHjnLXKAYJlmzUm6XsKNrdRxYmyNG+e1oqEqJ J9yWnu9txOpbjAhw/99dQcQEmLyoac6foBfwTemzwoPYvcp0hAeD0DY8Q905+G2wIJcd JIsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=sZf5aeyOv/geE7PqxpKGqbaO7oijs/p3MQFNG21fcgU=; b=b7VdmeKja6QVlr5/EI1EHM3RQwZ/2Tw4MI5C/0REAydaL9h5/Tp3uIdLbYymE9lbuN nuVHA6jXMYmWNAgo+hs8iB7GmdszAVPrbmM/8MX+t52brdqMvCcevlgkXzOHtAYfQsw2 Kw/wULsLU3O+Y3k7j+3EzFxjQB0CRcF4qydAew2L3F9r6Z4movH6ZyJu88BmBRahjMox v7RZCjF9FUEntpvZIw1EG33os+gmyt5/jH7+QAkV0qKKFlGUi8mHNJmIb6myIpIk1f/C j5xx1XjnvEuqMTBk/1E1+EAoFgtSaxgdw87Xa42Jaw5NDIkxMn516FuAnAPOAkG+jngY c+nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=OosE2T6q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id l3-20020a170902f68300b00153b2d16607si9380265plg.527.2022.04.22.11.38.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:38:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@cutebit.org header.s=mail header.b=OosE2T6q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cutebit.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E45D15BA02; Fri, 22 Apr 2022 11:07:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378702AbiDTNof (ORCPT + 99 others); Wed, 20 Apr 2022 09:44:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378648AbiDTNoc (ORCPT ); Wed, 20 Apr 2022 09:44:32 -0400 Received: from hutie.ust.cz (unknown [IPv6:2a03:3b40:fe:f0::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A9E83ED11; Wed, 20 Apr 2022 06:41:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cutebit.org; s=mail; t=1650462099; bh=sZf5aeyOv/geE7PqxpKGqbaO7oijs/p3MQFNG21fcgU=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=OosE2T6qOYxApS8+K6WqIAXECA0TUX553O0iGihCN/FhGYcSMPkz8TuH0qbFi2evB /lp1fg8aGNlRcgCqfnoNR+DPffFAzmDKT7wRek1YYcF/H37rjWQNR+BRmsFfWbkk2d d8JYBlu8qFD7pnIec5uqaZEAD/e/0xgx/myztccA= Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.80.82.1.1\)) Subject: Re: [PATCH v2 2/2] dmaengine: apple-admac: Add Apple ADMAC driver From: =?utf-8?Q?Martin_Povi=C5=A1er?= In-Reply-To: Date: Wed, 20 Apr 2022 15:41:37 +0200 Cc: =?utf-8?Q?Martin_Povi=C5=A1er?= , Hector Martin , Sven Peter , Rob Herring , Krzysztof Kozlowski , Alyssa Rosenzweig , linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Kettenis Content-Transfer-Encoding: quoted-printable Message-Id: <69599B8F-8F88-42BC-B159-863D1F9E729A@cutebit.org> References: <20220411222204.96860-1-povik+lin@cutebit.org> <20220411222204.96860-3-povik+lin@cutebit.org> To: Vinod Koul X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=no 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 > On 20. 4. 2022, at 14:40, Vinod Koul wrote: >=20 > On 12-04-22, 00:22, Martin Povi=C5=A1er wrote: >=20 >> +struct admac_chan { >> + int no; >=20 > Unsigned int perhaps? Sure. >=20 >> +static int admac_desc_free(struct dma_async_tx_descriptor *tx) >> +{ >> + struct admac_tx *adtx =3D to_admac_tx(tx); >> + >> + devm_kfree(to_admac_chan(tx->chan)->host->dev, adtx); >=20 > Why use devm for descriptor memory? Well, good point. :-) >> +static int admac_device_config(struct dma_chan *chan, >> + struct dma_slave_config *config) >> +{ >> + struct admac_chan *adchan =3D to_admac_chan(chan); >> + struct admac_data *ad =3D adchan->host; >> + bool is_tx =3D admac_chan_direction(adchan->no) =3D=3D = DMA_MEM_TO_DEV; >=20 > so are the channel directions hard wired in hardware? Yes they are. > --=20 > ~Vinod Martin