Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752784AbbHWN77 (ORCPT ); Sun, 23 Aug 2015 09:59:59 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:55111 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752415AbbHWN75 (ORCPT ); Sun, 23 Aug 2015 09:59:57 -0400 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Vinod Koul , Laurent Pinchart , "srikanth.thokala@xilinx.com" , Anurag Kumar Vulisha , Srikanth Vemula , "linux-kernel@vger.kernel.org" , Michal Simek , Soren Brinkmann , Anirudha Sarangi , "dmaengine@vger.kernel.org" , "dan.j.williams@intel.com" , Appana Durga Kedareswara Rao , "maxime.ripard@free-electrons.com" Subject: Re: [PATCH] dmaengine: vdma: Add 64 bit addressing support to the driver Date: Sun, 23 Aug 2015 15:59:45 +0200 Message-ID: <3107999.Bu5nBsJYRS@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20150823133933.GY13546@localhost> References: <1438775257-3511-1-git-send-email-anuragku@xilinx.com> <2348343.VuhoH7scrX@avalon> <20150823133933.GY13546@localhost> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:velTklFjtpyXNxtLDqVQbDMEpSyQV5BCjrsf3i0eUpenBFH42yJ zbzT+ADLXwfknQJgDBMo5nlWEr90EfxX2hZZZvWuGJXGYRLmr6kFNsNbJXuzD588VH38mh9 IlmnT385iJe7IeFIeD7+lBDmR6n3ew25iMseZ/wPlGIREscNG2Y67u+l59qTlKCTi244HZb gCbGBnuR3KSNYnGpLoSYg== X-UI-Out-Filterresults: notjunk:1;V01:K0:7DF4dcql7+o=:CrWXlGfqbf5o1IsH7DOhUB 20f/a5UecOu90wKRJ4OQFKv9/xV93jeKPhTN/q9IIMuQwq5dU+CL08lfJaGZl0wqQ5cBG6HMR RhzUCcqLOmrZ0CWP82MPG3zXJA8/zVDBxkR7M/SPa/f2xdHNas2rXTp9+yV47bp6gMhF6cZdw 1fKufvfSbWW1CBdY1fYQZPJvREbD9f9p7+c6WSyl3XbhXi7mFbs5ccKoszJ4F67OcUNSu8Miq 4BmSQHRCYm3fUaQyptp8NHBNUMd+8jNHOF1O3UYEbC+EBzIMmA5xDIjVtyyJF1+HUa6bDLVbl S6jD8X2JYXob8OyGMAHxBDY3zrJnh268Wbzi+Vrb5MWd4oeib+kRc5VVMUTosXXEDFXcveLGB 6puSyiDBk9iXBX3Y9HB5q8Khbxe2Kuezuen6xk19Hwk8WwS2ugSWErlvWO6JlIde7SsYCxipT 9CucG9TSza2QzqFrsMNyUWHeDlqEcv83SuG5Af01M2tcwyhkteyFBDR9MZ4/kB3xlrfsPy7eK Xu4FFtvp/Uk8gn2xh2J8yybWn2lwbiyTP2IcAP9n9q/7itoApEI4oH3idQY8nqPL4CeEXelel WyOVR4Tk9svQLBIf3FW8EtjsDm2MzH2NpXc++ptGzXYm2Xh6zyAIwmcu/y8lyaOZHP5jkqogJ EfiXxFWapqXsjy9VlGbjt3c6j4CXmuuiyWGRBUCBMba/JUZDqqTSpPCK4zoq9/2dAGNpZTyOm cVHHMaAkf/wT0JTg Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2806 Lines: 48 On Sunday 23 August 2015 19:09:33 Vinod Koul wrote: > On Fri, Aug 21, 2015 at 02:01:59AM +0300, Laurent Pinchart wrote: > > > > How is 64 bit DMA addressing implemented ? Can you use a 64-bit VDMA on > > > > a 32- bit platform with LPAE ? Can you use a 32-bit VDMA on a 64-bit > > > > platform ? Given that VDMA is an IP core you can instantiate in the > > > > programmable logic I expect some level of flexibility to be possible, but > > > > this patch doesn't seem to support it. Please provide more context to > > > > allow a proper review (and please include it in the commit message of v2). > > > > > > The VDMA core is a soft ip, which can be programmed to support both 32 bit > > > and 64 bit addressing.When the VDMA core is configured for 32 bit address > > > space , transfer start address is specified by a single register. > > > > > > When the VDMA core is configured for an address space greater than 32, each > > > start address is specified by a combination of two registers.The first > > > register specifies the LSB 32 bits of address, while the next register > > > specifies the MSB 32 bits of address.For example,5Ch will specify the LSB > > > bits while 60h will specify the MSB bits of the first start address. So we > > > need to program two registers at a time. > > > > > > Yes,64 bit vdma can be used on 32 bit platform and 32 bit vdma can also be > > > used on 64 bit platform.As far as i know , there is no use case where 64 > > > bit dma can be used on 32 bit platform.Please correct me if i am wrong. > > > > I'm not sure what the use cases would be, but it makes me feel uncomfortable > > to decide on whether the VDMA is 32 or 64 bits based on the type of CPU. > > > > As the VDMA flavour is selected at synthesis time, how about specifying it in > > DT instead ? You could just add an address-width property. > That would be saner thing to do. People wont check which IP and will mix and > match. So you may have a 64 bit system with your 32 bit IP... Note that you need two things here: an identification of whether the IP block itself is configured as 64-bit or 32-bit (either using the compatible string, or a separate property), and a dma-ranges property of the parent bus that describes what the bus can do and how the address range of the device maps to the address range of the parent bus. The DT probe code will set the dma offset according to the dma-ranges, and will prevent the device from setting a mask that does not get translated properly, e.g. if you have a 64-bit capable device on a 32-bit bus. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/