From mboxrd@z Thu Jan 1 00:00:00 1970 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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT 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 E05F6C04AB4 for ; Tue, 21 May 2019 05:08:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AB7CA21743 for ; Tue, 21 May 2019 05:08:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558415312; bh=yVLbB8CTaH641zG15izNG1yqrXsL1HSUFhBobS8zl2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=UlLrDfyEXWkYvY++fQG+Lr86aFahyBRB1VpAs7p58Z6gqe4RDeZBGAXEKXZiOHxUb hhd6gXmcTu5gWsb2X6aEQZItUc4zWAIteCYA4sH3wKK6RBYkThbEBPtl2kqUo8ryLA XaMdHAeauCkFsQttSAevo9VAf6ntANse2JHbKT9Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725885AbfEUFIc (ORCPT ); Tue, 21 May 2019 01:08:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:57502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbfEUFIc (ORCPT ); Tue, 21 May 2019 01:08:32 -0400 Received: from localhost (unknown [106.201.107.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 16C3E2173E; Tue, 21 May 2019 05:08:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558415311; bh=yVLbB8CTaH641zG15izNG1yqrXsL1HSUFhBobS8zl2k=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WPAB5yNTekzn7LIyqGMR5cob+Au7IP7PjU6X+9+hz0z1KBC3ddHpnztxbW68fnODl pB4tVkioOU7rYsF2w2g3xF1InmuK+bOmMdfqKxLZxwZ5JH6yi4SxHj7Evli7UztfKQ Xz3V8Neyp9o3sbuMG3Hbxc3uAvZIv9ECet+JyHCI= Date: Tue, 21 May 2019 10:38:28 +0530 From: Vinod Koul To: Alexandru Ardelean Cc: dmaengine@vger.kernel.org, Lars-Peter Clausen Subject: Re: [PATCH] dmaengine: axi-dmac: Sanity check memory mapped interface support Message-ID: <20190521050828.GU15118@vkoul-mobl> References: <20190516083134.29460-1-alexandru.ardelean@analog.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190516083134.29460-1-alexandru.ardelean@analog.com> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org On 16-05-19, 11:31, Alexandru Ardelean wrote: > From: Lars-Peter Clausen > > The AXI-DMAC supports different types of interface for the data source and > destination ports. Typically one of those ports is a memory-mapped > interface while the other is some kind of streaming interface. > > The information about which kind of interface is used for each port is > encoded in the devicetree. > > It is also possible in the driver to detect whether a port supports > memory-mapped transfers or not. For streaming interfaces the address > register is read-only and will always return 0. So in order to check if a > port supports memory-mapped transfers write a non-zero value to the > corresponding address register and check that the value read-back is still > non zero. > > This allows to detect mismatches between the devicetree description and the > actual hardware configuration. > > Unfortunately it is not possible to autodetect the interface types since > there is no method to distinguish between the different streaming ports. So > the best thing that can be done is to error out when a memory mapped port > is described in the devicetree but none is detected in the hardware. Applied, thanks -- ~Vinod