Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754674AbcDSOH5 (ORCPT ); Tue, 19 Apr 2016 10:07:57 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:61607 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753150AbcDSOHz (ORCPT ); Tue, 19 Apr 2016 10:07:55 -0400 From: Arnd Bergmann To: Nava kishore Manne Cc: Rob Herring , "linux-arm-kernel@lists.infradead.org" , "mark.rutland@arm.com" , "devicetree@vger.kernel.org" , Hyun Kwon , "pawel.moll@arm.com" , "ijc+devicetree@hellion.org.uk" , "gregkh@linuxfoundation.org" , Radhey Shyam Pandey , Michal Simek , "balbi@ti.com" , "linux-kernel@vger.kernel.org" , "galak@codeaurora.org" , Soren Brinkmann Subject: Re: [PATCH] Axi-usb: Add support for 64-bit addressing. Date: Tue, 19 Apr 2016 16:07:06 +0200 Message-ID: <11193586.PGqlzvJDML@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <1460360506-14692-1-git-send-email-navam@xilinx.com> <4449845.qT8BZnpD4R@wuerfel> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9shE+1fV2zsUKYr2jlmP2V61QGr1kL2VBUCBYm/pwW/S08CHts3 zlzMZi+lUoNJ+mYohYxDsDaqEFMU/tkb4SV7mx30U+boexh7yOuFFLP28/50AZ2o8Aqqold SSwf80xJQhsf7qRAgvyNqt7GWDAKQ7lF3iidkBjc48XQiFzAb1oECnXI0b9boPwiRiMpdfZ PuwkVYdY17fY+M1G4b7DQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:n+SgOV9mabA=:mA+ENQwWUsS/uEHl8Iuzh+ jlh2HuMvrG6Sic9u9V1sw4RLdXus5cMoPJtlDpGkpXii/Dn42c1FoG/LLwuxB6RVhh/FMUXvm JLqUDXhBjkgofN1c7K9CYujoIhKRmpObj4EQhMzpZ+LAJtikuehgxh2Ejquux80oVNAB0EF6F 6uhtCY7aqRjfMKkO4pDfxSmtsgGoPmiWFggH8jIFzLbr//HOh0F283c24gUg6X/c+iOmFm9Bh kvUzTypmeoy+n+LMssq7WQc9+5AdlTZYl8AtrGt0SPp/ifwHnLnTJ4doG7FW6Vh9oCm3H62H4 Ar21UUcT/lkKLyOZXFLqncLhHQA49OywjkwazMjhofyc8uaKp4psaQbG6g76t53tTIfxARN7W q1U0wz7cPxkRiCylxlovpW1nc4KHwOk6ystqa2nK3rYU5nFkEohkFlUeb9X8Jh0XVgFMBkovR JuxV2AaH38hCzINJSk2WRY9SQfjILx+E0YoPGskIIBBbkNy8mAGgFX1GWhBjYYDj98IBBD7Er KFAF/NLDLLFu9f3HW7YVixjUyOzbyc6u0nW7CprhH3OWaROto5eXqpXInAb3/M3e8QldRidtf WAborO19TOPO6+DnziwMGmx56DaL3kv6pDsP4XbAGIYYVbczLlX/OHb7xbgqgzWJo14AtCMul GxnfXjNXD7z4XCeVLkXVNdNHTux+QU8M6ne1DUOOeMuq8XJiU3DKCqEFdyL1/4L9Vsfc8bzdK qqVmj5hX9BdVOms6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3045 Lines: 63 On Tuesday 19 April 2016 09:15:01 Nava kishore Manne wrote: > > -----Original Message----- > > From: Arnd Bergmann [mailto:arnd@arndb.de] > > Sent: Monday, April 18, 2016 8:05 PM > > To: Rob Herring > > Cc: linux-arm-kernel@lists.infradead.org; Nava kishore Manne > > ; mark.rutland@arm.com; devicetree@vger.kernel.org; > > Nava kishore Manne ; Hyun Kwon > > ; pawel.moll@arm.com; ijc+devicetree@hellion.org.uk; > > gregkh@linuxfoundation.org; Radhey Shyam Pandey ; > > Michal Simek ; balbi@ti.com; linux- > > kernel@vger.kernel.org; galak@codeaurora.org; Soren Brinkmann > > > > Subject: Re: [PATCH] Axi-usb: Add support for 64-bit addressing. > > > > On Monday 18 April 2016 09:29:09 Rob Herring wrote: > > > > > > Right, you don't need to know the exact bus width for determining the > > > register/descriptor set is 32 or 64 bit addesses. I'm fine with a > > > property for that, but if limiting the actual connected address bits > > > is needed, then dma-ranges should be used. > > > > The other way round: dma-ranges is needed to allow 64-bit addressing, the > > default is to only allow 32-bit addressing (and arm64 has a known bug here, it > > just allows it anyway when it shouldn't). > > AXI-USB IP configurable for 32-bit or 64-bit addressing. > > In any of the configuration I mean if it is a 32-bit or 64-bit addressing there is a flexibility for the dma to choose the > Memory range supported by the AXI-USB... > > For example if AXI-USB (dma ) is configured for 40-bit addressing. You seem to contradict yourself here, saying that it can be either 32-bit or 64-bit, but then you say it is configured for 40-bit mode. Can you be more specific of which configurations are possible in the AXI-USB hardware block? Does it have three modes (32, 40, 64) or just two modes where it always truncates the 64-bit register values to 40 bits before sending a transaction out on the AXI master port? > Theoretically it can access memory up to 1TB if it is true we can get the > Address width using log2 of the dma-ranges size as you mentioned above. > > But in real use case user won't map the entire memory > He will map only the memory of his own choice... > > For example user mapped 2GB then dma-ranges property will be like below. > > dma-ranges = <0x00000000 0x00000000 0x80000000>; Again, that is not how dma-ranges works. The dma-ranges should list how the bus address space translates into the CPU address space, and that is completely independent of how much memory is installed. Unfortunately this was designed back when we had hierarchical buses, whereas nowadays we use point-to-point connections. We can normally work around that by translating each AXI link in the SoC design into a single line in the dma-ranges property, except when two devices on the same logical bus (which doesn't exist on AXI) have AXI master ports connecting to different places using the same address. Arnd